Review Board 1.7.16

app_queue: support a 'logged in and available' hint on queue

Review Request #2121 - Created Sept. 18, 2012 and submitted

Alec Davis
Receptionist will love this.

The ability to see via a BLF that some members are logged in and free to take the calls. "I'll just put you through now", with less chance that the call goes to voicemail or what ever dialplan logic then followed.

When all agents are logged out, the BLF goes INUSE.
When agents are logged in, but are all busy, the BLF goes INUSE.
   Like any BLF, if INUSE the call may go to Voicemail, at least the Operator can warn the caller.

When an agent is free to take a call the BLF goes NOT_IN_USE, IE. can put a call through.

Related to

I did think about combining the queue ringing hint from review 1619 but it's a different function, and only required by co-workers that may be able to help.

Many other divisions want to be able to drop a call into a queue, with the prior knowledge that it should be answered (NOTINUSE), or will possibly go to voicemail (INUSE).
In use on our headoffice production system.

Below is a hint for our itg_queue

exten => 8501,hint,Queue:itg_queue_avail

Note: '_avail' is added to the queuename
Review request changed
Updated (Sept. 19, 2012, 11:45 a.m.)
Updated CHANGES and extensions.conf.sample

optimized iteration of members, don't needlessly compare when we've already found the member in this queue.

Still working correctly on our production box.
Posted (Sept. 20, 2012, 5:44 a.m.)


trunk/apps/app_queue.c (Diff revision 3)
This isn't sufficient to determine if a member is available.

For instance, members who use analog devices will appear as AST_DEVICE_UNKNOWN when they are currently available.

Also, if the queue has ringinuse set to "yes" then members who are AST_DEVICE_INUSE are considered available to the queue.

There is a function available called num_available_members() that can be used to determine the number of members available for a queue. Use that instead.
  1. You wouldn't be able to directly call num_available_members, as you just want to determine whether or not a member is actually available - not the number of available members.  You'd have to refactor out the portion of num_available_members that determines if a member is available to be callable by num_avilable_members and by this function.
    That's a fairly minor correction that can be made to this patch.
  2. queue_function_mem_read() to determine if a member is 'free' does the same, I copied it :)
    Perhaps to be closer to what I trying to achieve for 'available' I should have copied the 'ready' check from queue_function_mem_read().
    What I was trying to achieve with an 'available' light is;
     if a call was put through there would be minimal reason for the call to go unanswered by a human, as agent(s) are in theory logged in and available to take a call. runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to