[asterisk-commits] kmoore: trunk r344771 - in /trunk: ./ channels/chan_sip.c

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


Author: kmoore
Date: Fri Nov 11 14:15:16 2011
New Revision: 344771

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=344771
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.
........

Merged revisions 344769 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 344770 from http://svn.asterisk.org/svn/asterisk/branches/10

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=344771&r1=344770&r2=344771
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Nov 11 14:15:16 2011
@@ -9290,15 +9290,18 @@
 			    ast_rtp_lookup_mime_multiple2(s3, NULL, newnoncodeccapability, 0, 0));
 	}
 
-	/* We are now ready to change the sip session and p->rtp and p->vrtp with the offered codecs, since
-	   they are acceptable */
-	ast_format_cap_copy(p->jointcaps, newjointcapability);                /* Our joint codec profile for this call */
-	ast_format_cap_copy(p->peercaps, newpeercapability);                  /* The other sides capability in latest offer */
-	p->jointnoncodeccapability = newnoncodeccapability;     /* DTMF capabilities */
-
-	if (ast_test_flag(&p->flags[1], SIP_PAGE2_PREFERRED_CODEC)) { /* respond with single most preferred joint codec, limiting the other side's choice */
-		ast_codec_choose(&p->prefs, p->jointcaps, 1, &tmp_fmt);
-		ast_format_cap_set(p->jointcaps, &tmp_fmt);
+	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 */
+		ast_format_cap_copy(p->jointcaps, newjointcapability);                /* Our joint codec profile for this call */
+		ast_format_cap_copy(p->peercaps, 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)) {
+			ast_codec_choose(&p->prefs, p->jointcaps, 1, &tmp_fmt);
+			ast_format_cap_set(p->jointcaps, &tmp_fmt);
+		}
 	}
 
 	/* Setup audio address and port */




More information about the asterisk-commits mailing list