Revision
15870
Author
brian
Date
2009-12-10 08:40:47 -0600 (Thu, 10 Dec 2009)

Log Message

 these two cases do not need to be on IF the flag is set otherwise you can't LIE about the contact dyanmically.  These are the TWO cases that had a not PFLAG_AUTO_NAT else do the right thing in this case.

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (15869 => 15870)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-12-10 07:39:40 UTC (rev 15869)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-12-10 14:40:47 UTC (rev 15870)
@@ -3074,6 +3074,7 @@
 				if (!profile->sipdomain) {
 					profile->sipdomain = switch_core_strdup(profile->pool, profile->sipip);
 				}
+
 				if (profile->extsipip) {
 					char *ipv6 = strchr(profile->extsipip, ':');
 					profile->public_url = switch_core_sprintf(profile->pool,
@@ -3085,7 +3086,7 @@
 															  profile->sip_port);
 				}
 
-				if (profile->extsipip) {
+				if (profile->extsipip && !sofia_test_pflag(profile, PFLAG_AUTO_NAT)) {
 					char *ipv6 = strchr(profile->extsipip, ':');
 					profile->url = switch_core_sprintf(profile->pool,
 														"sip:%s@%s%s%s:%d",
@@ -3137,7 +3138,7 @@
 																  profile->tls_sip_port);
 					}
 					
-					if (profile->extsipip) {
+					if (profile->extsipip && !sofia_test_pflag(profile, PFLAG_AUTO_NAT)) {
 						char *ipv6 = strchr(profile->extsipip, ':');
 						profile->tls_url = 
 							switch_core_sprintf(profile->pool,