Revision
14304
Author
anthm
Date
2009-07-20 19:11:03 -0500 (Mon, 20 Jul 2009)

Log Message

do not auto-set from-domain

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (14303 => 14304)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-07-20 23:33:39 UTC (rev 14303)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-07-21 00:11:03 UTC (rev 14304)
@@ -1377,10 +1377,6 @@
 				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 @@
 			}
 
 			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;