]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
dsp.c fix incorrect DTMF Digit_Duration.
authorAlec L Davis <sivad.a@paradise.net.nz>
Thu, 4 Oct 2012 20:03:26 +0000 (20:03 +0000)
committerAlec L Davis <sivad.a@paradise.net.nz>
Thu, 4 Oct 2012 20:03:26 +0000 (20:03 +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/

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

main/dsp.c

index 69a8ff64cd1312595a6c11f1cb16da60083c2fcc..10b134f6fe8ccd1d90cc3b7b9a55725b2779fb0e 100644 (file)
@@ -819,6 +819,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;
                        }