Commit fcd5d4d03c for asterisk.org
commit fcd5d4d03c2f537f203190e25841442f569b3f6d
Author: seifzadeh <mehrdad.seifzadeh@gmail.com>
Date: Thu Jul 30 15:34:06 2026 +0000
app_queue: Update lastpause on realtime pause transition
Realtime queue members used lastpause to determine whether a member
had transitioned from unpaused to paused. However, lastpause also
stores the timestamp of the member's most recent pause and should not
be cleared when the member is unpaused.
Compare the existing paused state with the new realtime value instead,
and update lastpause only when the member transitions from unpaused to
paused.
Resolves: #1760
diff --git a/apps/app_queue.c b/apps/app_queue.c
index b49c7a0922..0f385b0859 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -3825,10 +3825,10 @@ static void rt_handle_member_record(struct call_queue *q, char *category, struct
m->dead = 0; /* Do not delete this one. */
ast_copy_string(m->rt_uniqueid, rt_uniqueid, sizeof(m->rt_uniqueid));
if (paused_str) {
- m->paused = paused;
- if (paused && m->lastpause == 0) {
+ if (paused && !m->paused) {
time(&m->lastpause); /* XXX: Should this come from realtime? */
}
+ m->paused = paused;
ast_devstate_changed(m->paused ? QUEUE_PAUSED_DEVSTATE : QUEUE_UNPAUSED_DEVSTATE,
AST_DEVSTATE_CACHABLE, "Queue:%s_pause_%s", q->name, m->interface);
}