From: Alec L Davis Date: Tue, 15 Dec 2009 03:10:36 +0000 (+0000) Subject: restarts busydetector (if enabled) when DTMF is received. X-Git-Tag: 1.6.1.13-rc1~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c0369e72f5310dcdc16201b2a14bf1aa9c7657e;p=thirdparty%2Fasterisk.git 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.1@234899 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/dsp.c b/main/dsp.c index eaa5c66c33..54323576fd 100644 --- a/main/dsp.c +++ b/main/dsp.c @@ -1367,6 +1367,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) {