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

Freeswitch SVN anthm at freeswitch.org
Fri Dec 14 09:09:26 EST 2007


Author: anthm
Date: Fri Dec 14 09:09:25 2007
New Revision: 6788

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

Log:
avoid blank port

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	Fri Dec 14 09:09:25 2007
@@ -1654,15 +1654,19 @@
 							switch_call_cause_t cause = SWITCH_CAUSE_NORMAL_CLEARING;
 							uint32_t timeout = 60;
 							char *tuuid_str;
+							const char *port = refer_to->r_url->url_port;
 
+							if (switch_strlen_zero(port)) {
+								port = "5060";
+							}
 							channel = switch_core_session_get_channel(a_session);
-
+							
 							exten = switch_mprintf("sofia/%s/%s@%s:%s",
 												   profile->name,
 												   refer_to->r_url->url_user,
 												   refer_to->r_url->url_host,
-												   refer_to->r_url->url_port);
-
+												   port);
+							
 							switch_channel_set_variable(channel, SOFIA_REPLACES_HEADER, rep);
 
 							if (switch_ivr_originate(a_session,



More information about the Freeswitch-svn mailing list