FS-9241 Use tls_public_url instead of tls_url in INVITE Contact when NAT is detected

This commit is contained in:
François committed 2016-07-05 17:15:04 +02:00
1 parent 7f623fc0c8
commit 78c2ed0526
3 files changed
+31 -17

No files matched your search

+2 -8
View File
@@ -10046,11 +10046,9 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
user, ipv6 ? "[" : "", host, ipv6 ? "]" : "", port, sofia_glue_transport2str(transport));
if (sofia_glue_check_nat(profile, tech_pvt->mparams.remote_ip)) {
url = (sofia_glue_transport_has_tls(transport)) ? profile->tls_public_url : profile->public_url;
check_nat = 1;
} else {
url = (sofia_glue_transport_has_tls(transport)) ? profile->tls_url : profile->url;
}
url = sofia_glue_get_profile_url(profile, tech_pvt->mparams.remote_ip, transport);
if (!url) {
if (check_nat) {
@@ -10085,11 +10083,7 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
} else {
const char *url = NULL;
if (sofia_glue_check_nat(profile, tech_pvt->mparams.remote_ip)) {
url = (sofia_glue_transport_has_tls(transport)) ? profile->tls_public_url : profile->public_url;
} else {
url = (sofia_glue_transport_has_tls(transport)) ? profile->tls_url : profile->url;
}
url = sofia_glue_get_profile_url(profile, tech_pvt->mparams.remote_ip, transport);
if (url) {
const char *brackets = NULL;