dsp.c fix incorrect DTMF Digit_Duration.
authorAlec L Davis <sivad.a@paradise.net.nz>
Thu, 4 Oct 2012 20:08:22 +0000 (20:08 +0000)
committerAlec L Davis <sivad.a@paradise.net.nz>
Thu, 4 Oct 2012 20:08:22 +0000 (20:08 +0000)
it's always short by 'hits_to_begin*DTMF_GSIZE', or 25.5ms if hitstobegin=2

(issue ASTERISK-16003)
Tested by: alecdavis
alecdavis (license 585)

Review https://reviewboard.asterisk.org/r/2145/
........

Merged revisions 374475 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 374476 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 374477 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374478 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/dsp.c

index 3ff5f00..99b5092 100644 (file)
@@ -816,6 +816,7 @@ static int dtmf_detect(struct ast_dsp *dsp, digit_detect_state_t *s, int16_t amp
                        s->td.dtmf.hits++;
                        if (s->td.dtmf.hits == s->td.dtmf.hits_to_begin) {
                                store_digit(s, hit);
+                               s->digitlen[s->current_digits - 1] = s->td.dtmf.hits_to_begin * DTMF_GSIZE;
                                s->td.dtmf.current_hit = hit;
                                s->td.dtmf.misses = 0;
                        }