[asterisk-bugs] [JIRA] (ASTERISK-27541) Queue paused reason was (big number) secs ago

Asterisk Team (JIRA) noreply at issues.asterisk.org
Tue Jan 2 23:23:39 CST 2018


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

Asterisk Team commented on ASTERISK-27541:
------------------------------------------

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

> Queue paused reason was (big number) secs ago
> ---------------------------------------------
>
>                 Key: ASTERISK-27541
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27541
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_queue
>    Affects Versions: 15.1.5
>         Environment: Ubuntu Server 16.04.3 x64 
>            Reporter: Nizhi Saeba
>            Severity: Minor
>
> I'm building an AGI that pauses agent member, when i put reason for the pause it shows in the CLI the message:
> AGENT NAME (CHANNEL from hint:EXT (ringinuse disabled) (dynamic) (paused:MYREASON was 14131456456132132 secs ago) (Not in use) has taken no calls yet
> Which i'm sure is wrong, because is just paused. I guess must show 2 or 3 seconds ago. 
> Looking at source code for the place where the value is assigned, i found this block:
>  if (mem->paused) {
>                                         if (ast_strlen_zero(mem->reason_paused)) {
>                                                 ast_str_append(&out, 0, " %s(paused was %ld secs ago)%s",
>                                                         ast_term_color(COLOR_BROWN, COLOR_BLACK), (long) (time(NULL) - mem->lastpause), ast_term_reset());
>                                         } else {
>                                                 ast_str_append(&out, 0, " %s(paused:%s was %ld secs ago)%s", ast_term_color(COLOR_BROWN, COLOR_BLACK),
>                                                         mem->reason_paused,  (long) (time(NULL) - mem->lastcall), ast_term_reset());
>                                         }
>                                 }
> If there is no reason declared, the time it's shows well, but if reason is declared, it's not, because the value is retrieved from the pointer mem->lastcall instead of mem->lastpause.
> I tried to change that code and it works fine, i think it is not reported yet or noticed yet because many times, at testing last call and lastpause can match. but i found it after a long time of production running and i found a value that seems wrong. 
> after the change and recompile, seems working well. i guess this change must be made to get pause time correct if reason assigned.



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



More information about the asterisk-bugs mailing list