]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix regression introduced by SDP fixups
authorKinsey Moore <kmoore@digium.com>
Fri, 11 Nov 2011 20:10:58 +0000 (20:10 +0000)
committerKinsey Moore <kmoore@digium.com>
Fri, 11 Nov 2011 20:10:58 +0000 (20:10 +0000)
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.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@344769 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index bdf948ace8ca0534382aadf732bb1aecde71d1e0..aaf71567e26b996bcf34dc4a3620984a370351e8 100644 (file)
@@ -9093,15 +9093,17 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action
                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 */