sign this is a new option when you don't wanna use auto-nat but you wish to toggle the lies of the contact

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15916 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West 2009-12-11 20:48:01 +00:00
parent 3ed90c9bff
commit 2bae37ae96

View File

@ -2644,8 +2644,13 @@ switch_status_t config_sofia(int reload, char *profile_name)
sofia_clear_pflag(profile, PFLAG_AUTO_NAT); sofia_clear_pflag(profile, PFLAG_AUTO_NAT);
} }
if (ip) { if (ip) {
if (!strncasecmp(ip, "autonat:", 8)) {
profile->extrtpip = switch_core_strdup(profile->pool, ip + 8);
sofia_set_pflag(profile, PFLAG_AUTO_NAT);
} else {
profile->extrtpip = switch_core_strdup(profile->pool, ip); profile->extrtpip = switch_core_strdup(profile->pool, ip);
} }
}
} else { } else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid ext-rtp-ip\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid ext-rtp-ip\n");
} }
@ -2689,8 +2694,13 @@ switch_status_t config_sofia(int reload, char *profile_name)
} }
} }
if (ip) { if (ip) {
if (!strncasecmp(ip, "autonat:", 8)) {
profile->extsipip = switch_core_strdup(profile->pool, ip + 8);
sofia_set_pflag(profile, PFLAG_AUTO_NAT);
} else {
profile->extsipip = switch_core_strdup(profile->pool, ip); profile->extsipip = switch_core_strdup(profile->pool, ip);
} }
}
} else { } else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid ext-sip-ip\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid ext-sip-ip\n");
} }