]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10222: [freeswitch-core] add disable_audio_jb_during_passthru and disable_video_jb...
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 10 Apr 2017 20:24:01 +0000 (15:24 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 10 Apr 2017 20:24:05 +0000 (15:24 -0500)
src/switch_core_media.c

index b2eb0042f1cec07c2ad3eee132f68cade63339f2..e230420bee07ef59813b6651b18efa1b6162b781 100644 (file)
@@ -14182,10 +14182,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) {