Summary:ASTERISK-02464: [patch] Queue is not ejecting callers if all members are logged off.
Reporter:mustdie (mustdie)Labels:
Date Opened:2004-09-25 11:43:34Date Closed:2004-09-27 23:30:55
Versions:Frequency of
Environment:Attachments:( 0) qpatch.txt
Description:Problem, that agents are login-in or logging-off at their will. We've just had the situation were no agents are logged-in, and 2 callers were sitting in the queue. I think this is a wrong behavior. Queue should eject callers if members count is 0.

queue 1 calls (max unlimited) in 'ringall' strategy (0s holdtime), C:0, A:12, SL:0.0% within 0s
  No Members
1. IAX2/am2@am2/6 (wait: 0:14, prio: 0)

So, caller will be stuck in his queue indefinitely.
Comments:By: seb7 (seb7) 2004-09-25 17:56:41

Yes, but what if the caller has been waiting in the queue for 40 minutes when the last agent logs out to go to lunch and then a few minutes later another agent logs in? You wouldn't want to eject the caller in this situation.

So perhaps the best compromise is to have a queue option that defines this behaviour - either eject caller or not when the last agent logs out. (Preferably this option would be able to be specified for each queue separately).

edited on: 09-25-04 18:16

By: mustdie (mustdie) 2004-09-25 18:12:13

Well, option would be nice. But logically, queue does not accept calls if no agents are present. So, very logical behavior is to eject people from queue in case of no agents. I also think that this option should be default (Ejecting callers).

By: seb7 (seb7) 2004-09-25 18:34:42

Well, I'm a newbie at *, but I have experience with designing call queue architecture and writing call queueing code on other platforms, and I wondered why it is enforced that queues do not accept calls if no agents are present? I think this should also be an option for the following reasons:
1. A call centre may not want to give the impression that they have no agents logged in.
2. If the queue is on a revenue generating number, the call centre may want people queueing, so if for a few minutes there are no agents logged in, a call that comes in will get queued and the call centre will make a few cents.
3. If the call centre always has long queues and say opens at 9 am, someone may decide to call at 8:58 am to try and get to the top of the queue before it opens and everyone else calls in.
4. If you have a small call centre, office or department, although the office is supposed to open at e.g. 9 am, maybe some days no-one logs in on time, but they may still want people to get queued so that as soon as they login they get any calls waiting.
There are obviously various combinations, variations and other reasons I've not thought of while writing this, or couldn't be bothered to spell out. Hopefully the gist is plain - everyone wants something different.

By: Russell Bryant (russell) 2004-09-25 18:38:36

It is already an option so that callers can join a queue that has no agents.  It is documented in the queue.conf sample.

By: seb7 (seb7) 2004-09-25 18:47:11

Ah! MustDie misled me and I can't see it in the queues samples I've seen on the web and due to some strange firewall at this hotel I can't access my asterisk box at the moment to check there. Thanks for the correction.

But if [callers can join a queue that has no agents] is an option, then it makes sense for [callers ejected from a queue that has no agents] to also be an option.

By: Russell Bryant (russell) 2004-09-25 18:52:28

Yeah, I agree with you.  I'm looking at it right now.  I just figured I'd go ahead and let you know that the first thing was already there.

By: mustdie (mustdie) 2004-09-25 19:33:45

Quote from queues.conf.sample:
If you wish to allow queues that have no members currently to be joined, set this to yes:
joinempty = yes

And I don't see how this option is affecting my situation.
I do not have that option set in my queues.conf, and it works as expected. Callers can’t join empty queue.

So we need another option: ejectonempty=yes/no

Drumkilla: bug tracker is not a message board. If you want to suggest/recommend/advise something, please test it yourself first, then post the reply.

By: Russell Bryant (russell) 2004-09-25 21:58:07

Can someone try that patch out for me?

Add the option 'leavewhenempty' to queues.conf

edited on: 09-25-04 23:35

By: mustdie (mustdie) 2004-09-26 13:02:36

Excellent work. Works just great. Please merge it into CVS.

edited on: 09-26-04 16:44

By: mustdie (mustdie) 2004-09-26 16:48:26

Drumkilla: sorry for confusion. Your patch works just great.

By: mustdie (mustdie) 2004-09-27 15:16:48

drumkilla: please update queues.conf.sample with short description 'leavewhenempty'. So Mark can commit it to CVS.

By: Russell Bryant (russell) 2004-09-27 15:31:49


By: Mark Spencer (markster) 2004-09-27 15:42:45

Looks good.

By: mustdie (mustdie) 2004-09-27 15:57:18

I'm using it for second day now on 2 boxes with no issues.

edited on: 09-27-04 15:57

By: Russell Bryant (russell) 2004-09-27 23:30:47

added to CVS