]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-6230 --resolve There was no NAT detection enabled on the calls, this patch will...
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 14 Feb 2014 18:50:17 +0000 (23:50 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 14 Feb 2014 18:52:13 +0000 (23:52 +0500)
Conflicts:
src/mod/endpoints/mod_sofia/sofia.c

src/mod/endpoints/mod_sofia/sofia.c
src/mod/endpoints/mod_sofia/sofia_reg.c

index 45b7838768b5ff9fd9d1eb0e16248575efa3cafc..b8e8868c34c985e51ed4d1c6b86c4eb2406e449a 100644 (file)
@@ -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;
index 2cc52aa34b636f5d0c7f27f1e71d37a3eb63bb7e..d59362cbf35a29a6fb01b10693e868a67fa724c8 100644 (file)
@@ -1363,7 +1363,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
                                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 &&
                                ( !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) {