From 176990570912ba5232cf476a313a51e1894f5000 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 10 Apr 2017 15:27:05 -0500 Subject: [PATCH] FS-10222: [freeswitch-core] add disable_audio_jb_during_passthru and disable_video_jb_during_passthru (cherry pick of aaa26c6 was messed up in git so ported manually) --- src/switch_core_media.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/switch_core_media.c b/src/switch_core_media.c index 397b71e2de..7a76ddb1ef 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -12042,10 +12042,15 @@ SWITCH_DECLARE(void) switch_core_session_passthru(switch_core_session_t *session if (switch_rtp_ready(engine->rtp_session)) { - if (on) { - switch_rtp_set_flag(engine->rtp_session, SWITCH_RTP_FLAG_PASSTHRU); - } else { - switch_rtp_clear_flag(engine->rtp_session, SWITCH_RTP_FLAG_PASSTHRU); + char var[50] = ""; + switch_snprintf(var, sizeof(var), "disable_%s_jb_during_passthru", type2str(type)); + + if (switch_channel_var_true(session->channel, var)) { + if (on) { + switch_rtp_set_flag(engine->rtp_session, SWITCH_RTP_FLAG_PASSTHRU); + } else { + switch_rtp_clear_flag(engine->rtp_session, SWITCH_RTP_FLAG_PASSTHRU); + } } if (type == SWITCH_MEDIA_TYPE_VIDEO) {