From dbbaa2fc477bcb770c4027b3972da62d6e7a6029 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 10 Jul 2009 19:22:39 +0000 Subject: [PATCH] always send user in 200 ok git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14200 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index e1dedb33bd..671be0bc31 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -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,