Revision
14344
Author
brian
Date
2009-07-24 09:33:46 -0500 (Fri, 24 Jul 2009)

Log Message

 doh these are backwards. (SFSIP-167)

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (14343 => 14344)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	2009-07-24 14:22:38 UTC (rev 14343)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	2009-07-24 14:33:46 UTC (rev 14344)
@@ -2646,7 +2646,10 @@
 		}
 
 		if (!strchr(dest, '@')) {
-			tech_pvt->dest = switch_core_session_sprintf(nsession, "sip:%s@%s", dest, sofia_glue_strip_proto(gateway_ptr->register_proxy));
+			tech_pvt->dest = switch_core_session_sprintf(nsession, "sip:%s@%s", dest, 
+														 gateway_ptr->outbound_sticky_proxy ? 
+														 sofia_glue_strip_proto(gateway_ptr->outbound_sticky_proxy) :
+														 sofia_glue_strip_proto(gateway_ptr->register_proxy));
 		} else {
 			tech_pvt->dest = switch_core_session_sprintf(nsession, "sip:%s", dest);
 		}

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


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-07-24 14:22:38 UTC (rev 14343)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-07-24 14:33:46 UTC (rev 14344)
@@ -1380,17 +1380,17 @@
 			
 			if (!switch_strlen_zero(register_proxy)) {
 				if (strncasecmp(register_proxy, "sip:", 4) && strncasecmp(register_proxy, "sips:", 5)) {
-					gateway->outbound_sticky_proxy = switch_core_sprintf(gateway->pool, "sip:%s", register_proxy);
+					gateway->register_sticky_proxy = switch_core_sprintf(gateway->pool, "sip:%s", outbound_proxy);
 				} else {
-					gateway->outbound_sticky_proxy = switch_core_strdup(gateway->pool, register_proxy);
+					gateway->register_sticky_proxy = switch_core_strdup(gateway->pool, outbound_proxy);
 				}
 			}
 
 			if (!switch_strlen_zero(outbound_proxy)) {
 				if (strncasecmp(outbound_proxy, "sip:", 4) && strncasecmp(outbound_proxy, "sips:", 5)) {
-					gateway->register_sticky_proxy = switch_core_sprintf(gateway->pool, "sip:%s", outbound_proxy);
+					gateway->outbound_sticky_proxy = switch_core_sprintf(gateway->pool, "sip:%s", register_proxy);
 				} else {
-					gateway->register_sticky_proxy = switch_core_strdup(gateway->pool, outbound_proxy);
+					gateway->outbound_sticky_proxy = switch_core_strdup(gateway->pool, register_proxy);
 				}
 			}