]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[Core] Fixed issue while setting mode on reinvite or outbound direction
authorsurendrasignalwire <56929670+surendrasignalwire@users.noreply.github.com>
Wed, 22 Jul 2020 21:30:31 +0000 (03:00 +0530)
committerAndrey Volk <andywolk@gmail.com>
Tue, 16 Mar 2021 20:13:49 +0000 (23:13 +0300)
src/switch_core_media.c

index 674c5b92f989a10c10f6f0936065fed91f8b9703..4778edbf8cbeaf8aba4a6d10ffccf645a8c0eecb 100644 (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);
                }