Pause and unpause queue members
Sometimes, an agent logged into a queue will need to put himself into a state where she is briefly unavailable to answer calls (e.g. during a lunch break). Of course, agent could simply log out of the queue, but there is an application specifically designed to handle such situations – the PauseQueueMember application. This application will block calls for a queue member, but it will not actually remove the member from the queue. The UnpauseQueueMember will make the agent available for calls again.
Here is a dialplan with the PauseQueueMember included:
exten => *730,1,Verbose(2,Pausing a member in the sales queue...) same => n,Set(MemberInfo=${CHANNEL(channeltype)}/${CHANNEL(peername)}) same => n,PauseQueueMember(sales,${MemberInfo}) same => n,Hangup()
When an agent logged into the queue dials the extension *730, she will be in the state of paused and unavailable for calls:
geek-university*CLI> == Using SIP RTP CoS mark 5 -- Executing [*730@local:1] Verbose("SIP/alice-00000048", "2,Pausing a member in the sales queue...") in new stack == Pausing a member in the sales queue... -- Executing [*730@local:2] Set("SIP/alice-00000048", "MemberInfo=SIP/alice") in new stack -- Executing [*730@local:3] PauseQueueMember("SIP/alice-00000048", "sales,SIP/alice") in new stack -- Executing [*730@local:4] Hangup("SIP/alice-00000048", "") in new stack == Spawn extension (local, *730, 4) exited non-zero on 'SIP/alice-00000048' geek-university*CLI> geek-university*CLI> queue show sales sales has 0 calls (max unlimited) in 'rrmemory' strategy (7s holdtime, 0s talktime), W:0, C:2, A:1, SL:0.0% within 0s Members: SIP/alice (ringinuse disabled) (dynamic) (paused) (Not in use) has taken no calls yet No Callers
We will use the UnpauseQueueMember application in our dialplan to unpause the agent on the sales queue:
exten => *740,1,Verbose(2,Unpausing a member in the sales queue...) same => n,Set(MemberInfo=${CHANNEL(channeltype)}/${CHANNEL(peername)}) same => n,UnpauseQueueMember(sales,${MemberInfo}) same => n,Playback(agent-loginok) same => n,Hangup()
When an agent is again ready to take calls, she will need to dial the extension *740 to become unpaused:
geek-university*CLI> == Using SIP RTP CoS mark 5 -- Executing [*740@local:1] Verbose("SIP/alice-00000049", "2,Unpausing a member in the sales queue...") in new stack == Unpausing a member in the sales queue... -- Executing [*740@local:2] Set("SIP/alice-00000049", "MemberInfo=SIP/alice") in new stack -- Executing [*740@local:3] UnpauseQueueMember("SIP/alice-00000049", "sales,SIP/alice") in new stack -- Executing [*740@local:4] Playback("SIP/alice-00000049", "agent-loginok") in new stack > 0x7f01f400d9e0 -- Probation passed - setting RTP source address to 192.168.198.173:7078 -- <SIP/alice-00000049> Playing 'agent-loginok.alaw' (language 'en') -- Executing [*740@local:5] Hangup("SIP/alice-00000049", "") in new stack == Spawn extension (local, *740, 5) exited non-zero on 'SIP/alice-00000049' geek-university*CLI> geek-university*CLI> queue show sales sales has 0 calls (max unlimited) in 'rrmemory' strategy (7s holdtime, 0s talktime), W:0, C:2, A:1, SL:0.0% within 0s Members: SIP/alice (ringinuse disabled) (dynamic) (Not in use) has taken no calls yet No Callers