From 437085acc0cfac94b77f970fdda8cc7825f910b0 Mon Sep 17 00:00:00 2001 From: seifzadeh Date: Thu, 30 Jul 2026 15:34:06 +0000 Subject: [PATCH] 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 --- apps/app_queue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/app_queue.c b/apps/app_queue.c index 73719a9d92..85d6ec3263 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -3869,10 +3869,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); }