From 0ab8cf0f7cd29958813eb8bef8c5eb20a8aa9452 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 19 Dec 2013 21:36:28 +0500 Subject: [PATCH] FS-6054 --- src/switch_core_media.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/switch_core_media.c b/src/switch_core_media.c index 56c8d72ad4..d77e430b83 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -3739,9 +3739,16 @@ SWITCH_DECLARE(int) switch_core_media_toggle_hold(switch_core_session_t *session if (!switch_media_handle_test_media_flag(smh, SCMF_DISABLE_RTP_AUTOADJ) && !((val = switch_channel_get_variable(session->channel, "disable_rtp_auto_adjust")) && switch_true(val)) && - !switch_channel_test_flag(session->channel, CF_WEBRTC) && a_engine->rtp_session) { + !switch_channel_test_flag(session->channel, CF_WEBRTC)) { /* Reactivate the NAT buster flag. */ - switch_rtp_set_flag(a_engine->rtp_session, SWITCH_RTP_FLAG_AUTOADJ); + + if (a_engine->rtp_session) { + switch_rtp_set_flag(a_engine->rtp_session, SWITCH_RTP_FLAG_AUTOADJ); + } + + if (v_engine->rtp_session) { + switch_rtp_set_flag(v_engine->rtp_session, SWITCH_RTP_FLAG_AUTOADJ); + } } switch_channel_clear_flag(session->channel, CF_PROTO_HOLD);