Revision
14253
Author
brian
Date
2009-07-14 15:56:09 -0500 (Tue, 14 Jul 2009)

Log Message

 cleanup since from_domain is now in the gateway and will default to proxy , realm or from-domain if set properly.

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (14252 => 14253)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	2009-07-14 20:48:53 UTC (rev 14252)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	2009-07-14 20:56:09 UTC (rev 14253)
@@ -2646,7 +2646,7 @@
 		}
 
 		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);
 		}

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


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-07-14 20:48:53 UTC (rev 14252)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-07-14 20:56:09 UTC (rev 14253)
@@ -1443,10 +1443,10 @@
 			
 			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);