Review Board 1.7.16


dsp.c refactor section of dtmf_detect

Review Request #1130 - Created March 1, 2011 and submitted

Alec Davis
trunk
18904
Reviewers
asterisk-dev
Asterisk
In the process of trying to get DISA working with mobile phones, finished up cleaning a section of dtmf_detect.
Tested on 2 systems.
system 1: On analog FXS connected phone, verified dtmf detection, is still valid.

system 2:. using callfile to call mobile, and then use DISA to sucessfully dial every time.

System 2: Debug logs (with dateformat=%F %T.%3q), show false triggers, with events triggered at appropriate times, 40ms.
[2011-03-03 00:14:39.023] DEBUG[18627] dsp.c: DTMF EDGE
[2011-03-03 00:14:39.023] DEBUG[18627] dsp.c: DTMF EDGE
[2011-03-03 00:14:39.043] DEBUG[18627] dsp.c: DTMF EDGE
[2011-03-03 00:14:39.083] DEBUG[18627] dsp.c: DTMF BEG digit='2' len=0
[2011-03-03 00:14:39.083] DEBUG[18627] chan_dahdi.c: Begin DTMF digit: 0x32 '2' on DAHDI/i1/021XXXXXX-1
[2011-03-03 00:14:39.163] DEBUG[18627] dsp.c: DTMF EDGE
[2011-03-03 00:14:39.183] DEBUG[18627] dsp.c: DTMF EDGE
[2011-03-03 00:14:39.203] DEBUG[18627] dsp.c: DTMF EDGE
[2011-03-03 00:14:39.223] DEBUG[18627] dsp.c: DTMF EDGE
[2011-03-03 00:14:39.303] DEBUG[18627] dsp.c: DTMF EDGE
[2011-03-03 00:14:39.323] DEBUG[18627] dsp.c: DTMF EDGE
[2011-03-03 00:14:39.743] DEBUG[18627] dsp.c: DTMF EDGE
[2011-03-03 00:14:39.783] DEBUG[18627] dsp.c: DTMF END digit='2' len=4590
Posted (March 2, 2011, 8:35 a.m.)

   

  
trunk/main/dsp.c (Diff revision 1)
 
 
Do we now need separate 'hit's and 'misses' counters? Could just be a single counter.
We're either 'waiting for a new digit' or 'got a current digit and waiting to end'.
 
Ship it!
Posted (Jan. 5, 2012, 9:31 a.m.)
Been playing with this for a good bit of the day.  It doesn't break anything in my normal DTMF tests, though I have to acknowledge I lack the resources to reproduce the bug.  I'm going to go ahead and commit the patch as is, minus the additional debug statements since there are already DTMF logs which detail all of the information purveyed here.

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.