[Asterisk-cvs] asterisk/channels chan_sip.c,1.761,1.762

kpfleming at lists.digium.com kpfleming at lists.digium.com
Fri Jun 17 11:02:41 CDT 2005


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv32022/channels

Modified Files:
	chan_sip.c 
Log Message:
don't generate 'rport' unless RFC3581 support is enabled (bug #4533)


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.761
retrieving revision 1.762
diff -u -d -r1.761 -r1.762
--- chan_sip.c	17 Jun 2005 13:29:04 -0000	1.761
+++ chan_sip.c	17 Jun 2005 15:03:56 -0000	1.762
@@ -828,7 +828,7 @@
 	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);




More information about the svn-commits mailing list