[asterisk-bugs] [JIRA] (ASTERISK-27541) app_queue: Queue paused reason was (big number) secs ago when reason is set

Joshua Colp (JIRA) noreply at issues.asterisk.org
Wed Jan 3 05:16:39 CST 2018


     [ https://issues.asterisk.org/jira/browse/ASTERISK-27541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joshua Colp updated ASTERISK-27541:
-----------------------------------

    Status: Open  (was: Triage)

> app_queue: Queue paused reason was (big number) secs ago when reason is set
> ---------------------------------------------------------------------------
>
>                 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