From: Brian West Date: Tue, 23 Jun 2009 19:38:14 +0000 (+0000) Subject: addition register_proxy issues X-Git-Tag: v1.0.4~367 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=984d2f9dd1b3a7c73d56e31b41d7468f341aabac;p=thirdparty%2Ffreeswitch.git addition register_proxy issues git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13914 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index fae5deac67..c1ee729f68 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -1395,11 +1395,11 @@ 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, proxy + 4); + gateway->register_proxy = switch_core_strdup(gateway->pool, register_proxy ? register_proxy : proxy); + gateway->register_to = switch_core_sprintf(gateway->pool, "sip:%s@%s", username, register_proxy ? register_proxy + 4 : proxy + 4); } else { - gateway->register_proxy = switch_core_sprintf(gateway->pool, "sip:%s", proxy); - gateway->register_to = switch_core_sprintf(gateway->pool, "sip:%s@%s", username, proxy); + gateway->register_proxy = switch_core_sprintf(gateway->pool, "sip:%s", register_proxy ? register_proxy : proxy); + gateway->register_to = switch_core_sprintf(gateway->pool, "sip:%s@%s", username, register_proxy ? register_proxy : proxy); } gateway->expires_str = switch_core_strdup(gateway->pool, expire_seconds);