[asterisk-bugs] [JIRA] (ASTERISK-28143) app_amd: Infinite loop on silent calls
Jessie Kid Fernando (JIRA)
noreply at issues.asterisk.org
Tue Oct 29 12:18:40 CDT 2019
[ https://issues.asterisk.org/jira/browse/ASTERISK-28143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=248584#comment-248584 ]
Jessie Kid Fernando commented on ASTERISK-28143:
------------------------------------------------
Hello Richard,
I applied the patch because upon looking into the app_amd.c the lines that were added and excluded from the patch file was not there. See below. This is from the app_amd.c from asterisk-13.27.0.tar.gz under /app/
/* Now we go into a loop waiting for frames from the channel */
while ((res = ast_waitfor(chan, 2 * maxWaitTimeForFrame)) > -1) {
int ms = 0;
/* Figure out how long we waited */
if (res >= 0) {
ms = 2 * maxWaitTimeForFrame - res;
}
/* If we fail to read in a frame, that means they hung up */
if (!(f = ast_read(chan))) {
ast_verb(3, "AMD: Channel [%s]. HANGUP\n", ast_channel_name(chan));
ast_debug(1, "Got hangup\n");
strcpy(amdStatus, "HANGUP");
res = 1;
break;
}
if (f->frametype == AST_FRAME_VOICE || 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);
} else {
framelength = ms;
}
iTotalTime += framelength;
ast_debug(1, "AMD: Channel [%s] frametype [%s] iTotalTime [%d] framelength [%d] totalAnalysisTime [%d]\n",
ast_channel_name(chan),
> app_amd: Infinite loop on silent calls
> ---------------------------------------
>
> Key: ASTERISK-28143
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-28143
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Applications/app_amd
> Affects Versions: 15.6.1
> Environment: Ubuntu with asterisk
> Reporter: Abhay Gupta
> Assignee: Abhay Gupta
> Labels: patch
> Target Release: 13.27.0, 16.4.0, 17.0.0
>
> Attachments: amd.patch
>
>
> On our production server , some of the calls never return from AMD application , from logs we could see that they have last gone into AMD() of dialplan and comes out only when the call is HANGUP .
> The suggested patch is to remove that infinite loop and has been tested for last few months and have been working well .
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list