Skip to content

Instantly share code, notes, and snippets.

@monossido
Created February 2, 2012 18:48
Show Gist options
  • Save monossido/1725076 to your computer and use it in GitHub Desktop.
Save monossido/1725076 to your computer and use it in GitHub Desktop.
XMPP-to-SIP with Android Gtalk client (that creates mess with tags)
--- chan_gtalk1.8.c 2012-02-01 00:47:22.874993607 +0100
+++ chan_gtalk1.8-mio-final.c 2012-02-02 19:38:32.873555093 +0100
@@ -1997,6 +1997,11 @@ static int gtalk_parser(void *data, iksp
pak->query = tmp;
}
+ if (!strcasecmp(iks_name(pak->query), "jingle") && (tmp = iks_next(pak->query)) && !strcasecmp(iks_name(tmp), "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");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment