Dynamic Agents and Issue with Least Recent Strategy Queue

I am running trixbox CE on Asterisk I have a queue using the least recent strategy with dynamic members. Members are added and removed from the queue using the ami commands queue add member and queue remove member. I have noticed that when an agent is removed from the queue then added to the queue all of their call stats are reset to 0. Since we employ the least recent strategy this means the agent is now first in line for a call even though they may not have been the least recently called.

Here is a scenario: Queue has dynamic agents A, B, and C. Agent A has taken 1 call (last was 300 sec ago), Agent B has taken 1 call (last was 200 sec ago), and Agent C has taken 1 call last was 100 sec ago). Agent C is removed and re-added to the queue and now shows Agent C has taken no calls. Although Agent A is truly the least recently called Agent C will get called first.

How can the last call time be preserved when removing and adding members to avoid this behavior?

Event: QueueMemberAdded
Privilege: agent,all
Queue: 99
Location: SIP/2203
MemberName: SIP/2203
Membership: dynamic
Penalty: 0
CallsTaken: 0
LastCall: 0
CallAnswered: 0
TalkTime: 0
Status: 1
Paused: 0

From “action: queues”: SIP/2203 (dynamic) (Not in use) has taken no calls yet with total talktime 0s

It can’t. Why can’t you pause them instead?

We are matching their time logged into their CRM software to their time in the queue, so when the agent logs out of their CRM application they are removed from the queue, and when they log in they are added to the queue. We are using pause when the agent is wrapping, or performing other administrative functions inside their CRM application.