[Freeswitch-branches] [commit] r13584 - freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia
FreeSWITCH SVN
brian at freeswitch.org
Wed Jun 3 12:17:12 PDT 2009
Author: brian
Date: Wed Jun 3 14:17:11 2009
New Revision: 13584
Log:
enable AUTO_NAT flag when you set ext-rtp-ip or ext-sip-ip
Modified:
freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia/sofia.c
Modified: freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia/sofia.c (original)
+++ freeswitch/branches/brian/trunk/src/mod/endpoints/mod_sofia/sofia.c Wed Jun 3 14:17:11 2009
@@ -2186,10 +2186,10 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid IP 0.0.0.0 replaced with %s\n", mod_sofia_globals.guess_ip);
} else if (!strcasecmp(val, "auto-nat")) {
ip = mod_sofia_globals.auto_nat ? switch_core_get_variable("nat_public_addr") : mod_sofia_globals.guess_ip;
- sofia_set_pflag(profile, PFLAG_AUTO_NAT);
} else {
ip = strcasecmp(val, "auto") ? val : mod_sofia_globals.guess_ip;
}
+ sofia_set_pflag(profile, PFLAG_AUTO_NAT);
profile->extrtpip = switch_core_strdup(profile->pool, ip);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid ext-rtp-ip\n");
@@ -2224,7 +2224,6 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid IP 0.0.0.0 replaced with %s\n", mod_sofia_globals.guess_ip);
} else if (!strcasecmp(val, "auto-nat")) {
ip = mod_sofia_globals.auto_nat ? switch_core_get_variable("nat_public_addr") : mod_sofia_globals.guess_ip;
- sofia_set_pflag(profile, PFLAG_AUTO_NAT);
} else if (strcasecmp(val, "auto")) {
switch_port_t port = 0;
if (sofia_glue_ext_address_lookup(profile, NULL, &myip, &port, val, profile->pool) == SWITCH_STATUS_SUCCESS) {
@@ -2233,6 +2232,7 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to get external ip.\n");
}
}
+ sofia_set_pflag(profile, PFLAG_AUTO_NAT);
profile->extsipip = switch_core_strdup(profile->pool, ip);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid ext-sip-ip\n");
More information about the Freeswitch-branches
mailing list