mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
FS-6230 --resolve There was no NAT detection enabled on the calls, this patch will activate it explicitly when used with force-rport to avoid a similar problem with other users
Conflicts: src/mod/endpoints/mod_sofia/sofia.c
This commit is contained in:
@@ -7839,6 +7839,8 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
|
||||
const char *from_tag = "";
|
||||
char *sql = NULL;
|
||||
char *acl_context = NULL;
|
||||
int broken_device = 0;
|
||||
|
||||
profile->ib_calls++;
|
||||
|
||||
|
||||
@@ -7867,7 +7869,13 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
|
||||
switch_channel_get_name(tech_pvt->channel), network_ip, network_port, SWITCH_VERSION_FULL_HUMAN);
|
||||
|
||||
|
||||
if (sofia_test_pflag(profile, PFLAG_AGGRESSIVE_NAT_DETECTION)) {
|
||||
if (profile->server_rport_level >= 2 && sip->sip_user_agent && sip->sip_user_agent->g_string &&
|
||||
(!strncasecmp(sip->sip_user_agent->g_string, "Polycom", 7) ||
|
||||
!strncasecmp(sip->sip_user_agent->g_string, "KIRK Wireless Server", 20) )) {
|
||||
broken_device = 1;
|
||||
}
|
||||
|
||||
if (sofia_test_pflag(profile, PFLAG_AGGRESSIVE_NAT_DETECTION) || broken_device) {
|
||||
if (sip && sip->sip_via) {
|
||||
const char *port = sip->sip_via->v_port;
|
||||
const char *host = sip->sip_via->v_host;
|
||||
|
||||
Reference in New Issue
Block a user