From a14dcfef3d4520b8c2d92b3a22832a86da4ae153 Mon Sep 17 00:00:00 2001 From: Brian West Date: Tue, 6 Feb 2018 14:25:29 -0600 Subject: [PATCH] FS-10913: [mod_sofia] ignore_early_media=ring_ready not transitioning #resolve --- src/mod/endpoints/mod_sofia/sofia.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index b50857b9d6..181e40485b 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -7300,7 +7300,9 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status, } else { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Remote SDP:\n%s\n", r_sdp); tech_pvt->mparams.remote_sdp_str = switch_core_session_strdup(session, r_sdp); - switch_channel_mark_pre_answered(channel); + if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) { + switch_channel_mark_pre_answered(channel); + } //if ((sofia_test_flag(tech_pvt, TFLAG_LATE_NEGOTIATION) || switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND)) { // switch_core_media_set_sdp_codec_string(session, r_sdp, status < 200 ? SDP_TYPE_REQUEST : SDP_TYPE_RESPONSE); //}