Blocked revisions 373240
authorMatthew Jordan <mjordan@digium.com>
Thu, 20 Sep 2012 18:59:39 +0000 (18:59 +0000)
committerMatthew Jordan <mjordan@digium.com>
Thu, 20 Sep 2012 18:59:39 +0000 (18:59 +0000)
........
app_queue: Support an 'agent available' hint

Sets INUSE when no free agents, NOT_INUSE when an agent is free.

modifes handle_statechange() scan members loop to scan for a free agent
and updates the Queue:queuename_avial devstate.

Previously exited early if the member was found in the queue.

Now Exits later when both a member was found, and a free agent was found.

alecdavis (license 585)
Reported by: Alec Davis
Tested by: alecdavis

Review: https://reviewboard.asterisk.org/r/2121/

~~~~

Support all ways a member can be available for 'agent available' hints

Alec's patch in r373188 added the ability to subscribe to a hint for when
Queue members are available.  This patch modifies the check that determines
when a Queue member is available by refactoring the availability checks in
num_available_members into a shared function is_member_available.  This
should now handle the ringinuse option, as well as device state values
other than AST_DEVICE_NOT_INUSE.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373241 65c4cc65-6c06-0410-ace0-fbb531ad65f3


No differences found