From d81ad8d01e754eb09c8ef36b0e346e84abd9e3e0 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Wed, 9 Apr 2008 19:16:14 +0000 Subject: [PATCH] fix transport= tag on re-invite (FSCORE-113) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8067 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia.c | 3 ++- src/mod/endpoints/mod_sofia/sofia_glue.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index cd6dada731..1aa681b472 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -2674,7 +2674,8 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_ transport_url = sip->sip_contact->m_url; } - transport = sofia_glue_url2transport(transport_url); + transport = sofia_glue_url2transport(transport_url); + tech_pvt->transport = transport; url_set_chanvars(session, sip->sip_to->a_url, sip_to); if (switch_channel_get_variable(channel, "sip_to_uri")) { diff --git a/src/mod/endpoints/mod_sofia/sofia_glue.c b/src/mod/endpoints/mod_sofia/sofia_glue.c index 1cc43f6365..ed2969eab4 100644 --- a/src/mod/endpoints/mod_sofia/sofia_glue.c +++ b/src/mod/endpoints/mod_sofia/sofia_glue.c @@ -952,7 +952,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session) * Ignore transport chanvar and uri parameter for gateway connections * since all of them have been already taken care of in mod_sofia.c:sofia_outgoing_channel() */ - if (switch_strlen_zero(tech_pvt->gateway_name)) { + if (tech_pvt->transport == SOFIA_TRANSPORT_UNKNOWN && switch_strlen_zero(tech_pvt->gateway_name)) { if ((p = (char *)switch_stristr("port=", url))) { p += 5; tech_pvt->transport = sofia_glue_str2transport( p );