[asterisk-commits] twilson: trunk r327683 - in /trunk: ./ channels/ include/asterisk/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jul 11 14:49:42 CDT 2011
Author: twilson
Date: Mon Jul 11 14:49:35 2011
New Revision: 327683
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=327683
Log:
Merged revisions 327682 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r327682 | twilson | 2011-07-11 12:41:59 -0700 (Mon, 11 Jul 2011) | 9 lines
Update chan_gtalk to work with changed GMail-based calls
The messages sent by the GMail client have changed, but include the
old-style messages as well. This patch checks for this case and
uses the old-style offer.
(closes issue ASTERISK-18084)
Review: https://reviewboard.asterisk.org/r/1312/
........
Modified:
trunk/ (props changed)
trunk/channels/chan_gtalk.c
trunk/include/asterisk/jingle.h
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: trunk/channels/chan_gtalk.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_gtalk.c?view=diff&rev=327683&r1=327682&r2=327683
==============================================================================
--- trunk/channels/chan_gtalk.c (original)
+++ trunk/channels/chan_gtalk.c Mon Jul 11 14:49:35 2011
@@ -1336,7 +1336,7 @@
ast_copy_string(p->sid, sid, sizeof(p->sid));
/* codec points to the first <payload-type/> tag */
- codec = iks_first_tag(iks_first_tag(iks_first_tag(pak->x)));
+ codec = iks_first_tag(iks_first_tag(pak->query));
while (codec) {
char *codec_id = iks_find_attrib(codec, "id");
@@ -2049,6 +2049,12 @@
{
struct gtalk *client = ASTOBJ_REF((struct gtalk *) data);
int res;
+ iks *tmp;
+
+ if (!strcasecmp(iks_name(pak->query), "jin:jingle") && (tmp = iks_next(pak->query)) && !strcasecmp(iks_name(tmp), "ses:session")) {
+ ast_debug(1, "New method detected. Skipping jingle offer and using old gtalk method.\n");
+ pak->query = tmp;
+ }
if (!strcmp(S_OR(iks_find_attrib(pak->x, "type"), ""), "error")) {
ast_log(LOG_NOTICE, "Remote peer reported an error, trying to establish the call anyway\n");
@@ -2233,6 +2239,7 @@
ASTOBJ_WRLOCK(member);
member->connection = NULL;
iks_filter_add_rule(iterator->f, gtalk_parser, member, IKS_RULE_TYPE, IKS_PAK_IQ, IKS_RULE_NS, GOOGLE_NS, IKS_RULE_DONE);
+ iks_filter_add_rule(iterator->f, gtalk_parser, member, IKS_RULE_TYPE, IKS_PAK_IQ, IKS_RULE_NS, GOOGLE_JINGLE_NS, IKS_RULE_DONE);
iks_filter_add_rule(iterator->f, gtalk_parser, member, IKS_RULE_TYPE, IKS_PAK_IQ, IKS_RULE_NS, "http://jabber.org/protocol/gtalk", IKS_RULE_DONE);
ASTOBJ_UNLOCK(member);
ASTOBJ_UNLOCK(iterator);
Modified: trunk/include/asterisk/jingle.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/jingle.h?view=diff&rev=327683&r1=327682&r2=327683
==============================================================================
--- trunk/include/asterisk/jingle.h (original)
+++ trunk/include/asterisk/jingle.h Mon Jul 11 14:49:35 2011
@@ -44,6 +44,7 @@
#define JINGLE_DTMF_NS "urn:xmpp:tmp:jingle:dtmf"
#define GOOGLE_NS "http://www.google.com/session"
+#define GOOGLE_JINGLE_NS "urn:xmpp:jingle:1"
#define GOOGLE_AUDIO_NS "http://www.google.com/session/phone"
#define GOOGLE_VIDEO_NS "http://www.google.com/session/video"
#define GOOGLE_TRANSPORT_NS "http://www.google.com/transport/p2p"
More information about the asterisk-commits
mailing list