Merged revisions 263949 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r263949 | tilghman | 2010-05-19 01:32:27 -0500 (Wed, 19 May 2010) | 8 lines
  
  Because progress is called multiple times, across several frames, we must persist states when detecting multitone sequences.
  
  (closes issue #16749)
   Reported by: dant
   Patches: 
         dsp.c-bug16749-1.patch uploaded by dant (license 670)
   Tested by: dant
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@263950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
certified/1.8.6
Tilghman Lesher 15 years ago
parent 19f4ca6176
commit f55aff74ed

@ -990,10 +990,13 @@ static int __ast_dsp_call_progress(struct ast_dsp *dsp, short *s, int len)
} else if (hz[HZ_950] > TONE_MIN_THRESH * TONE_THRESH) {
newstate = DSP_TONE_STATE_SPECIAL1;
} else if (hz[HZ_1400] > TONE_MIN_THRESH * TONE_THRESH) {
if (dsp->tstate == DSP_TONE_STATE_SPECIAL1)
/* End of SPECIAL1 or middle of SPECIAL2 */
if (dsp->tstate == DSP_TONE_STATE_SPECIAL1 || dsp->tstate == DSP_TONE_STATE_SPECIAL2) {
newstate = DSP_TONE_STATE_SPECIAL2;
}
} else if (hz[HZ_1800] > TONE_MIN_THRESH * TONE_THRESH) {
if (dsp->tstate == DSP_TONE_STATE_SPECIAL2) {
/* End of SPECIAL2 or middle of SPECIAL3 */
if (dsp->tstate == DSP_TONE_STATE_SPECIAL2 || dsp->tstate == DSP_TONE_STATE_SPECIAL3) {
newstate = DSP_TONE_STATE_SPECIAL3;
}
} else if (dsp->genergy > TONE_MIN_THRESH * TONE_THRESH) {

Loading…
Cancel
Save