[asterisk-commits] pabelanger: branch 1.4 r277182 - /branches/1.4/apps/app_amd.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 16 12:10:42 CDT 2010


Author: pabelanger
Date: Fri Jul 16 12:10:36 2010
New Revision: 277182

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=277182
Log:
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

Modified:
    branches/1.4/apps/app_amd.c

Modified: branches/1.4/apps/app_amd.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/apps/app_amd.c?view=diff&rev=277182&r1=277181&r2=277182
==============================================================================
--- branches/1.4/apps/app_amd.c (original)
+++ branches/1.4/apps/app_amd.c Fri Jul 16 12:10:36 2010
@@ -215,10 +215,11 @@
 
 		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) {




More information about the asterisk-commits mailing list