Agent Pause / UnPause in a Queue ( Queue number here is 5 Digits )
exten => _*461*XXXXX,1,NoOP(---- ${CALLERID(num)} is Request to Pause / UnPause in Queue Num ${EXTEN:5} ---) same => n,Set(PAUSE_STATE=${QUEUE_MEMBER(${EXTEN:5},paused,SIP/${CALLERID(num)})}) same => n,GotoIf($[${PAUSE_STATE} = 0 ]?DOPAUSE:DOUNPAUSE) same => n,NoOP( Memmber Pause status is ${PAUSE_STATE} so we Pause the Agent ) same => n(DOPAUSE),PauseQueueMember(${EXTEN:5},SIP/${CALLERID(num)},,LUNCHBREAK) same => n,GotoIf($[${PQMSTATUS} = NOTFOUND ]?queuenotvalid) same => n,GotoIf($[${PQMSTATUS} = PAUSED ]?paused) same => n(paused),NoOP(---- ${CALLERID(num)} Succussfully Paused in Queue Num ${EXTEN:5} ----) same => n,UserEvent(RefreshQueue) same => n,Playback(dictate/paused) same => n,Hangup() same => n(DOUNPAUSE),NoOP( Memmber Pause status is ${PAUSE_STATE} so we UnPause the Agent ) same => n,UnPauseQueueMember(${EXTEN:5},SIP/${CALLERID(num)}) same => n,NoOP(---- ${CALLERID(num)} Succussfully UnPaused in Queue Num ${EXTEN:5} ----) same => n,Playback(beep) same => n,Hangup() same => n(queuenotvalid),NoOP(---- Queue Number ${EXTEN:5} is not valid ) same => n,Playback(pbx-invalid) same => n,Hangup()
Comments
Post a Comment