From: Matthew Nicholson Date: Thu, 19 Aug 2010 19:44:00 +0000 (+0000) Subject: Merged revisions 277944 via svnmerge from X-Git-Tag: 1.6.2.12-rc1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3bede4744c31e7ade23d7e878035f6c1d839c86;p=thirdparty%2Fasterisk.git Merged revisions 277944 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r277944 | pabelanger | 2010-07-19 15:56:07 -0500 (Mon, 19 Jul 2010) | 16 lines Regression with T.38 negotiation Prior to 1.4.26.3 T.38 negotiation worked properly, in the case of the reporter. (issue #16852) Reported by: cfc (closes issue #16705) Reported by: mpiazzatnetbug Patches: issue16705_2.diff uploaded by ebroad (license 878) Tested by: vrban, ebroad, c0rnoTa, samdell3 Review: https://reviewboard.asterisk.org/r/754/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@282859 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 9c4bf92b8b..ede20dec68 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -8130,10 +8130,10 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action int vportno = -1; /*!< RTP Video port number */ int tportno = -1; /*!< RTP Text port number */ int udptlportno = -1; /*!< UDPTL Image port number */ - struct sockaddr_in sin; /*!< media socket address */ - struct sockaddr_in vsin; /*!< video socket address */ - struct sockaddr_in isin; /*!< image socket address */ - struct sockaddr_in tsin; /*!< text socket address */ + struct sockaddr_in sin = { 0, }; /*!< media socket address */ + struct sockaddr_in vsin = { 0, }; /*!< video socket address */ + struct sockaddr_in isin = { 0, }; /*!< image socket address */ + struct sockaddr_in tsin = { 0, }; /*!< text socket address */ /* Peer capability is the capability in the SDP, non codec is RFC2833 DTMF (101) */ int peercapability = 0, peernoncodeccapability = 0; @@ -8648,7 +8648,10 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action ast_set_write_format(p->owner, p->owner->writeformat); } - if (ast_test_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD) && sin.sin_addr.s_addr && (!sendonly || sendonly == -1)) { + if (ast_test_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD) + && (sin.sin_addr.s_addr || vsin.sin_addr.s_addr || + isin.sin_addr.s_addr || tsin.sin_addr.s_addr) + && (!sendonly || sendonly == -1)) { ast_queue_control(p->owner, AST_CONTROL_UNHOLD); /* Activate a re-invite */ ast_queue_frame(p->owner, &ast_null_frame); @@ -8664,7 +8667,9 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action if (sip_cfg.notifyhold) sip_peer_hold(p, FALSE); ast_clear_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD); /* Clear both flags */ - } else if (!sin.sin_addr.s_addr || (sendonly && sendonly != -1)) { + } else if (!(sin.sin_addr.s_addr || vsin.sin_addr.s_addr || + isin.sin_addr.s_addr || tsin.sin_addr.s_addr) + || (sendonly && sendonly != -1)) { int already_on_hold = ast_test_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD); ast_queue_control_data(p->owner, AST_CONTROL_HOLD, S_OR(p->mohsuggest, NULL),