Author: kmoore
Date: Wed Oct  1 07:15:12 2014
New Revision: 424245

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=424245
Log:
PJSIP: Force transport on contact rewrite

If contact rewriting is enabled but the contact differs in transport
from what is actually being used, messages after the initial INVITE
transaction can be sent to an incorrect transport/port combination. In
the case where this bug occurred the remote party never received a BYE
since it was sent to the remote party's TCP port over UDP.

Review: https://reviewboard.asterisk.org/r/4032/
........

Merged revisions 424244 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    branches/13/   (props changed)
    branches/13/res/res_pjsip_nat.c

Propchange: branches/13/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: branches/13/res/res_pjsip_nat.c
URL: 
http://svnview.digium.com/svn/asterisk/branches/13/res/res_pjsip_nat.c?view=diff&rev=424245&r1=424244&r2=424245
==============================================================================
--- branches/13/res/res_pjsip_nat.c (original)
+++ branches/13/res/res_pjsip_nat.c Wed Oct  1 07:15:12 2014
@@ -46,6 +46,11 @@
                pjsip_dialog *dlg = pjsip_rdata_get_dlg(rdata);
 
                pj_cstr(&uri->host, rdata->pkt_info.src_name);
+               if (strcasecmp("udp", rdata->tp_info.transport->type_name)) {
+                       uri->transport_param = 
pj_str(rdata->tp_info.transport->type_name);
+               } else {
+                       uri->transport_param.slen = 0;
+               }
                uri->port = rdata->pkt_info.src_port;
 
                /* rewrite the session target since it may have already been 
pulled from the contact header */


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

Reply via email to