[asterisk-commits] oej: branch oej/teapot-1.8 r412070 - in /team/oej/teapot-1.8: channels/ patches/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 10 04:45:16 CDT 2014


Author: oej
Date: Thu Apr 10 04:45:06 2014
New Revision: 412070

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=412070
Log:
Adding fix for 183 without SDP

Added:
    team/oej/teapot-1.8/patches/sencha-fixing-183-without-sdp-1.8.diff   (with props)
Modified:
    team/oej/teapot-1.8/channels/chan_sip.c

Modified: team/oej/teapot-1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/teapot-1.8/channels/chan_sip.c?view=diff&rev=412070&r1=412069&r2=412070
==============================================================================
--- team/oej/teapot-1.8/channels/chan_sip.c (original)
+++ team/oej/teapot-1.8/channels/chan_sip.c Thu Apr 10 04:45:06 2014
@@ -21229,9 +21229,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);

Added: team/oej/teapot-1.8/patches/sencha-fixing-183-without-sdp-1.8.diff
URL: http://svnview.digium.com/svn/asterisk/team/oej/teapot-1.8/patches/sencha-fixing-183-without-sdp-1.8.diff?view=auto&rev=412070
==============================================================================
--- team/oej/teapot-1.8/patches/sencha-fixing-183-without-sdp-1.8.diff (added)
+++ team/oej/teapot-1.8/patches/sencha-fixing-183-without-sdp-1.8.diff Thu Apr 10 04:45:06 2014
@@ -1,0 +1,28 @@
+Index: channels/chan_sip.c
+===================================================================
+--- channels/chan_sip.c	(.../branches/1.8)	(revision 412069)
++++ channels/chan_sip.c	(.../team/oej/sencha-fixing-183-without-sdp-1.8)	(revision 412069)
+@@ -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);

Propchange: team/oej/teapot-1.8/patches/sencha-fixing-183-without-sdp-1.8.diff
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/oej/teapot-1.8/patches/sencha-fixing-183-without-sdp-1.8.diff
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/oej/teapot-1.8/patches/sencha-fixing-183-without-sdp-1.8.diff
------------------------------------------------------------------------------
    svn:mime-type = text/plain




More information about the asterisk-commits mailing list