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

Walter Doekes walter+asterisk-dev at osso.nl
Tue Feb 7 09:37:10 CST 2012


> 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.

I'm looking at the 1.8 codebase here and it looks to me like 
s->current_digits is pointing to the "next" digit.

(Or, probably, it holds the "count of digits stored", which is 1 when 
we're dealing with digit[0].)

When the length is set, the previous position is correctly used:

s->digitlen[s->current_digits - 1] += DTMF_GSIZE;

This strikes me as perfectly reasonable(*).

Perhaps you could elaborate on the problems you are having.

Regards,
Walter

(*) In fact, if it wasn't set to 0 where it is, its value would be 
undefined when ast_dsp_digitreset() is called on an already used dsp struct.



More information about the asterisk-dev mailing list