From 36405ae6598270f7a45a8f7cbb4efb11ed657eff Mon Sep 17 00:00:00 2001
From: Alec L Davis <sivad.a@paradise.net.nz>
Date: Thu, 4 Oct 2012 20:08:22 +0000
Subject: [PATCH] dsp.c fix incorrect DTMF Digit_Duration.

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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/main/dsp.c b/main/dsp.c
index 3ff5f009da..99b5092d9f 100644
--- a/main/dsp.c
+++ b/main/dsp.c
@@ -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;
 			}
-- 
GitLab