FS-9970: [mod_sofia] don't detect nat in cases when the contact is in the acl, but the packet actually came from a proxy. We need to check where we got the packet from as being a natted address instead of the contact in order to properly handle nat to our next hop
This commit is contained in:
parent
8b01c8cc1a
commit
722feefd56
|
@ -10042,8 +10042,12 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
|
||||||
char *last_acl = NULL;
|
char *last_acl = NULL;
|
||||||
const char *contact_host = NULL;
|
const char *contact_host = NULL;
|
||||||
|
|
||||||
if (sip && sip->sip_contact) {
|
if (sip) {
|
||||||
contact_host = sip->sip_contact->m_url->url_host;
|
if (sip->sip_via && sip->sip_via->v_host) {
|
||||||
|
contact_host = sip->sip_via->v_host;
|
||||||
|
} else if (sip->sip_contact) {
|
||||||
|
contact_host = sip->sip_contact->m_url->url_host;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!zstr(contact_host)) {
|
if (!zstr(contact_host)) {
|
||||||
|
|
Loading…
Reference in New Issue