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)

This commit is contained in:
Brian West 2014-03-01 09:58:43 -06:00
parent 2fe3ef03ed
commit dd8c323fcf
1 changed files with 8 additions and 1 deletions

View File

@ -223,7 +223,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;
@ -340,6 +340,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;
@ -458,6 +460,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);