How to Pause Queue Members?

Greetings all,

I have been working on various call center improvements recently, but am being stumped in my tries to implement PauseQueueMember and UnpauseQueueMember as a feature code. I know that the command should look like this when it is “issued” to the system:

(I do not specify a queue number so that the command will pause all queues in which the extension is active.)

We are using a strategy of all call center agents logging in an out of the queues via a custom script that contains all the queues at one time (instead of having to log into each one separately). We are using dynamic agents for the queues (obviously) and the agents are added and removed via AddQueueMember and RemoveQueueMember.

Here is the macro I call up from the feature code:

[code][macro-pause-extension]

exten => s,1,Answer
exten => s,1,Wait(1)
exten => s,n,Macro(user-callerid,SKIPTTL,)
exten => s,n,Set(CALLBACKNUM=${AMPUSER})
exten => s,n,PauseQueueMember(|SIP/${CALLBACKNUM})
exten => s,n,System( echo “${EPOCH}|${UNIQUEID}|NONE|Agent/${CALLBACKNUM}|AGENTPAUSED|-” >> /var/log/asterisk/queue_log )
exten => s,n,UserEvent(RefreshQueue)
exten => s,n,Wait(1)
exten => s,n,Playback(extension)
exten => s,n,SayDigits(${CALLBACKNUM})
exten => s,n,Playback(dictate/paused)
exten => s,n,Wait(1)
exten => s,n,Hangup

; end of [macro-pause-extension][/code]

Can someone point me in the right direction to get this to work?

Thanks in advance!

–Eriks

PS: How come this isn’t a feature code in FreePBX already?

The queue members in FreePBX are in the Local channel, not the SIP channel. This should work:

exten => s,n,PauseQueueMember(|Local/${CALLBACKNUM})