seperate jingle and gtalk so it will be easier to track

changes in both of the moving specs.  Currently chan_gtalk is 
compatible with the latest gtalk/libjingle version, and chan_jingle
needs a lot of work.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matt O'Gorman
2006-09-18 16:36:14 +00:00
parent c80d09559f
commit ec4bf7a849
4 changed files with 1860 additions and 9 deletions

1830
channels/chan_gtalk.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -156,7 +156,7 @@ struct jingle {
};
struct jingle_container {
ASTOBJ_CONTAINER_COMPONENTS(struct jingle);
ASTOBJ_CONTAINER_COMPONENTS(struct jingle);
};
static const char desc[] = "Jingle Channel";
@@ -521,7 +521,7 @@ static int jingle_handle_dtmf(struct jingle *client, ikspak *pak)
"unsupported-dtmf-method xmlns='http://jabber.org/protocol/jingle/info/dtmf#errors'");
return -1;
}
if ((dtmfnode = iks_find(pak->x, "dtmf"))) {
if ((dtmfnode = iks_find(pak->x, "dtmf"))) {
if((dtmf = iks_find_attrib(dtmfnode, "code"))) {
if(iks_find_with_attrib(pak->x, "dtmf", "action", "button-up")) {
struct ast_frame f = {AST_FRAME_DTMF_BEGIN, };
@@ -995,7 +995,7 @@ static int jingle_add_candidate(struct jingle *client, ikspak *pak)
struct jingle_pvt *p = NULL, *tmp = NULL;
struct aji_client *c = client->connection;
struct jingle_candidate *newcandidate = NULL;
iks *traversenodes = NULL, *receipt = NULL;
iks *traversenodes = NULL, *receipt = NULL;
newcandidate = ast_calloc(1, sizeof(*newcandidate));
if (!newcandidate)
return 0;
@@ -1533,7 +1533,7 @@ static int jingle_create_member(char *label, struct ast_variable *var, int allow
member->connection = client;
iks_filter_add_rule(client->f, jingle_parser, member, IKS_RULE_TYPE,
IKS_PAK_IQ, IKS_RULE_FROM_PARTIAL, member->user,
IKS_RULE_NS, "http://www.google.com/session",
IKS_RULE_NS, "http://jabber.org/protocol/jingle",
IKS_RULE_DONE);
} else {
ast_log(LOG_ERROR, "connection referenced not found!\n");
@@ -1640,7 +1640,7 @@ static int jingle_load_config(void)
ASTOBJ_WRLOCK(member);
member->connection = iterator;
iks_filter_add_rule(iterator->f, jingle_parser, member, IKS_RULE_TYPE, IKS_PAK_IQ, IKS_RULE_NS,
"http://www.google.com/session", IKS_RULE_DONE);
"http://jabber.org/protocol/jingle", IKS_RULE_DONE);
ASTOBJ_UNLOCK(member);
ASTOBJ_CONTAINER_LINK(&jingles, member);
ASTOBJ_UNLOCK(iterator);
@@ -1715,9 +1715,9 @@ static int unload_module(void)
ASTOBJ_WRLOCK(iterator);
privates = iterator->p;
while(privates) {
if (privates->owner)
ast_softhangup(privates->owner, AST_SOFTHANGUP_APPUNLOAD);
privates = privates->next;
if (privates->owner)
ast_softhangup(privates->owner, AST_SOFTHANGUP_APPUNLOAD);
privates = privates->next;
}
iterator->p = NULL;
ASTOBJ_UNLOCK(iterator);

19
configs/gtalk.conf.sample Normal file
View File

@@ -0,0 +1,19 @@
;[general]
;context=default ;;Context to dump call into
;allowguest=yes ;;Allow calls from people not in
;;list of peers
;
;[guest] ;;special account for options on guest account
;disallow=all
;allow=ulaw
;context=guest
;
;[ogorman]
;username=ogorman@gmail.com ;;username of the peer your
;;calling or accepting calls from
;disallow=all
;allow=ulaw
;context=default
;connection=asterisk ;;client or component in jabber.conf
;;for the call to leave on.
;

View File

@@ -1,8 +1,10 @@
(Jingle support in asterisk is experimental)
Jingle is an xmpp based protocol for signalling the transfer of media.
Currently asterisk supports the proprietary GoogleTalk protocol that is
very similar to jingle, and hopes to support true jingle specs
very similar to jingle, and hopes to soon support true jingle specs
(JEP-166,167,176,177,180,181 etc) as more clients support the true standard.
Jingle's configuration is very similar to sip.conf only as we are not the
jabber server in this case you must provide a connection for the peer to
travel out on.
chan_gtalk is for supporting the non-jingle google/libjingle spec and
chan_jingle will continue to move in the direction of the correct spec.