[asterisk-commits] kmoore: branch 1.8 r344769 - /branches/1.8/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Nov 11 14:11:02 CST 2011


Author: kmoore
Date: Fri Nov 11 14:10:58 2011
New Revision: 344769

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=344769
Log:
Fix regression introduced by SDP fixups

If capability is adjusted when switching to UDPTL during fax transmission, fax
teardown fails.  Make sure capability is only touched if RTP is active.  This
regression was introduced in R344385.

Modified:
    branches/1.8/channels/chan_sip.c

Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=344769&r1=344768&r2=344769
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Fri Nov 11 14:10:58 2011
@@ -9093,15 +9093,17 @@
 		return -1;
 	}
 
-	/* We are now ready to change the sip session and p->rtp and p->vrtp with the offered codecs, since
-	   they are acceptable */
-	p->jointcapability = newjointcapability;                /* Our joint codec profile for this call */
-	p->peercapability = newpeercapability;                  /* The other sides capability in latest offer */
-	p->jointnoncodeccapability = newnoncodeccapability;     /* DTMF capabilities */
-
-	/* respond with single most preferred joint codec, limiting the other side's choice */
-	if (ast_test_flag(&p->flags[1], SIP_PAGE2_PREFERRED_CODEC)) {
-		p->jointcapability = ast_codec_choose(&p->prefs, p->jointcapability, 1);
+	if (portno != -1 || vportno != -1 || tportno != -1) {
+		/* We are now ready to change the sip session and p->rtp and p->vrtp with the offered codecs, since
+		   they are acceptable */
+		p->jointcapability = newjointcapability;                /* Our joint codec profile for this call */
+		p->peercapability = newpeercapability;                  /* The other sides capability in latest offer */
+		p->jointnoncodeccapability = newnoncodeccapability;     /* DTMF capabilities */
+	
+		/* respond with single most preferred joint codec, limiting the other side's choice */
+		if (ast_test_flag(&p->flags[1], SIP_PAGE2_PREFERRED_CODEC)) {
+			p->jointcapability = ast_codec_choose(&p->prefs, p->jointcapability, 1);
+		}
 	}
 
 	/* Setup audio address and port */




More information about the asterisk-commits mailing list