From a223dd0236761f86d1c0bd9602564687ab394e52 Mon Sep 17 00:00:00 2001 From: Mike Jerris Date: Thu, 27 Aug 2015 11:42:29 -0500 Subject: [PATCH] FS-7135: [mod_sofia] fix response to re-invite with duplicate sdp (such as we get from seesion refresh) when soa is disabled to include an sdp. Fixes t.38 fax failure on session refresh --- src/mod/endpoints/mod_sofia/sofia.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index eca43106cb..9d60d0b386 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -6926,6 +6926,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status, su_home_t *home = NULL; switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "RECEIVED"); sofia_set_flag_locked(tech_pvt, TFLAG_READY); + if (switch_channel_get_state(channel) == CS_NEW) { switch_channel_set_state(channel, CS_INIT); } else { @@ -7053,6 +7054,11 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status, } nua_respond(tech_pvt->nh, SIP_200_OK, TAG_END()); goto done; + } else if (r_sdp && !sofia_use_soa(tech_pvt)) { + nua_respond(tech_pvt->nh, SIP_200_OK, + NUTAG_MEDIA_ENABLE(0), + SIPTAG_CONTACT_STR(tech_pvt->profile->url), + SIPTAG_CONTENT_TYPE_STR("application/sdp"), SIPTAG_PAYLOAD_STR(tech_pvt->mparams.local_sdp_str), TAG_END()); } else { ss_state = nua_callstate_completed; goto state_process;