From a4d877c189b331ea47bf3a75745006d4d873eee6 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 21 Apr 2015 18:57:36 -0500 Subject: [PATCH] FS-7460: don't force ice in 3pcc-mode=proxy --- src/mod/endpoints/mod_sofia/mod_sofia.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 9b55414045..102ab0a238 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -647,7 +647,6 @@ static switch_status_t sofia_answer_channel(switch_core_session_t *session) return SWITCH_STATUS_SUCCESS; } - b_sdp = switch_channel_get_variable(channel, SWITCH_B_SDP_VARIABLE); is_proxy = (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA)); is_3pcc = (sofia_test_pflag(tech_pvt->profile, PFLAG_3PCC_PROXY) && sofia_test_flag(tech_pvt, TFLAG_3PCC)); @@ -665,15 +664,16 @@ static switch_status_t sofia_answer_channel(switch_core_session_t *session) /* This if statement check and handles the 3pcc proxy mode */ if (is_3pcc) { - switch_channel_set_flag(channel, CF_3PCC); + if (!(sofia_test_pflag(tech_pvt->profile, PFLAG_3PCC_PROXY))) { + switch_channel_set_flag(channel, CF_3PCC); + } - if(!is_proxy) { - switch_core_media_prepare_codecs(tech_pvt->session, SWITCH_TRUE); - tech_pvt->mparams.local_sdp_str = NULL; + if (!is_proxy) { + switch_core_media_prepare_codecs(tech_pvt->session, SWITCH_TRUE); + tech_pvt->mparams.local_sdp_str = NULL; - switch_core_media_choose_port(tech_pvt->session, SWITCH_MEDIA_TYPE_AUDIO, 0); - switch_core_session_set_ice(session); - switch_core_media_gen_local_sdp(session, SDP_TYPE_RESPONSE, NULL, 0, NULL, 0); + switch_core_media_choose_port(tech_pvt->session, SWITCH_MEDIA_TYPE_AUDIO, 0); + switch_core_media_gen_local_sdp(session, SDP_TYPE_RESPONSE, NULL, 0, NULL, 0); } else { switch_core_media_set_local_sdp(session, b_sdp, SWITCH_TRUE);