[asterisk-users] WG: Asterisk and Agents

mbodbg at gmx.net mbodbg at gmx.net
Tue Sep 12 06:43:03 MST 2006


Hello NG,

We've a small problem using agents in asterisk. One requirement is, if there
no agent logged into a queue, it shouldn't be possible that a call joins a
queue. I can configure that using the parameter "joinempty=strict" in
"queues.conf", unfortunately the parameter takes only effect if I add
members to the queue dynamically. If there are static members assigned to
the queue, a call can always join the queue, even if there are no agents
logged. To add agents dynamically to a queue I'm using the following scripts
in the dialplan:    

exten => _*8XXX,1,Answer
exten => _*8XXX,2,SetLanguage(de)
exten => _*8XXX,3,AddQueueMember(DEMO|Agent/${EXTEN:1})
exten => _*8XXX,4,Dial(Local/999/n,,D(#))
exten => _*8XXX,5,AgentCallBackLogin(${EXTEN:1}|${CALLERIDNUM}@dial-out) 
exten => _*8XXX,6,Hangup()

exten => _**8XXX,1,Answer
exten => _**8XXX,2,SetLanguage(de)
exten => _**8XXX,3,RemoveQueueMember(DEMO|Agent/${EXTEN:2})
exten => _**8XXX,4,AgentCallbackLogin(${EXTEN:2})
exten => _**8XXX,5,Hangup()

So if I type e.g. *8000 it logs in Agent/8000 and adds the agent dynamically
to the queue test. With **8000 it logs out Agent/8000 and removes the agent
from queue test. All that work's fine. The problem is that to add an agent
to a queue, it has NOT to be defined in "agents.conf". If an agent mistypes
his agent ID, e.g *8999, it logs on Agent/8999, even if it is not defined in
"agents.conf". As result Agent/8999 keeps assigned to the queue DEMO, and
because there is an agent assigned the parameter "joinempty" has no effect
anymore. Calls can join the queue even if there is no real Agent logged in.
Any ideas are welcome.

Best Regards

- Markus   





More information about the asterisk-users mailing list