[asterisk-bugs] [Asterisk 0017235]: [patch] asterisk dsp always reports detected DTMF length to be 0ms

Asterisk Bug Tracker noreply at bugs.digium.com
Mon May 17 03:54:28 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17235 
====================================================================== 
Reported By:                frawd
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   17235
Category:                   Core/General
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     ready for testing
Target Version:             1.6.2.9
Asterisk Version:           1.6.2.7-rc2 
JIRA:                       SWP-1337 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-04-23 10:21 CDT
Last Modified:              2010-05-17 03:54 CDT
====================================================================== 
Summary:                    [patch] asterisk dsp always reports detected DTMF
length to be 0ms
Description: 
The attached patch makes the DSP report the correct length for DTMF
detected in the audio.

Tested with DAHDI channels (FXS, FXO, ISDN PRI) and SIP channels
configured as "inband".
====================================================================== 

---------------------------------------------------------------------- 
 (0121952) frawd (reporter) - 2010-05-17 03:54
 https://issues.asterisk.org/view.php?id=17235#c121952 
---------------------------------------------------------------------- 
Hello tilghman, sorry I cannot test trunk easily, but could you test it
with your patch?

I have some doubt about your patch in that it would not work in the same
situation you describe. The way I worked around this problem in my version
was to store the digit's length on the very first miss, before storing any
new digit. The bad thing I realize now is that I should ADD that length to
the previously stored one in case the digit does not reach misses_to_end
and restarts counting dtmf.hits (it is reset to 1 on the first miss so we
must store it at that point).

In my patch the change would be in the "store_digit_samples" function:
-	s->digits[s->current_digits - 1].samples = samples;
+	s->digits[s->current_digits - 1].samples += samples;


Even tho your patch is cleaner, you wait for the misses_to_end to be
reached to store the digit's length, but the dtmf.hits variable is reset to
'1' anyway on the first miss. It looks like it will always report 13ms (1
hit).

Am I wrong? 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-05-17 03:54 frawd          Note Added: 0121952                          
======================================================================




More information about the asterisk-bugs mailing list