Skip to content
Snippets Groups Projects
Commit 66aa081b authored by Friendly Automation's avatar Friendly Automation Committed by Gerrit Code Review
Browse files

Merge "app_amd: Fix infinite loop on silent calls" into 13

parents 57a9935a 188b1d3e
Branches
Tags
No related merge requests found
......@@ -282,7 +282,7 @@ static void isAnsweringMachine(struct ast_channel *chan, const char *data)
int ms = 0;
/* Figure out how long we waited */
if (res > 0) {
if (res >= 0) {
ms = 2 * maxWaitTimeForFrame - res;
}
......@@ -412,6 +412,14 @@ static void isAnsweringMachine(struct ast_channel *chan, const char *data)
}
}
} else {
iTotalTime += ms;
if (iTotalTime >= totalAnalysisTime) {
ast_frfree(f);
strcpy(amdStatus , "NOTSURE");
sprintf(amdCause , "TOOLONG-%d", iTotalTime);
break;
}
}
ast_frfree(f);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment