From b610495f0b09477095d25a1a35215891ff8b1930 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 10 Nov 2016 19:47:37 -0600 Subject: [PATCH] FS-9712 #resolve [3PCC-Proxy Missing SDP on Reinvite. ] --- src/mod/endpoints/mod_sofia/sofia.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index b1c0030358..b3553d9172 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -7483,7 +7483,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status, switch_channel_set_state(channel, CS_HIBERNATE); switch_core_media_gen_local_sdp(session, SDP_TYPE_REQUEST, NULL, 0, NULL, 0); sofia_set_flag_locked(tech_pvt, TFLAG_3PCC); - + if (sofia_use_soa(tech_pvt)) { nua_respond(tech_pvt->nh, SIP_200_OK, SIPTAG_CONTACT_STR(tech_pvt->profile->url), @@ -7520,8 +7520,15 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status, sofia_set_flag_locked(tech_pvt, TFLAG_NOSDP_REINVITE); if ((switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA)) && sofia_test_pflag(profile, PFLAG_3PCC_PROXY)) { sofia_set_flag_locked(tech_pvt, TFLAG_3PCC); + sofia_clear_flag(tech_pvt, TFLAG_ENABLE_SOA); + if (switch_core_session_get_partner(session, &other_session) == SWITCH_STATUS_SUCCESS) { switch_core_session_message_t *msg; + if (switch_core_session_compare(session, other_session)) { + private_object_t *other_tech_pvt = switch_core_session_get_private(other_session); + sofia_clear_flag(other_tech_pvt, TFLAG_ENABLE_SOA); + } + msg = switch_core_session_alloc(other_session, sizeof(*msg)); msg->message_id = SWITCH_MESSAGE_INDICATE_MEDIA_REDIRECT; msg->from = __FILE__;