diff options
author | Paul Belanger <paul.belanger@polybeacon.com> | 2010-07-16 17:13:46 +0000 |
---|---|---|
committer | Paul Belanger <paul.belanger@polybeacon.com> | 2010-07-16 17:13:46 +0000 |
commit | 8eb9e0b93843068ad8c5824c462ad9e84d449fb8 (patch) | |
tree | d4156a8656c85f7716a88eefe66c6b305609f4ee /apps/app_amd.c | |
parent | 22896499019fa8a59bc973740d503a4db8461b65 (diff) |
Merged revisions 277182 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r277182 | pabelanger | 2010-07-16 13:10:36 -0400 (Fri, 16 Jul 2010) | 8 lines
Total analysis time error with SIP and silence suppression
When using app_amd with SIP providers that have silence
suppression on, the iTotalTime count increases exponentially.
(closes issue #17656)
Reported by: juls
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_amd.c')
-rw-r--r-- | apps/app_amd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/app_amd.c b/apps/app_amd.c index b89a93212..c978ce0f4 100644 --- a/apps/app_amd.c +++ b/apps/app_amd.c @@ -273,10 +273,11 @@ static void isAnsweringMachine(struct ast_channel *chan, const char *data) if (f->frametype == AST_FRAME_VOICE || f->frametype == AST_FRAME_NULL || f->frametype == AST_FRAME_CNG) { /* If the total time exceeds the analysis time then give up as we are not too sure */ - if (f->frametype == AST_FRAME_VOICE) + if (f->frametype == AST_FRAME_VOICE) { framelength = (ast_codec_get_samples(f) / DEFAULT_SAMPLES_PER_MS); - else - framelength += 2 * maxWaitTimeForFrame; + } else { + framelength = 2 * maxWaitTimeForFrame; + } iTotalTime += framelength; if (iTotalTime >= totalAnalysisTime) { |