]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
do not auto-set from-domain
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 21 Jul 2009 00:11:03 +0000 (00:11 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 21 Jul 2009 00:11:03 +0000 (00:11 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14304 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia.c

index cb370c55eee099ec62009d4d6088534e3b12e7d7..c462f52b3310527dd16c93cf0ab84fa9e9904edc 100644 (file)
@@ -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, "<sip:%s@%s;transport=%s>", from_user, from_domain, register_transport);
+                       gateway->register_from = switch_core_sprintf(gateway->pool, "<sip:%s@%s;transport=%s>", 
+                                                                                                                from_user, from_domain ? from_domain : proxy, register_transport);
 
                        sipip = contact_host ? contact_host : profile->extsipip ?  profile->extsipip : profile->sipip;