[svn-commits] oej: branch 1.2 r61663 - /branches/1.2/channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Apr 16 07:08:34 MST 2007


Author: oej
Date: Mon Apr 16 09:08:33 2007
New Revision: 61663

URL: http://svn.digium.com/view/asterisk?view=rev&rev=61663
Log:
Don't stop RTP on errors on INFO messages.

Disclaimer: This patch was needed for Edvina AstHoloApp and was
meant to be included in 1.2, but never made it in time so I felt
I could add it now.

No, just joking, patching error found while testing T.140 with Omnitor earlier
this spring.

Modified:
    branches/1.2/channels/chan_sip.c

Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?view=diff&rev=61663&r1=61662&r2=61663
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Mon Apr 16 09:08:33 2007
@@ -10201,13 +10201,15 @@
 			if ((resp >= 300) && (resp < 700)) {
 				if ((option_verbose > 2) && (resp != 487))
 					ast_verbose(VERBOSE_PREFIX_3 "Got SIP response %d \"%s\" back from %s\n", resp, rest, ast_inet_ntoa(iabuf, sizeof(iabuf), p->sa.sin_addr));
-				if (p->rtp) {
-					/* Immediately stop RTP */
-					ast_rtp_stop(p->rtp);
-				}
-				if (p->vrtp) {
-					/* Immediately stop VRTP */
-					ast_rtp_stop(p->vrtp);
+				if (sipmethod == SIP_INVITE) {
+					if (p->rtp) {
+						/* Immediately stop RTP */
+						ast_rtp_stop(p->rtp);
+					}
+					if (p->vrtp) {
+						/* Immediately stop VRTP */
+						ast_rtp_stop(p->vrtp);
+					}
 				}
 				/* XXX Locking issues?? XXX */
 				switch(resp) {
@@ -10251,7 +10253,8 @@
 				/* ACK on invite */
 				if (sipmethod == SIP_INVITE) 
 					transmit_request(p, SIP_ACK, seqno, 0, 0);
-				ast_set_flag(p, SIP_ALREADYGONE);	
+				if (sipmethod != SIP_MESSAGE && sipmethod != SIP_INFO)
+					ast_set_flag(p, SIP_ALREADYGONE);	
 				if (!p->owner)
 					ast_set_flag(p, SIP_NEEDDESTROY);	
 			} else if ((resp >= 100) && (resp < 200)) {



More information about the svn-commits mailing list