From 2f7e984a31bdaec91c206953512c4e07595362db Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Fri, 17 Jun 2005 15:03:56 +0000 Subject: [PATCH] don't generate 'rport' unless RFC3581 support is enabled (bug #4533) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5931 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- 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 b47ec09814..1d94f8072a 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -828,7 +828,7 @@ static void build_via(struct sip_pvt *p, char *buf, int len) char iabuf[INET_ADDRSTRLEN]; /* z9hG4bK is a magic cookie. See RFC 3261 section 8.1.1.7 */ - if (ast_test_flag(p, SIP_NAT) != SIP_NAT_NEVER) + if (ast_test_flag(p, SIP_NAT) & SIP_NAT_RFC3581) snprintf(buf, len, "SIP/2.0/UDP %s:%d;branch=z9hG4bK%08x;rport", ast_inet_ntoa(iabuf, sizeof(iabuf), p->ourip), ourport, p->branch); else /* Work around buggy UNIDEN UIP200 firmware */ snprintf(buf, len, "SIP/2.0/UDP %s:%d;branch=z9hG4bK%08x", ast_inet_ntoa(iabuf, sizeof(iabuf), p->ourip), ourport, p->branch);