提交 002be953 authored 作者: Brian West's avatar Brian West

FS-6226Prevent DTMF from traversing bridged channels, but still allow me to send…

FS-6226Prevent DTMF from traversing bridged channels, but still allow me to send DTMF via API or dp app (uuid_send_dtmf or send_dtmf)
上级 7ef86923
......@@ -214,7 +214,7 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
const char *silence_var;
int silence_val = 0, bypass_media_after_bridge = 0;
const char *bridge_answer_timeout = NULL;
int answer_timeout, sent_update = 0;
int bridge_filter_dtmf, answer_timeout, sent_update = 0;
time_t answer_limit = 0;
const char *exec_app = NULL;
const char *exec_data = NULL;
......@@ -331,6 +331,8 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
}
}
bridge_filter_dtmf = switch_true(switch_channel_get_variable(chan_a, "bridge_filter_dtmf"));
for (;;) {
switch_channel_state_t b_state;
switch_status_t status;
......@@ -449,6 +451,11 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
}
}
if (bridge_filter_dtmf) {
send_dtmf = 0;
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session_a), SWITCH_LOG_DEBUG, "Dropping filtered DTMF received on %s\n", switch_channel_get_name(chan_a));
}
if (send_dtmf) {
switch_core_session_send_dtmf(session_b, &dtmf);
switch_core_session_kill_channel(session_b, SWITCH_SIG_BREAK);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论