Revision
14200
Author
mikej
Date
2009-07-10 14:22:39 -0500 (Fri, 10 Jul 2009)

Log Message

always send user in 200 ok

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (14199 => 14200)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-07-10 17:18:02 UTC (rev 14199)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-07-10 19:22:39 UTC (rev 14200)
@@ -1754,12 +1754,6 @@
 						} 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 @@
 							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 @@
 		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 @@
 				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,