]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
always send user in 200 ok
authorMichael Jerris <mike@jerris.com>
Fri, 10 Jul 2009 19:22:39 +0000 (19:22 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 10 Jul 2009 19:22:39 +0000 (19:22 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14200 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia.c

index e1dedb33bd9d5e3402480b6a53a432c55846b30a..671be0bc31739273802a62d6fc265e861eda4858 100644 (file)
@@ -1754,12 +1754,6 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
                                                } else {
                                                        sofia_clear_pflag(profile, PFLAG_SUPPRESS_CNG);
                                                }
-                                       } else if (!strcasecmp(var, "NDLB-to-in-200-contact")) {
-                                               if (switch_true(val)) {
-                                                       profile->ndlb |= PFLAG_NDLB_TO_IN_200_CONTACT;
-                                               } else {
-                                                       profile->ndlb &= ~PFLAG_NDLB_TO_IN_200_CONTACT;
-                                               }
                                        } else if (!strcasecmp(var, "NDLB-broken-auth-hash")) {
                                                if (switch_true(val)) {
                                                        profile->ndlb |= PFLAG_NDLB_BROKEN_AUTH_HASH;
@@ -2374,10 +2368,6 @@ switch_status_t config_sofia(int reload, char *profile_name)
                                                        sofia_set_pflag(profile, PFLAG_SUPPRESS_CNG);
                                                        profile->cng_pt = 0;
                                                }
-                                       } else if (!strcasecmp(var, "NDLB-to-in-200-contact")) {
-                                               if (switch_true(val)) {
-                                                       profile->ndlb |= PFLAG_NDLB_TO_IN_200_CONTACT;
-                                               }
                                        } else if (!strcasecmp(var, "NDLB-broken-auth-hash")) {
                                                if (switch_true(val)) {
                                                        profile->ndlb |= PFLAG_NDLB_BROKEN_AUTH_HASH;
@@ -4814,7 +4804,7 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
                url_set_chanvars(session, sip->sip_to->a_url, sip_to);
                if (switch_channel_get_variable(channel, "sip_to_uri")) {
                        const char *ipv6;
-                       const char *url = NULL;
+                       const char *tmp, *at, *url = NULL;
                        
                        host = switch_channel_get_variable(channel, "sip_to_host");
                        user = switch_channel_get_variable(channel, "sip_to_user");
@@ -4846,15 +4836,12 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
                                url = (sofia_glue_transport_has_tls(transport)) ? profile->tls_url : profile->url;
                        }                       
                        
-                       if ((profile->ndlb & PFLAG_NDLB_TO_IN_200_CONTACT) || sofia_test_pflag(profile, PFLAG_MANAGE_SHARED_APPEARANCE)) {
-                               char *at;
-                               char *tmp = sofia_overcome_sip_uri_weakness(session, url, transport, SWITCH_TRUE, NULL);
-                               if ((at = strchr(tmp, '@'))) {
-                                       url = switch_core_session_sprintf(session, "sip:%s%s", user, at);
-                               }
+                       tmp = sofia_overcome_sip_uri_weakness(session, url, transport, SWITCH_TRUE, NULL);
+       
+                       if ((at = strchr(tmp, '@'))) {
+                               url = switch_core_session_sprintf(session, "sip:%s%s", user, at);
                        }
 
-
                        if (url) {
                                if (strchr(url, '>')) {
                                        tech_pvt->reply_contact = switch_core_session_sprintf(session, "%s;transport=%s", url,