Revision
15332
Author
brian
Date
2009-11-03 12:26:09 -0600 (Tue, 03 Nov 2009)

Log Message

 doing carot dialing to a location without a gateway will result in the host being null in some cases this will not allow that if you specify the full sip:dest@host it works fine but if you only specify the number then host will be null

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (15331 => 15332)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	2009-11-03 17:57:44 UTC (rev 15331)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	2009-11-03 18:26:09 UTC (rev 15332)
@@ -3049,7 +3049,7 @@
 		if (strchr(dest_to, '@')) {
 			tech_pvt->dest_to = switch_core_session_sprintf(nsession, "sip:%s", dest_to);
 		} else {
-			tech_pvt->dest_to = switch_core_session_sprintf(nsession, "sip:%s@%s", dest_to, host);
+			tech_pvt->dest_to = switch_core_session_sprintf(nsession, "sip:%s@%s", dest_to, host ? host : profile->sipip);
 		}
 	}