From e2271ffc337b97e49cbdf0b8f8737563eafeb0f6 Mon Sep 17 00:00:00 2001 From: jrose Date: Tue, 14 Jun 2011 16:47:18 +0000 Subject: [PATCH] Merged revisions 323371 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r323371 | jrose | 2011-06-14 11:38:43 -0500 (Tue, 14 Jun 2011) | 12 lines Changes contact use in build_peer to use the FORCE_RPORT flag instead of RPORT_PRESENT It turned out that this was causing NAT=Yes to always use rport when present which was against 1.6.2 behavior and the check itself was redundant since the only way this segment of code could be reached was if RPORT_PRESENT was already evaluated as true earlier. (closes issue ASTERISK-17789) Reported by: byronclark Patches: use_sip_nat_force_rport.patch uploaded by byronclark (license 1200) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@323372 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_sip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 4f00acf4f..92b2f3d8a 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -27382,7 +27382,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str * specified, use that address instead. */ /* XXX May need to revisit the final argument; does the realtime DB store whether * the original contact was over TLS or not? XXX */ - if (!ast_test_flag(&peer->flags[0], SIP_NAT_RPORT_PRESENT) || ast_sockaddr_isnull(&peer->addr)) { + if (!ast_test_flag(&peer->flags[0], SIP_NAT_FORCE_RPORT) || ast_sockaddr_isnull(&peer->addr)) { __set_address_from_contact(fullcontact->str, &peer->addr, 0); } }