[asterisk-dev] DTMF_HITS_TO_BEGIN and DTMF_MISSES_TO_END

Tilghman Lesher tilghman at meg.abyt.es
Tue Jul 2 13:28:08 CDT 2013


On Tue, Jul 2, 2013 at 11:17 AM, Raj [mail list] <rajlistuser at gmail.com> wrote:
> I am trying to figure out caller ID decoding in asterisk. Looking
> through the code I find that in main/dsp.c two #defines
> DTMF_HITS_TO_BEGIN and DTMF_MISSES_TO_END are defined with value 4.
>
> Just curious as to why the value 4 was selected? Does it has any
> relation with the length of DTMF tone coming from exchange?

No, the purpose of the number of hits to begin the tone is to avoid
false positives, such as a human voice triggering detection.  The
number of hits to end is to avoid problems with the transmission (like
packet loss) from causing the detection to misfire, usually causing
the entire decoding of the tones to fail.  You're welcome to vary the
lengths up or down and see how that affects detection.



More information about the asterisk-dev mailing list