mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-04 17:51:03 +00:00
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:
parent
7ef86923aa
commit
002be95364
@ -214,7 +214,7 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
|
|||||||
const char *silence_var;
|
const char *silence_var;
|
||||||
int silence_val = 0, bypass_media_after_bridge = 0;
|
int silence_val = 0, bypass_media_after_bridge = 0;
|
||||||
const char *bridge_answer_timeout = NULL;
|
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;
|
time_t answer_limit = 0;
|
||||||
const char *exec_app = NULL;
|
const char *exec_app = NULL;
|
||||||
const char *exec_data = 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 (;;) {
|
for (;;) {
|
||||||
switch_channel_state_t b_state;
|
switch_channel_state_t b_state;
|
||||||
switch_status_t status;
|
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) {
|
if (send_dtmf) {
|
||||||
switch_core_session_send_dtmf(session_b, &dtmf);
|
switch_core_session_send_dtmf(session_b, &dtmf);
|
||||||
switch_core_session_kill_channel(session_b, SWITCH_SIG_BREAK);
|
switch_core_session_kill_channel(session_b, SWITCH_SIG_BREAK);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user