[Core] Fixed issue while setting mode on reinvite or outbound direction

This commit is contained in:
surendrasignalwire 2020-07-23 03:00:31 +05:30 committed by Andrey Volk
parent 167ab11006
commit b220a05010
1 changed files with 1 additions and 5 deletions

View File

@ -4815,11 +4815,7 @@ static void switch_core_media_set_rmode(switch_core_session_t *session, switch_m
if (switch_core_session_get_partner(session, &other_session) == SWITCH_STATUS_SUCCESS) {
if (!switch_channel_media_up(session->channel) && sdp_type == SDP_TYPE_REQUEST) {
engine->rmode = switch_core_session_remote_media_flow(other_session, type);
media_flow_get_mode(engine->rmode, &rmode_str, &opp_rmode);
} else if (sdp_type == SDP_TYPE_RESPONSE && (switch_channel_test_flag(other_session->channel, CF_REINVITE) || switch_channel_direction(session->channel) == SWITCH_CALL_DIRECTION_OUTBOUND)) {
if (sdp_type == SDP_TYPE_RESPONSE && (switch_channel_test_flag(other_session->channel, CF_REINVITE) || switch_channel_direction(session->channel) == SWITCH_CALL_DIRECTION_OUTBOUND)) {
switch_core_media_set_smode(other_session, type, rmode, sdp_type);
}