[asterisk-dev] kindly asking for a bit of testing for a DTMF issue

Alex Hermann alex at speakup.nl
Tue Feb 7 08:40:59 CST 2012


Hello François, list,


I have a quick queation on a patch you created and which got applied to the 
asterisk codebase a while ago.

I have some issues with the length of consecutive dtmf digits and suspect the 
following part of your patch. I would appreciate if you could elaborate on why  
s->digitlen[s->current_digits] is set to 0 before s->current_digits is 
incremented (effectively setting the duration of the previous digit to 0). I 
would have expected the added line to be on the bottom of the code block, not 
at the start.


On Tuesday 27 April 2010, François Delawarde wrote:
> Can anyone with a few minutes test and/or review a supposedly wonderful
> patch found in:
> https://issues.asterisk.org/view.php?id=17235
> 
> This patch makes the DSP report the actual length of a detected DTMF
> instead of always reporting a length of 0ms.


Index: main/dsp.c
===================================================================
--- main/dsp.c  (revision 264204)
+++ main/dsp.c  (revision 264205)
@@ -630,6 +635,7 @@
 {
        s->detected_digits++;
        if (s->current_digits < MAX_DTMF_DIGITS) {
+               s->digitlen[s->current_digits] = 0;
                s->digits[s->current_digits++] = digit;
                s->digits[s->current_digits] = '\0';
        } else {
 

-- 
Greetings,

Alex Hermann




More information about the asterisk-dev mailing list