[asterisk-bugs] [JIRA] (ASTERISK-28143) app_amd: Infinite loop on silent calls

Jessie Kid Fernando (JIRA) noreply at issues.asterisk.org
Fri Oct 25 07:26:48 CDT 2019


    [ https://issues.asterisk.org/jira/browse/ASTERISK-28143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=248526#comment-248526 ] 

Jessie Kid Fernando commented on ASTERISK-28143:
------------------------------------------------

Hello,

Quick question, How can I apply the patch? Are you referring to this patch? 

--- app_amd.c	2018-10-31 12:52:41.229343351 +0000
+++ app_amd.c	2018-10-31 12:52:07.297094203 +0000
@@ -282,6 +282,8 @@
 		/* 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 */
@@ -293,7 +295,7 @@
 			break;
 		}
 
-		if (f->frametype == AST_FRAME_VOICE || f->frametype == AST_FRAME_CNG) {
+		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);

Can I just insert these lines on app_amd.c? then just reload the module app_amd.so? 

Regards,

Jessie

> 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