[asterisk-commits] branch mogorman/asterisk-xmpp r9274 - /team/mogorman/asterisk-xmpp/channels/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Feb 8 23:09:01 MST 2006


Author: mogorman
Date: Thu Feb  9 00:09:00 2006
New Revision: 9274

URL: http://svn.digium.com/view/asterisk?rev=9274&view=rev
Log:
need codecs...

Modified:
    team/mogorman/asterisk-xmpp/channels/chan_xmpp.c

Modified: team/mogorman/asterisk-xmpp/channels/chan_xmpp.c
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-xmpp/channels/chan_xmpp.c?rev=9274&r1=9273&r2=9274&view=diff
==============================================================================
--- team/mogorman/asterisk-xmpp/channels/chan_xmpp.c (original)
+++ team/mogorman/asterisk-xmpp/channels/chan_xmpp.c Thu Feb  9 00:09:00 2006
@@ -243,11 +243,19 @@
 static int xmpp_accept_call(struct axi_client *client, ikspak *pak)
 {
 	struct xmpp_pvt *tmp = client->xmpps;
-	iks *iq, *jingle;
+	iks *iq, *jingle, *description, *codec;
 	while(tmp) {
 		if(!strcasecmp(tmp->sid,iks_find_attrib(pak->query,GOOGLE_SID))) {
 			iq = iks_new("iq");
 			jingle = iks_new(GOOGLE_NODE);
+			codec = iks_new("payload-type");
+			iks_insert_attrib(codec,"id","0");
+			iks_insert_attrib(codec,"name","PCMU");
+			iks_insert_attrib(codec,"xmlns","http://www.google.com/session/phone");
+
+			description = iks_new("description");
+			iks_insert_attrib(description,"xmlns","http://google.com/session/phone");
+			
 			iks_insert_attrib(iq,"type","set");
 			iks_insert_attrib(iq,"from",client->jid->full);
 			iks_insert_attrib(iq,"to",iks_find_attrib(pak->x,"from"));
@@ -259,7 +267,11 @@
 			iks_insert_attrib(jingle, "initiator", iks_find_attrib(pak->x,"from"));
 			iks_insert_attrib(jingle, GOOGLE_SID, tmp->sid);
 			iks_insert_node(iq,jingle);
+			iks_insert_node(jingle,description);
+			iks_insert_node(description,codec);
 			iks_send(client->p,iq);
+			iks_delete(description);
+			iks_delete(codec);
 			iks_delete(jingle);
 			iks_delete(iq);
 		}



More information about the asterisk-commits mailing list