From ab0e67ccec4319f6693454fb150632d619173e96 Mon Sep 17 00:00:00 2001 From: Brian West Date: Fri, 24 Jul 2009 14:33:46 +0000 Subject: [PATCH] doh these are backwards. (SFSIP-167) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14344 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/mod_sofia.c | 5 ++++- src/mod/endpoints/mod_sofia/sofia.c | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index e3b7afe23b..af14b5da55 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -2646,7 +2646,10 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session } 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); } diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 16588d9f64..4e9cef37d3 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -1380,17 +1380,17 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag) 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); } }