[asterisk-bugs] [JIRA] (ASTERISK-28143) app_amd: Infinite loop on silent calls
Jessie Kid Fernando (JIRA)
noreply at issues.asterisk.org
Fri Oct 25 18:48:48 CDT 2019
[ https://issues.asterisk.org/jira/browse/ASTERISK-28143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=248529#comment-248529 ]
Jessie Kid Fernando commented on ASTERISK-28143:
------------------------------------------------
I am still seeing stuck calls even though I compiled the app_amd.c and install it again on asterisk 13.27.0. Did I miss anything here? This is the patch that I applied on the c file.
/* 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; }
else
{ ms = 2 * maxWaitTimeForFrame; }
/* 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 || f->frametype == AST_FRAME_NULL) {
/* 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;
> 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