From: Anthony Minessale Date: Tue, 21 Jul 2009 00:11:03 +0000 (+0000) Subject: do not auto-set from-domain X-Git-Tag: v1.0.4~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75c978812fb84603745c0d50d50624dd73cb4875;p=thirdparty%2Ffreeswitch.git do not auto-set from-domain git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14304 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index cb370c55ee..c462f52b33 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -1377,10 +1377,6 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag) gateway->status = SOFIA_GATEWAY_UP; } - if (switch_strlen_zero(from_domain)) { - from_domain = realm; - } - if (switch_strlen_zero(auth_username)) { auth_username = username; } @@ -1437,7 +1433,8 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag) } gateway->register_url = switch_core_sprintf(gateway->pool, "sip:%s", proxy); - gateway->register_from = switch_core_sprintf(gateway->pool, "", from_user, from_domain, register_transport); + gateway->register_from = switch_core_sprintf(gateway->pool, "", + from_user, from_domain ? from_domain : proxy, register_transport); sipip = contact_host ? contact_host : profile->extsipip ? profile->extsipip : profile->sipip;