Review Board 1.7.16


dsp.c fix incorrect DTMF Digit_Duration, it's always short by 'hits_to_begin*DTMF_GSIZE', or 25.5ms if hitstobegin=2

Review Request #2145 - Created Oct. 4, 2012 and submitted

Alec Davis
1.8 to trunk
ASTERISK-16003
Reviewers
asterisk-dev
frawd, rmudgett
Asterisk
I'd seen this earlier, but thought nothing of it.

But frawd in ASTERISK-16003 was tring to get it corrected, it never happened.
Using PC based DTMF decoder, with various durations, and watching log/dtmf durations were 25ms closer to what was begin sent.

Diff revision 1 (Latest)

  1. branches/1.8/main/dsp.c: Loading...
branches/1.8/main/dsp.c
Revision 374413 New Change
[20] 816 lines
[+20] [+] static int dtmf_detect(struct ast_dsp *dsp, digit_detect_state_t *s, int16_t amp[], int samples, int squelch, int relax)
817
		}
817
		}
818
		if (hit && hit != s->td.dtmf.current_hit) {
818
		if (hit && hit != s->td.dtmf.current_hit) {
819
			s->td.dtmf.hits++;
819
			s->td.dtmf.hits++;
820
			if (s->td.dtmf.hits == s->td.dtmf.hits_to_begin) {
820
			if (s->td.dtmf.hits == s->td.dtmf.hits_to_begin) {
821
				store_digit(s, hit);
821
				store_digit(s, hit);

    
   
822
				s->digitlen[s->current_digits - 1] = s->td.dtmf.hits_to_begin * DTMF_GSIZE;
822
				s->td.dtmf.current_hit = hit;
823
				s->td.dtmf.current_hit = hit;
823
				s->td.dtmf.misses = 0;
824
				s->td.dtmf.misses = 0;
824
			}
825
			}
825
		}
826
		}
826

    
   
827

   
[+20] [20] 1002 lines
  1. branches/1.8/main/dsp.c: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.