[asterisk-commits] mmichelson: branch mmichelson/direct_media r382661 - in /team/mmichelson/dire...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 7 17:17:17 CST 2013


Author: mmichelson
Date: Thu Mar  7 17:17:14 2013
New Revision: 382661

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382661
Log:
Move the logic for queuing a srcchange frame into chan_gulp on ACK reception.

This was out of place in res_sip_session since it should not have any sort of
interaction with channels. It fits quite nicely in the incoming request supplement
of chan_gulp though.


Modified:
    team/mmichelson/direct_media/channels/chan_gulp.c
    team/mmichelson/direct_media/res/res_sip_session.c

Modified: team/mmichelson/direct_media/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/direct_media/channels/chan_gulp.c?view=diff&rev=382661&r1=382660&r2=382661
==============================================================================
--- team/mmichelson/direct_media/channels/chan_gulp.c (original)
+++ team/mmichelson/direct_media/channels/chan_gulp.c Thu Mar  7 17:17:14 2013
@@ -888,8 +888,12 @@
 	pjsip_tx_data *packet = NULL;
 	int res = AST_PBX_FAILED;
 
-	/* We only care about new sessions */
 	if (session->channel) {
+		if (rdata->msg_info.msg->line.req.method.id == PJSIP_ACK_METHOD) {
+			if (session->endpoint->direct_media) {
+				ast_queue_control(session->channel, AST_CONTROL_SRCCHANGE);
+			}
+		}
 		return 0;
 	}
 

Modified: team/mmichelson/direct_media/res/res_sip_session.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/direct_media/res/res_sip_session.c?view=diff&rev=382661&r1=382660&r2=382661
==============================================================================
--- team/mmichelson/direct_media/res/res_sip_session.c (original)
+++ team/mmichelson/direct_media/res/res_sip_session.c Thu Mar  7 17:17:14 2013
@@ -1202,9 +1202,6 @@
 	if (tsx->method.id == PJSIP_INVITE_METHOD) {
 		if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
 			queue_delayed_request(session);
-			if (session->endpoint->direct_media && session->channel) {
-				ast_queue_control(session->channel, AST_CONTROL_SRCCHANGE);
-			}
 		} else if (tsx->role == PJSIP_ROLE_UAC && tsx->state == PJSIP_TSX_STATE_COMPLETED) {
 			/* This means we got a non 2XX final response to our outgoing INVITE */
 			if (tsx->status_code == PJSIP_SC_REQUEST_PENDING) {




More information about the asterisk-commits mailing list