[asterisk-users] Zero length queue
Wes Baehr
wbaehr at abilitybusiness.com
Tue Sep 5 07:48:53 MST 2006
I wrote a little patch to app_queue.c so that the function QUEUEAGENTCOUNT
will only return members that are not busy.
My dialplan goes something like this (in AEL):
SET(QACFREE=${QUEUEAGENTCOUNT(abcstaff|free)});
if (${QACFREE} > 0) Queue(abc|trnd|||20);
So if there are free agents, it will join the queue, otherwise, it can do
something else. Contact me off-list if you're interested.
Wes Baehr
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-
> bounces at lists.digium.com] On Behalf Of Artifex Maximus
> Sent: Tuesday, September 05, 2006 9:56 AM
> To: asterisk-users at lists.digium.com
> Subject: [asterisk-users] Zero length queue
>
> Hi,
>
> 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
> Members:
> 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?
>
> bye,
> Zsolt
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list