[asterisk-users] Zero length queue

Artifex Maximus artifexor at gmail.com
Tue Sep 5 06:55:54 MST 2006


I have the following problem.

I need queue because of dynamic agents but I only want service as many
callers as available members are and want zero length waiting queue.

For example. I have two queues (q1,q2) and I use AddQueueMembers and
RemoveQueueMembers for maintain queue members.

exten => login,1,AddQueueMembers(q1)
exten => login,n,AddQueueMembers(q2)

exten => logout,1,RemoveQueueMembers(q1)
exten => logout,n,RemoveQueueMembers(q2)

I look for a solution that make possible if my three agents are logged
in and a fouth caller come we give a message that 'all agents are
busy. call later' and hangup. No waiting callers in queue just as many
calls as many agents. So if Asterisk "see" this:

x*CLI> show queue q1
      Zap/15 (dynamic) (Busy) has taken 2 calls (last was 126 secs ago)
      Zap/14 (dynamic) (Busy) has taken 2 calls (last was 739 secs ago)
      Zap/17 (dynamic) (Busy) has taken 3 calls (last was 341 secs ago)
      Zap/13 (dynamic) (Busy) has taken 7 calls (last was 156 secs ago)

then don't put the next caller in queue but skip Queue(q1) over. Same
as with maxlen > 0 but with maxlen = 0. The maxlen parameter for
queues is exactly what I want but 0 is meaning unlimited in that
context so no luck.

I have tried with joinempty = no and joinempty = strict but doesn't work.

Any idea?


More information about the asterisk-users mailing list