]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
restarts busydetector (if enabled) when DTMF is received.
authorAlec L Davis <sivad.a@paradise.net.nz>
Tue, 15 Dec 2009 03:10:36 +0000 (03:10 +0000)
committerAlec L Davis <sivad.a@paradise.net.nz>
Tue, 15 Dec 2009 03:10:36 +0000 (03:10 +0000)
  (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

main/dsp.c

index eaa5c66c3383e27a2d4f911ec6422cbe91f888d6..54323576fdb1975600109d7ab443594dbf56cd6e 100644 (file)
@@ -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) {