From 395cdbe4bf80dbcf36df0e47ec87f0d22af370dd Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 14 Dec 2007 14:09:25 +0000 Subject: [PATCH] avoid blank port git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6788 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 3f8316bcab..2c685d7a95 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -1654,15 +1654,19 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t 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,