[Freeswitch-trunk] [commit] r12408 - freeswitch/trunk/src/mod/endpoints/mod_sofia

FreeSWITCH SVN brian at freeswitch.org
Wed Mar 4 08:02:02 PST 2009


Author: brian
Date: Wed Mar  4 10:02:02 2009
New Revision: 12408

Log:
add sip_route_uri var to set proxy route

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	Wed Mar  4 10:02:02 2009
@@ -1296,7 +1296,7 @@
 			session_timeout = SOFIA_NAT_SESSION_TIMEOUT;
 			switch_channel_set_variable(channel, "sip_nat_detected", "true");
 		}
-
+		
 		/* TODO: We should use the new tags for making an rpid and add profile options to turn this on/off */
 		if (switch_test_flag(caller_profile, SWITCH_CPF_HIDE_NAME)) {
 			priv = "name";
@@ -1418,6 +1418,10 @@
 		route_uri = sofia_overcome_sip_uri_weakness(tech_pvt->session, route_uri, 0, SWITCH_TRUE, NULL);
 	}
 
+	if ((val = switch_channel_get_variable(channel, "sip_route_uri"))) {
+		route_uri = switch_core_session_strdup(session, val);
+		route = NULL;
+	}
 
 	if (route_uri) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Setting proxy route to %s\n", route_uri, switch_channel_get_name(channel));



More information about the Freeswitch-trunk mailing list