[asterisk-commits] branch mogorman/asterisk-xmpp r10285 - in /team/mogorman/asterisk-xmpp: chann...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Feb 16 05:23:07 MST 2006


Author: mogorman
Date: Thu Feb 16 06:23:05 2006
New Revision: 10285

URL: http://svn.digium.com/view/asterisk?rev=10285&view=rev
Log:
some updates, and beginnings of rtp

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

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=10285&r1=10284&r2=10285&view=diff
==============================================================================
--- team/mogorman/asterisk-xmpp/channels/chan_xmpp.c (original)
+++ team/mogorman/asterisk-xmpp/channels/chan_xmpp.c Thu Feb 16 06:23:05 2006
@@ -70,7 +70,6 @@
 static int usecnt =0;
 AST_MUTEX_DEFINE_STATIC(usecnt_lock);
 
-//#define IS_OUTBOUND(a,b) (a == b->chan ? 1 : 0)
 
 /* Protect the interface list (of sip_pvt's) */
 AST_MUTEX_DEFINE_STATIC(xmpplock);
@@ -89,6 +88,7 @@
 static int xmpp_indicate(struct ast_channel *ast, int condition);
 static int xmpp_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
 static int xmpp_sendhtml(struct ast_channel *ast, int subclass, const char *data, int datalen);
+static struct xmpp_pvt *xmpp_alloc(char *data, int format);
 
 /* PBX interface structure for channel registration */
 static const struct ast_channel_tech xmpp_tech = {
@@ -108,9 +108,19 @@
 	.send_html = xmpp_sendhtml,
 };
 
+/*----- RTP interface functions */
+static int xmpp_set_rtp_peer(struct ast_channel *chan, struct ast_rtp *rtp, int codecs, int nat_active);
+static struct ast_rtp *xmpp_get_rtp_peer(struct ast_channel *chan);
+static int xmpp_get_codec(struct ast_channel *chan);
+
+static struct ast_rtp_protocol xmpp_rtp = {
+	type: "XMPP",
+	get_rtp_info: xmpp_get_rtp_peer,
+	set_rtp_peer: xmpp_set_rtp_peer,
+	get_codec: xmpp_get_codec,
+};
 
 static int flipflop = 0;
-static struct xmpp_pvt *xmpp_alloc(char *data, int format);
 
 static int xmpp_queue_frame(struct xmpp_pvt *p, int isoutbound, struct ast_frame *f, struct ast_channel *us)
 {
@@ -284,6 +294,7 @@
 	iks_delete(candidate);
 	iks_delete(jingle);
 	iks_delete(iq);
+	return 1;
 }
 
 static int xmpp_accept_call(struct axi_client *client, ikspak *pak)
@@ -407,7 +418,7 @@
 {
 	struct xmpp_pvt *p ,*tmp = client->xmpps;
 	iks *accept;
-	char *data = "1234 at local";
+//	char *data = "1234 at local";
 	while(tmp) {
 		if(iks_find_with_attrib(pak->x,GOOGLE_NODE,GOOGLE_SID,tmp->sid))
 		{

Modified: team/mogorman/asterisk-xmpp/include/asterisk/xmpp.h
URL: http://svn.digium.com/view/asterisk/team/mogorman/asterisk-xmpp/include/asterisk/xmpp.h?rev=10285&r1=10284&r2=10285&view=diff
==============================================================================
--- team/mogorman/asterisk-xmpp/include/asterisk/xmpp.h (original)
+++ team/mogorman/asterisk-xmpp/include/asterisk/xmpp.h Thu Feb 16 06:23:05 2006
@@ -96,7 +96,9 @@
 	char from[100];
 	struct axi_candidate *candidates;
 	struct ast_channel *owner;		/* Master Channel */
+	struct ast_rtp *rtp;                    /*!< RTP Session */
 	struct xmpp_pvt *next;			/* Next entity */
+	
 
 };
 



More information about the asterisk-commits mailing list