From e3a2e3d41d637df1bbdcb98adfa6f6d6bd419839 Mon Sep 17 00:00:00 2001 From: Brian West Date: Tue, 14 Jul 2009 20:56:09 +0000 Subject: [PATCH] cleanup since from_domain is now in the gateway and will default to proxy , realm or from-domain if set properly. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14253 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/mod_sofia.c | 2 +- src/mod/endpoints/mod_sofia/sofia.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 6ce5e9cf08..a6c71ad791 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -2646,7 +2646,7 @@ 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->from_domain); } 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 7a272d4d51..ac05244b74 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -1443,10 +1443,10 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag) if (!strncasecmp(proxy, "sip:", 4)) { gateway->register_proxy = switch_core_strdup(gateway->pool, proxy); - gateway->register_to = switch_core_sprintf(gateway->pool, "sip:%s@%s", username, register_proxy ? register_proxy + 4 : proxy + 4); + gateway->register_to = switch_core_sprintf(gateway->pool, "sip:%s@%s", username, from_domain); } else { gateway->register_proxy = switch_core_sprintf(gateway->pool, "sip:%s", proxy); - gateway->register_to = switch_core_sprintf(gateway->pool, "sip:%s@%s", username, register_proxy ? register_proxy : proxy); + gateway->register_to = switch_core_sprintf(gateway->pool, "sip:%s@%s", username, from_domain); } gateway->expires_str = switch_core_strdup(gateway->pool, expire_seconds);