[Freeswitch-svn] [commit] r5717 - freeswitch/trunk/src/mod/endpoints/mod_sofia

Freeswitch SVN anthm at freeswitch.org
Wed Sep 19 13:05:52 EDT 2007


Author: anthm
Date: Wed Sep 19 13:05:52 2007
New Revision: 5717

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c

Log:
back out patch we don't need

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	Wed Sep 19 13:05:52 2007
@@ -501,7 +501,6 @@
 				*expire_seconds = "3600",
 				*retry_seconds = "30",
 				*from_domain = "",
-				*to_domain = "",
 				*register_proxy = NULL;
 			
 			gateway->pool = profile->pool;
@@ -538,8 +537,6 @@
 					retry_seconds = val;
 				} else if (!strcmp(var, "from-domain")) {
 					from_domain = val;
-				} else if (!strcmp(var, "to-domain")) {
-					to_domain = val;
 				} else if (!strcmp(var, "register-proxy")) {
 					register_proxy = val;
 				}
@@ -579,10 +576,6 @@
 				register_proxy = proxy;
 			}
 
-			if (switch_strlen_zero(to_domain)) {
-				to_domain = proxy;
-			}
-
 			gateway->retry_seconds = atoi(retry_seconds);
 			if (gateway->retry_seconds < 10) {
 				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "INVALID: retry_seconds correcting the value to 30\n");
@@ -600,14 +593,17 @@
 			gateway->register_from = switch_core_sprintf(gateway->pool, "sip:%s@%s", username, from_domain);
 			gateway->register_contact = switch_core_sprintf(gateway->pool, "sip:%s@%s:%d", extension,
 															profile->extsipip ? profile->extsipip : profile->sipip, profile->sip_port);
-			
-			if (!strncasecmp(to_domain, "sip:", 4)) {
-				gateway->register_proxy = switch_core_strdup(gateway->pool, proxy);
-				gateway->register_to = switch_core_sprintf(gateway->pool, "sip:%s@%s", username, to_domain + 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, to_domain);
-			}
+
+
+			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);
+            } 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->expires_str = switch_core_strdup(gateway->pool, expire_seconds);
 



More information about the Freeswitch-svn mailing list