Summary: | ASTERISK-27541: app_queue: Queue paused reason was (big number) secs ago when reason is set | ||
Reporter: | César Benjamín García Martínez (NizhiSaeba) | Labels: | |
Date Opened: | 2018-01-02 23:23:38.000-0600 | Date Closed: | 2019-04-01 09:08:51 |
Priority: | Trivial | Regression? | |
Status: | Closed/Complete | Components: | Applications/app_queue |
Versions: | 15.1.5 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Ubuntu Server 16.04.3 x64 | Attachments: | |
Description: | 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. | ||
Comments: | By: Asterisk Team (asteriskteam) 2018-01-02 23:23:39.521-0600 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]. By: Joshua C. Colp (jcolp) 2018-01-03 05:16:43.488-0600 If you'd like to submit a patch to fix this then you can follow the link on the initial comment on this issue. Otherwise I have accepted it and it will be up to someone else to make the minor change. By: Friendly Automation (friendly-automation) 2019-04-01 09:08:52.648-0500 Change 11203 merged by Friendly Automation: app_queue: Fix a few member pause bugs [https://gerrit.asterisk.org/c/asterisk/+/11203|https://gerrit.asterisk.org/c/asterisk/+/11203] By: Friendly Automation (friendly-automation) 2019-04-01 09:38:30.422-0500 Change 11204 merged by George Joseph: app_queue: Fix a few member pause bugs [https://gerrit.asterisk.org/c/asterisk/+/11204|https://gerrit.asterisk.org/c/asterisk/+/11204] |