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:
Mike Jerris 2017-01-27 15:13:18 -06:00
parent 8b01c8cc1a
commit 722feefd56
1 changed files with 6 additions and 2 deletions

View File

@ -10042,8 +10042,12 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
char *last_acl = NULL;
const char *contact_host = NULL;
if (sip && sip->sip_contact) {
contact_host = sip->sip_contact->m_url->url_host;
if (sip) {
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)) {