提交 64aaf4e9 authored 作者: Anthony Minessale's avatar Anthony Minessale

FSMOD-61

上级 520bc29d
...@@ -2989,6 +2989,9 @@ switch_status_t config_sofia(int reload, char *profile_name) ...@@ -2989,6 +2989,9 @@ switch_status_t config_sofia(int reload, char *profile_name)
if (ip) { if (ip) {
if (!strncasecmp(ip, "autonat:", 8)) { if (!strncasecmp(ip, "autonat:", 8)) {
profile->extrtpip = switch_core_strdup(profile->pool, ip + 8); profile->extrtpip = switch_core_strdup(profile->pool, ip + 8);
if (zstr(profile->extsipip)) {
profile->extsipip = switch_core_strdup(profile->pool, profile->extrtpip);
}
sofia_set_pflag(profile, PFLAG_AUTO_NAT); sofia_set_pflag(profile, PFLAG_AUTO_NAT);
} else { } else {
profile->extrtpip = switch_core_strdup(profile->pool, ip); profile->extrtpip = switch_core_strdup(profile->pool, ip);
......
...@@ -1744,18 +1744,18 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session) ...@@ -1744,18 +1744,18 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
} }
} }
if (!rpid_domain) {
rpid_domain = "cluecon.com";
}
if (sofia_test_pflag(tech_pvt->profile, PFLAG_AUTO_NAT)) { if (sofia_test_pflag(tech_pvt->profile, PFLAG_AUTO_NAT)) {
if (!zstr(tech_pvt->remote_ip) && sofia_glue_check_nat(tech_pvt->profile, tech_pvt->remote_ip)) { if (!zstr(tech_pvt->remote_ip) && !zstr(profile->extsipip) && sofia_glue_check_nat(tech_pvt->profile, tech_pvt->remote_ip)) {
rpid_domain = tech_pvt->profile->extsipip; rpid_domain = tech_pvt->profile->extsipip;
} else { } else {
rpid_domain = tech_pvt->profile->sipip; rpid_domain = tech_pvt->profile->sipip;
} }
} }
if (zstr(rpid_domain)) {
rpid_domain = "cluecon.com";
}
/* /*
* Ignore transport chanvar and uri parameter for gateway connections * Ignore transport chanvar and uri parameter for gateway connections
* since all of them have been already taken care of in mod_sofia.c:sofia_outgoing_channel() * since all of them have been already taken care of in mod_sofia.c:sofia_outgoing_channel()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论