[asterisk-commits] oej: branch oej/sencha-fixing-183-without-sdp-1.8 r412066 - /team/oej/sencha-...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 10 03:54:55 CDT 2014


Author: oej
Date: Thu Apr 10 03:54:45 2014
New Revision: 412066

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=412066
Log:
If we already have received a SDP with a 183 or something else, do not send ringing.

Modified:
    team/oej/sencha-fixing-183-without-sdp-1.8/channels/chan_sip.c

Modified: team/oej/sencha-fixing-183-without-sdp-1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/sencha-fixing-183-without-sdp-1.8/channels/chan_sip.c?view=diff&rev=412066&r1=412065&r2=412066
==============================================================================
--- team/oej/sencha-fixing-183-without-sdp-1.8/channels/chan_sip.c (original)
+++ team/oej/sencha-fixing-183-without-sdp-1.8/channels/chan_sip.c Thu Apr 10 03:54:45 2014
@@ -20962,9 +20962,21 @@
 			/* Alcatel PBXs are known to send 183s with no SDP after sending
 			 * a 100 Trying response. We're just going to treat this sort of thing
 			 * the same as we would treat a 180 Ringing
+			 *
+ 			 * Lync sends 183 w sdp using PRACK the first time. AFter that, 183
+			 * without SDP. We need to keep the media stream open and not send
+			 * ringing in that case.
 			 */
-			if (!req->ignore && p->owner) {
-				ast_queue_control(p->owner, AST_CONTROL_RINGING);
+			struct ast_sockaddr remote_address = {{0,}};
+			/* If we have a remote IP for RTP, we already have a SDP and we 
+			   are fine. */
+			ast_rtp_instance_get_remote_address(p->rtp, &remote_address);
+			if (ast_sockaddr_isnull(&remote_address) || (!ast_strlen_zero(p->theirprovtag) && strcmp(p->theirtag, p->theirprovtag))) {
+				/* We got a 183 without SDP without having a previous SDP. Now, send ringing */
+				if (!req->ignore && p->owner) {
+
+					ast_queue_control(p->owner, AST_CONTROL_RINGING);
+				}
 			}
 		}
 		check_pendings(p);




More information about the asterisk-commits mailing list