]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_amd: issue with silence suppression fixed
authorNasir Iqbal <nasir@ictinnovations.com>
Tue, 21 May 2019 06:38:24 +0000 (11:38 +0500)
committerNasir Iqbal <nasir@ictinnovations.com>
Fri, 21 Jun 2019 05:44:08 +0000 (23:44 -0600)
Now AMD algorithm will not ignore AST_FRAME_NULL, As I think using manual
wait time instead of `framelength` is enough to fix timeout / TOOLONG issue.

ASTERISK-28419 #close

Change-Id: I16ea2d6295bc99b975e8c092e5f9fbd9214debdb

apps/app_amd.c

index 5285287bfb0e7c34a02d28c7fbd1ddcee3ce31d7..1a0af3fa2d8b227e40f490b9cd288619de7d366f 100644 (file)
@@ -293,7 +293,7 @@ static void isAnsweringMachine(struct ast_channel *chan, const char *data)
                        break;
                }
 
-               if (f->frametype == AST_FRAME_VOICE || f->frametype == AST_FRAME_CNG) {
+               if (f->frametype == AST_FRAME_VOICE || f->frametype == AST_FRAME_NULL || f->frametype == AST_FRAME_CNG) {
                        /* Figure out how long the frame is in milliseconds */
                        if (f->frametype == AST_FRAME_VOICE) {
                                framelength = (ast_codec_samples_count(f) / DEFAULT_SAMPLES_PER_MS);