From 1081a4e14ac852cf07666fb52e04f0eee870d2f1 Mon Sep 17 00:00:00 2001 From: Alec L Davis Date: Tue, 15 Dec 2009 03:08:54 +0000 Subject: [PATCH] restarts busydetector (if enabled) when DTMF is received. (closes issue #16389) Reported by: alecdavis Tested by: alecdavis Patch dtmf_busydetector.diff.txt uploaded by alecdavis (license 585) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@234898 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/dsp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main/dsp.c b/main/dsp.c index 8c4a61d216..97b5ba0971 100644 --- a/main/dsp.c +++ b/main/dsp.c @@ -1410,6 +1410,12 @@ struct ast_frame *ast_dsp_process(struct ast_channel *chan, struct ast_dsp *dsp, memmove(dsp->digit_state.digits, dsp->digit_state.digits + 1, dsp->digit_state.current_digits); dsp->digit_state.current_digits--; dsp->dtmf_began = 0; + + if (dsp->features & DSP_FEATURE_BUSY_DETECT) { + /* Reset Busy Detector as we have some confirmed activity */ + memset(dsp->historicsilence, 0, sizeof(dsp->historicsilence)); + memset(dsp->historicnoise, 0, sizeof(dsp->historicnoise)); + } } if (event) {