提交 b3c02a54 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-6230 --resolve There was no NAT detection enabled on the calls, this patch…

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
上级 2fab561c
...@@ -7967,6 +7967,7 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia ...@@ -7967,6 +7967,7 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
char *sql = NULL; char *sql = NULL;
char *acl_context = NULL; char *acl_context = NULL;
const char *r_sdp = NULL; const char *r_sdp = NULL;
int broken_device = 0;
profile->ib_calls++; profile->ib_calls++;
...@@ -8010,7 +8011,13 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia ...@@ -8010,7 +8011,13 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
} }
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) { if (sip && sip->sip_via) {
const char *port = sip->sip_via->v_port; const char *port = sip->sip_via->v_port;
const char *host = sip->sip_via->v_host; const char *host = sip->sip_via->v_host;
......
...@@ -1464,7 +1464,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand ...@@ -1464,7 +1464,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
to_user = force_user; to_user = force_user;
} }
if (profile->server_rport_level == 3 && sip->sip_user_agent && if (profile->server_rport_level >= 2 && sip->sip_user_agent &&
sip->sip_user_agent->g_string && 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) )) { ( !strncasecmp(sip->sip_user_agent->g_string, "Polycom", 7) || !strncasecmp(sip->sip_user_agent->g_string, "KIRK Wireless Server", 20) )) {
if (sip && sip->sip_via) { if (sip && sip->sip_via) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论