From e55aee14bb186e516e117e00e44e8c84ffd51b53 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Sun, 30 Nov 2014 16:55:01 -0600 Subject: [PATCH] FS-7025 %FEATURE #comment please test --- src/switch_core_io.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/switch_core_io.c b/src/switch_core_io.c index 1cd902473e..69e98e84f5 100644 --- a/src/switch_core_io.c +++ b/src/switch_core_io.c @@ -1838,10 +1838,26 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_send_dtmf(switch_core_sessio if (switch_channel_test_flag(session->channel, CF_DROP_DTMF)) { const char *file = switch_channel_get_variable_dup(session->channel, "drop_dtmf_masking_file", SWITCH_FALSE, -1); + const char *digits; if (!zstr(file)) { switch_ivr_broadcast(switch_core_session_get_uuid(session), file, SMF_ECHO_ALEG); } + + if ((digits = switch_channel_get_variable_dup(session->channel, "drop_dtmf_masking_digits", SWITCH_FALSE, -1)) && !zstr(digits)) { + char *p; + switch_dtmf_t x_dtmf = { 0, switch_core_default_dtmf_duration(0), DTMF_FLAG_SKIP_PROCESS, 0}; + + switch_channel_clear_flag(session->channel, CF_DROP_DTMF); + for(p = digits; p && *p; p++) { + if (is_dtmf(*p)) { + x_dtmf.digit = *p; + switch_core_session_send_dtmf(session, &x_dtmf); + } + } + switch_channel_set_flag(session->channel, CF_DROP_DTMF); + } + return SWITCH_STATUS_SUCCESS; }