OK, without trying the code myself, here are a few notes:
-
Remove the period and space in the queue name. Spaces can mess up several things in all programming.
-
I don’t see where anything is sending the calls to Queues,3197,1 (context,extension,priority). When a call comes in to this box, where is it sent? In that context, you would need a Goto. Something like the following:
exten => XXXXXXXXXX,1,Goto(Queues,3197,1) ; Where XXXXXXXXXX is the inbound DID
-
There’s no code to allow the queue members to log in.
-
To ring every extension, you’ll need strategy=ringall. rrmemory is for round-robin.
-
joinempty should probably be set to no. If it’s yes, callers will be placed in the queue even if no agents are logged in to answer.
-
leavewhenempty should probably be changed to yes. If all of the agents log out while callers are in the queue, they will be stuck there.
-
Since you’re not using static agents, you don’t need to have that in the agents.conf or queues.conf. They can log in and out by dialing.
What you’ll need is something like this. Let’s say the inbound DID is 800-555-1212.
extensions.conf - I’m not sure of your inbound context (where the PRI sends all inbound calls), so I’ll use “from-pstn”. I’m also not sure where your extensions are registered, so I’ll use “from-internal-sip”. You may eventually want to add some security to make them enter a code so only they can log in, but this should help get you started.
[from-internal-sip]
;Dial 28 to Log in using the current phone
exten => 28,AddQueueMember(CallQueue3197)
same => n,Hangup()
;Dial 29 to Log out using the current phone
exten => 29,RemoveQueueMember(CallQueue3197)
same => n,Hangup()
[from-pstn]
exten => 8005551212,1,Goto(Queues,3197,1)
;Always a good idea to add a hangup for invalid, timeout, or hangup calls.
exten => i,1,Hangup()
exten => t,1,Hangup()
exten => h,1,Hangup()
[Queues]
exten => 3197,1,Answer() ; Not sure if this is necessary. Some apps will also answer the call.
same => n,Set(acount=${QUEUE_MEMBER(CallQueue3197,count)})
same => n,GoToIf($["${acount}" > "0"]?agentexists)
;In here, you could send the call to Voicemail or just hangup
same => n,Hangup()
same => n(agentexists),Queue(CallQueue3197)
exten => i,1,Hangup()
exten => t,1,Hangup()
exten => h,1,Hangup()
queues.conf
[CallQueue3197]
musicclass=default
strategy=ringall
joinempty=no
leavewhenempty=yes
ringinuse=no