Asterisk Queue Information


This allows you to:
  • call in, press 1, enter info and login [check using CLI> show queue queue-name]
  • call in, press 1, enter info and logout if already logged in [check using CLI> show queue queue-name]
  • call in using any number other than the callback number, press 3, queue yourself and test the login

So, from any single number, you can login all your agents as members in any queue and test the queues: just add your agent contact information to the redundant context.

In extensions.conf:

exten => 567,1,Dial(SIP/12223334444@sip-out-context,,Tr) ;this is the callback number

exten => s,1,Answer
exten => s,n,Flite("Press one to add or remove agent and three to queue yourself.")
exten => s,n,WaitExten(10)

exten => 1,1,Read(agext|enter-exten) ; in this example enter-exten asks the agent for their extension and agext=567 (see redundant context)
exten => 1,n,Macro(agent-add,queue-name,1111,${agext})
exten => 1,n,Hangup
exten => 3,1,Queue(queue-name)
exten => 3,2,Playback(goodbye)
exten => 3,3,Hangup

; Adds a dynamic agent/member to a Queue
exten => s,1,Wait(1)
exten => s,n,GotoIf($["${ARG2}x" = "x"]?${MATH(${PRIORITY}+2)}:${MATH(${PRIORITY}+1)}) ; arg2 is queue password
exten => s,n,Authenticate(${ARG2})
;exten => s,n(Add),AddQueueMember(${ARG1}|Local/${ARG3}@redundant/n) ;maybe SIP/12223334444@sip-out-context
exten => s,n(Add),AddQueueMember(${ARG1}|Local/${ARG3}@redundant/n,,j) ;for priority jumping after and including I believe
exten => s,n,UserEvent(Agentlogin|Agent: ${ARG3})
exten => s,n,Wait(1)
exten => s,n,Playback(agent-loginok)
exten => s,n,Hangup()
exten => s,Add+101,Macro(agent-del,${ARG1},${ARG3})

; Removes a dynamic agent/member from a Queue
exten => s,1,Wait(1)
exten => s,n,RemoveQueueMember(${ARG1}|Local/${ARG2}@redundant/n)
exten => s,n,UserEvent(RefreshQueue)
exten => s,n,Wait(1)
exten => s,n,Playback(agent-loggedoff)
exten => s,n,Hangup()

See also:
Asterisk call queues
Asterisk cmd AddQueueMember
Asterisk cmd RemoveQueueMember

52469 views strong.

Created by: Blumagic, Last modification: Fri 05 of Nov, 2010 (21:59 UTC) by admin
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+