From d4833fac43c45f015b0f7af427d7f854c16e8643 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 3 Jan 2017 18:32:26 -0600 Subject: [PATCH] FS-9206: [mod_sofia] proxy media with enable-3pcc=proxy does not properly pass audio after 3pcc re-invite #resolve --- src/mod/endpoints/mod_sofia/mod_sofia.c | 9 +++++---- src/mod/endpoints/mod_sofia/sofia.c | 4 ++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 2de18e4b6f..54e9d7626b 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -664,14 +664,15 @@ static switch_status_t sofia_answer_channel(switch_core_session_t *session) b_sdp = switch_channel_get_variable(channel, SWITCH_B_SDP_VARIABLE); switch_core_media_set_local_sdp(session, b_sdp, SWITCH_TRUE); - switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, - "3PCC-PROXY nomedia - sending ack, SDP:\n%s\n", tech_pvt->mparams.local_sdp_str); - if (switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MEDIA)) { - switch_core_media_patch_sdp(tech_pvt->session); + switch_core_media_patch_sdp(tech_pvt->session); switch_core_media_proxy_remote_addr(tech_pvt->session, NULL); } + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, + "3PCC-PROXY nomedia - sending ack, SDP:\n%s\n", tech_pvt->mparams.local_sdp_str); + + if (sofia_use_soa(tech_pvt)) { nua_ack(tech_pvt->nh, TAG_IF(!zstr(tech_pvt->user_via), SIPTAG_VIA_STR(tech_pvt->user_via)), diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 848c158eea..ba6ef2a929 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -1636,9 +1636,13 @@ static void our_sofia_event_callback(nua_event_t event, if (switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MEDIA) && r_sdp) { if (sofia_test_pflag(tech_pvt->profile, PFLAG_3PCC_PROXY)) { + switch_channel_set_variable_partner(tech_pvt->channel, SWITCH_B_SDP_VARIABLE, r_sdp); + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "3PCC-PROXY, Got my ACK\n"); + switch_core_media_proxy_remote_addr(tech_pvt->session, r_sdp); sofia_set_flag(tech_pvt, TFLAG_3PCC_HAS_ACK); sofia_clear_flag(tech_pvt, TFLAG_PASS_ACK); + } }