Call counter resets when agents log in/out

Hi - I’m using 11.1.0. Agents log in/out using this code:

[code][login_out]
exten => 222,1,Answer()
exten => 222,n,VMAuthenticate(@agent)
exten => 222,n,AddQueueMember(MDQueue1,Local/${AUTH_MAILBOX}@to_agents/n)
exten => 222,n,AddQueueMember(MDQueue2,Local/${AUTH_MAILBOX}@to_agents/n)
exten => 222,n,AddQueueMember(MDQueue3,Local/${AUTH_MAILBOX}@to_agents/n)
exten => 222,n,Read(AGENT_SIP,agent-newlocation)
exten => 222,n,Set(DB(agent_sip/${AUTH_MAILBOX})=${AGENT_SIP})
exten => 222,n,Playback(agent-loginok)
exten => 222,n,Playback(goodbye)
exten => 222,n,Hangup

exten => 223,1,Answer()
exten => 223,n,VMAuthenticate(@agent)
exten => 223,n,RemoveQueueMember(MDQueue1,Local/${AUTH_MAILBOX}@to_agents/n)
exten => 223,n,RemoveQueueMember(MDQueue2,Local/${AUTH_MAILBOX}@to_agents/n)
exten => 223,n,RemoveQueueMember(MDQueue3,Local/${AUTH_MAILBOX}@to_agents/n)
exten => 223,n,Set(oldvar=${DB_DELETE(agent_sip/${AUTH_MAILBOX})})
exten => 223,n,Playback(agent-loggedoff)
exten => 223,n,Playback(goodbye)
exten => 223,n,Hangup
[/code]

When agents log out then back in, say for a lunch break, their call count resets to zero. Is there a way for the counter to not get reset when agents log out/in? I’ve googled but so far found nothing useful.

Although the queue system sometimes uses agent for member, these are not really Asterisk agents.

In any case, they are not logging out; they are being completely removed.

If you used Asterisk agents, they could logout (although you seem to be using the equivalent of call back agents, which are deprecated).

Alternatively, you could pause them during their lunch break.

However, if this is for management statistics, I’d expect you to analyse the queue log, for this information.

Thanks! I didn’t know about pause and that does what I need. :smiley: