Skip to content
Snippets Groups Projects
Commit 1de75f0a authored by Jonathan Rose's avatar Jonathan Rose
Browse files

Merged revisions 319261 via svnmerge from

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

........
  r319261 | jrose | 2011-05-16 16:00:55 -0500 (Mon, 16 May 2011) | 2 lines
  
  Makes busy detection in dsp.c always allow for at least one frame (20ms) of error so that 200ms tone lengths don't get ignored by single frame error lengths.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent eddc32a3
No related branches found
No related tags found
No related merge requests found
......@@ -1273,7 +1273,7 @@ int ast_dsp_busydetect(struct ast_dsp *dsp)
/* If we know the expected busy tone length, check we are in the range */
if (res && (dsp->busy_cadence.pattern[0] > 0)) {
if (abs(avgtone - dsp->busy_cadence.pattern[0]) > (dsp->busy_cadence.pattern[0]*BUSY_PAT_PERCENT/100)) {
if (abs(avgtone - dsp->busy_cadence.pattern[0]) > MAX(dsp->busy_cadence.pattern[0]*BUSY_PAT_PERCENT/100, 20)) {
#ifdef BUSYDETECT_DEBUG
ast_debug(5, "busy detector: avgtone of %d not close enough to desired %d\n",
avgtone, dsp->busy_cadence.pattern[0]);
......@@ -1284,7 +1284,7 @@ int ast_dsp_busydetect(struct ast_dsp *dsp)
#ifndef BUSYDETECT_TONEONLY
/* If we know the expected busy tone silent-period length, check we are in the range */
if (res && (dsp->busy_cadence.pattern[1] > 0)) {
if (abs(avgsilence - dsp->busy_cadence.pattern[1]) > (dsp->busy_cadence.pattern[1] * BUSY_PAT_PERCENT / 100)) {
if (abs(avgsilence - dsp->busy_cadence.pattern[1]) > MAX(dsp->busy_cadence.pattern[1]*BUSY_PAT_PERCENT/100, 20)) {
#ifdef BUSYDETECT_DEBUG
ast_debug(5, "busy detector: avgsilence of %d not close enough to desired %d\n",
avgsilence, dsp->busy_cadence.pattern[1]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment