[asterisk-bugs] [JIRA] (ASTERISK-28608) app_amd: Use time calculation to calculate timeout

Michael Cargile (JIRA) noreply at issues.asterisk.org
Wed Nov 13 08:52:31 CST 2019


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

Michael Cargile commented on ASTERISK-28608:
--------------------------------------------

Just wanted to check to see if there was anything else I needed to do to get this code reviewed. I think I followed the guides properly.

> app_amd: Use time calculation to calculate timeout
> --------------------------------------------------
>
>                 Key: ASTERISK-28608
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28608
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_amd
>    Affects Versions: 13.29.1
>            Reporter: Michael Cargile
>            Assignee: Michael Cargile
>              Labels: patch
>         Attachments: amd_timeout.patch
>
>
> ASTERISK-28143 added AST_FRAME_NULL as a frame type to count in its total ms calculation which is used to determine if it has reached its timeout. The issue is that this section:
> {noformat}
> /* 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;
> }
> {noformat}
> can return AST_FRAME_NULL at random time intervals. As such it is unreliable for calculating the time spend in app_amd. Instead an actual timer should be used to calculate the timeout.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list