Newer
Older
* Asterisk -- An open source telephony toolkit.
* Copyright (C) 1999 - 2006, Digium, Inc.
* Mark Spencer <markster@digium.com>
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
* \brief True call queues with optional send URL on answer
* \author Mark Spencer <markster@digium.com>
*
* \note 2004-11-25: Persistent Dynamic Members added by:
* NetNation Communications (www.netnation.com)
* Kevin Lindsay <kevinl@netnation.com>
* Each dynamic agent in each queue is now stored in the astdb.
* When asterisk is restarted, each agent will be automatically
* readded into their recorded queues. This feature can be
Mark Spencer
committed
* configured with the 'persistent_members=<1|0>' setting in the
* '[general]' category in queues.conf. The default is on.
* \note 2004-06-04: Priorities in queues added by inAccess Networks (work funded by Hellas On Line (HOL) www.hol.gr).
* \note These features added by David C. Troy <dave@toad.net>:
* - Per-queue holdtime calculation
* - Estimated holdtime announcement
* - Position announcement
* - Abandoned/completed call counters
* - Failout timer passed as optional app parameter
* - Optional monitoring of calls, started when call is answered
*
* Patch Version 1.07 2003-12-24 01
*
* Added servicelevel statistic by Michiel Betel <michiel@betel.nl>
James Golovich
committed
* Added Priority jumping code for adding and removing queue members by Jonathan Stanton <asterisk@doilooklikeicare.com>
* Fixed to work with CVS as of 2004-02-25 and released as 1.07a
* by Matthew Enger <m.enger@xi.com.au>
*
/*! \li \ref app_queues.c uses configuration file \ref queues.conf
* \addtogroup configuration_file
*/
/*! \page queues.conf queues.conf
* \verbinclude queues.conf.sample
*/
<use type="module">res_monitor</use>
<support_level>core</support_level>
Kevin P. Fleming
committed
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/time.h>
#include <sys/signal.h>
#include <netinet/in.h>
Kevin P. Fleming
committed
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/app.h"
#include "asterisk/linkedlists.h"
Kevin P. Fleming
committed
#include "asterisk/module.h"
#include "asterisk/translate.h"
#include "asterisk/say.h"
#include "asterisk/features.h"
#include "asterisk/musiconhold.h"
#include "asterisk/cli.h"
#include "asterisk/manager.h"
#include "asterisk/config.h"
#include "asterisk/monitor.h"
#include "asterisk/utils.h"
#include "asterisk/causes.h"
#include "asterisk/astdb.h"
Kevin P. Fleming
committed
#include "asterisk/devicestate.h"
#include "asterisk/stringfields.h"
Russell Bryant
committed
#include "asterisk/event.h"
#include "asterisk/astobj2.h"
#include "asterisk/strings.h"
#include "asterisk/global_datastores.h"
#include "asterisk/taskprocessor.h"
Mark Michelson
committed
#include "asterisk/callerid.h"
#include "asterisk/cel.h"
#include "asterisk/dial.h"
#include "asterisk/stasis_channels.h"
Jason Parker
committed
#include "asterisk/stasis_message_router.h"
Richard Mudgett
committed
#include "asterisk/bridging.h"
Tilghman Lesher
committed
/* Define, to debug reference counts on queues, without debugging reference counts on queue members */
/* #define REF_DEBUG_ONLY_QUEUES */
Mark Michelson
committed
/*!
* \par Please read before modifying this file.
* There are three locks which are regularly used
* throughout this file, the queue list lock, the lock
* for each individual queue, and the interface list lock.
* Please be extra careful to always lock in the following order
* 1) queue list lock
* 2) individual queue lock
* 3) interface list lock
* This order has sort of "evolved" over the lifetime of this
* application, but it is now in place this way, so please adhere
* to this order!
*/
/*** DOCUMENTATION
<application name="Queue" language="en_US">
<synopsis>
Queue a call for a call queue.
</synopsis>
<syntax>
<parameter name="queuename" required="true" />
<parameter name="options">
<optionlist>
Olle Johansson
committed
<option name="C">
<para>Mark all calls as "answered elsewhere" when cancelled.</para>
</option>
<option name="c">
<para>Continue in the dialplan if the callee hangs up.</para>
</option>
<option name="d">
<para>data-quality (modem) call (minimum delay).</para>
</option>
Jonathan Rose
committed
<option name="F" argsep="^">
<argument name="context" required="false" />
<argument name="exten" required="false" />
<argument name="priority" required="true" />
<para>When the caller hangs up, transfer the <emphasis>called member</emphasis>
to the specified destination and <emphasis>start</emphasis> execution at that location.</para>
<note>
<para>Any channel variables you want the called channel to inherit from the caller channel must be
prefixed with one or two underbars ('_').</para>
</note>
</option>
<option name="F">
<para>When the caller hangs up, transfer the <emphasis>called member</emphasis> to the next priority of
the current extension and <emphasis>start</emphasis> execution at that location.</para>
<note>
<para>Any channel variables you want the called channel to inherit from the caller channel must be
prefixed with one or two underbars ('_').</para>
</note>
<note>
<para>Using this option from a Macro() or GoSub() might not make sense as there would be no return points.</para>
</note>
</option>
<option name="h">
<para>Allow <emphasis>callee</emphasis> to hang up by pressing <literal>*</literal>.</para>
</option>
<option name="H">
<para>Allow <emphasis>caller</emphasis> to hang up by pressing <literal>*</literal>.</para>
</option>
<option name="n">
<para>No retries on the timeout; will exit this application and
go to the next step.</para>
</option>
<option name="i">
<para>Ignore call forward requests from queue members and do nothing
when they are requested.</para>
</option>
Mark Michelson
committed
<option name="I">
<para>Asterisk will ignore any connected line update requests or any redirecting party
update requests it may receive on this dial attempt.</para>
</option>
<option name="r">
<para>Ring instead of playing MOH. Periodic Announcements are still made, if applicable.</para>
</option>
<option name="R">
<para>Ring instead of playing MOH when a member channel is actually ringing.</para>
</option>
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<option name="t">
<para>Allow the <emphasis>called</emphasis> user to transfer the calling user.</para>
</option>
<option name="T">
<para>Allow the <emphasis>calling</emphasis> user to transfer the call.</para>
</option>
<option name="w">
<para>Allow the <emphasis>called</emphasis> user to write the conversation to
disk via Monitor.</para>
</option>
<option name="W">
<para>Allow the <emphasis>calling</emphasis> user to write the conversation to
disk via Monitor.</para>
</option>
<option name="k">
<para>Allow the <emphasis>called</emphasis> party to enable parking of the call by sending
the DTMF sequence defined for call parking in <filename>features.conf</filename>.</para>
</option>
<option name="K">
<para>Allow the <emphasis>calling</emphasis> party to enable parking of the call by sending
the DTMF sequence defined for call parking in <filename>features.conf</filename>.</para>
</option>
<option name="x">
<para>Allow the <emphasis>called</emphasis> user to write the conversation
to disk via MixMonitor.</para>
</option>
<option name="X">
<para>Allow the <emphasis>calling</emphasis> user to write the conversation to
disk via MixMonitor.</para>
</option>
</optionlist>
</parameter>
<parameter name="URL">
<para><replaceable>URL</replaceable> will be sent to the called party if the channel supports it.</para>
</parameter>
<parameter name="announceoverride" />
<parameter name="timeout">
<para>Will cause the queue to fail out after a specified number of
seconds, checked between each <filename>queues.conf</filename> <replaceable>timeout</replaceable> and
<replaceable>retry</replaceable> cycle.</para>
</parameter>
<parameter name="AGI">
<para>Will setup an AGI script to be executed on the calling party's channel once they are
connected to a queue member.</para>
</parameter>
<parameter name="macro">
<para>Will run a macro on the calling party's channel once they are connected to a queue member.</para>
</parameter>
<parameter name="gosub">
<para>Will run a gosub on the calling party's channel once they are connected to a queue member.</para>
</parameter>
<parameter name="rule">
<para>Will cause the queue's defaultrule to be overridden by the rule specified.</para>
</parameter>
<parameter name="position">
<para>Attempt to enter the caller into the queue at the numerical position specified. <literal>1</literal>
would attempt to enter the caller at the head of the queue, and <literal>3</literal> would attempt to place
the caller third in the queue.</para>
</syntax>
<description>
<para>In addition to transferring the call, a call may be parked and then picked
up by another user.</para>
<para>This application will return to the dialplan if the queue does not exist, or
any of the join options cause the caller to not enter the queue.</para>
<para>This application does not automatically answer and should be preceeded
by an application such as Answer(), Progress(), or Ringing().</para>
<para>This application sets the following channel variable upon completion:</para>
<variablelist>
<variable name="QUEUESTATUS">
<para>The status of the call as a text string.</para>
<value name="TIMEOUT" />
<value name="FULL" />
<value name="JOINEMPTY" />
<value name="LEAVEEMPTY" />
<value name="JOINUNAVAIL" />
<value name="LEAVEUNAVAIL" />
<value name="CONTINUE" />
</variable>
</variablelist>
</description>
<ref type="application">Queue</ref>
<ref type="application">QueueLog</ref>
<ref type="application">AddQueueMember</ref>
<ref type="application">RemoveQueueMember</ref>
<ref type="application">PauseQueueMember</ref>
<ref type="application">UnpauseQueueMember</ref>
<ref type="function">QUEUE_VARIABLES</ref>
<ref type="function">QUEUE_MEMBER</ref>
<ref type="function">QUEUE_MEMBER_COUNT</ref>
<ref type="function">QUEUE_EXISTS</ref>
<ref type="function">QUEUE_WAITING_COUNT</ref>
<ref type="function">QUEUE_MEMBER_LIST</ref>
<ref type="function">QUEUE_MEMBER_PENALTY</ref>
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
</application>
<application name="AddQueueMember" language="en_US">
<synopsis>
Dynamically adds queue members.
</synopsis>
<syntax>
<parameter name="queuename" required="true" />
<parameter name="interface" />
<parameter name="penalty" />
<parameter name="options" />
<parameter name="membername" />
<parameter name="stateinterface" />
</syntax>
<description>
<para>Dynamically adds interface to an existing queue. If the interface is
already in the queue it will return an error.</para>
<para>This application sets the following channel variable upon completion:</para>
<variablelist>
<variable name="AQMSTATUS">
<para>The status of the attempt to add a queue member as a text string.</para>
<value name="ADDED" />
<value name="MEMBERALREADY" />
<value name="NOSUCHQUEUE" />
</variable>
</variablelist>
</description>
<ref type="application">Queue</ref>
<ref type="application">QueueLog</ref>
<ref type="application">AddQueueMember</ref>
<ref type="application">RemoveQueueMember</ref>
<ref type="application">PauseQueueMember</ref>
<ref type="application">UnpauseQueueMember</ref>
<ref type="function">QUEUE_VARIABLES</ref>
<ref type="function">QUEUE_MEMBER</ref>
<ref type="function">QUEUE_MEMBER_COUNT</ref>
<ref type="function">QUEUE_EXISTS</ref>
<ref type="function">QUEUE_WAITING_COUNT</ref>
<ref type="function">QUEUE_MEMBER_LIST</ref>
<ref type="function">QUEUE_MEMBER_PENALTY</ref>
</application>
<application name="RemoveQueueMember" language="en_US">
<synopsis>
Dynamically removes queue members.
</synopsis>
<syntax>
<parameter name="queuename" required="true" />
<parameter name="interface" />
</syntax>
<description>
<para>If the interface is <emphasis>NOT</emphasis> in the queue it will return an error.</para>
<para>This application sets the following channel variable upon completion:</para>
<variablelist>
<variable name="RQMSTATUS">
<value name="REMOVED" />
<value name="NOTINQUEUE" />
<value name="NOSUCHQUEUE" />
<value name="NOTDYNAMIC" />
</variable>
</variablelist>
<para>Example: RemoveQueueMember(techsupport,SIP/3000)</para>
</description>
<see-also>
<ref type="application">Queue</ref>
<ref type="application">QueueLog</ref>
<ref type="application">AddQueueMember</ref>
<ref type="application">RemoveQueueMember</ref>
<ref type="application">PauseQueueMember</ref>
<ref type="application">UnpauseQueueMember</ref>
<ref type="function">QUEUE_VARIABLES</ref>
<ref type="function">QUEUE_MEMBER</ref>
<ref type="function">QUEUE_MEMBER_COUNT</ref>
<ref type="function">QUEUE_EXISTS</ref>
<ref type="function">QUEUE_WAITING_COUNT</ref>
<ref type="function">QUEUE_MEMBER_LIST</ref>
<ref type="function">QUEUE_MEMBER_PENALTY</ref>
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
</application>
<application name="PauseQueueMember" language="en_US">
<synopsis>
Pauses a queue member.
</synopsis>
<syntax>
<parameter name="queuename" />
<parameter name="interface" required="true" />
<parameter name="options" />
<parameter name="reason">
<para>Is used to add extra information to the appropriate queue_log entries and manager events.</para>
</parameter>
</syntax>
<description>
<para>Pauses (blocks calls for) a queue member. The given interface will be paused in the given queue.
This prevents any calls from being sent from the queue to the interface until it is
unpaused with UnpauseQueueMember or the manager interface. If no queuename is given,
the interface is paused in every queue it is a member of. The application will fail if the
interface is not found.</para>
<para>This application sets the following channel variable upon completion:</para>
<variablelist>
<variable name="PQMSTATUS">
<para>The status of the attempt to pause a queue member as a text string.</para>
<value name="PAUSED" />
<value name="NOTFOUND" />
</variable>
</variablelist>
<para>Example: PauseQueueMember(,SIP/3000)</para>
</description>
<ref type="application">Queue</ref>
<ref type="application">QueueLog</ref>
<ref type="application">AddQueueMember</ref>
<ref type="application">RemoveQueueMember</ref>
<ref type="application">PauseQueueMember</ref>
<ref type="application">UnpauseQueueMember</ref>
<ref type="function">QUEUE_VARIABLES</ref>
<ref type="function">QUEUE_MEMBER</ref>
<ref type="function">QUEUE_MEMBER_COUNT</ref>
<ref type="function">QUEUE_EXISTS</ref>
<ref type="function">QUEUE_WAITING_COUNT</ref>
<ref type="function">QUEUE_MEMBER_LIST</ref>
<ref type="function">QUEUE_MEMBER_PENALTY</ref>
</application>
<application name="UnpauseQueueMember" language="en_US">
<synopsis>
Unpauses a queue member.
</synopsis>
<syntax>
<parameter name="queuename" />
<parameter name="interface" required="true" />
<parameter name="options" />
<parameter name="reason">
<para>Is used to add extra information to the appropriate queue_log entries and manager events.</para>
</parameter>
</syntax>
<description>
<para>Unpauses (resumes calls to) a queue member. This is the counterpart to <literal>PauseQueueMember()</literal>
and operates exactly the same way, except it unpauses instead of pausing the given interface.</para>
<para>This application sets the following channel variable upon completion:</para>
<variablelist>
<variable name="UPQMSTATUS">
<para>The status of the attempt to unpause a queue member as a text string.</para>
<value name="UNPAUSED" />
<value name="NOTFOUND" />
</variable>
</variablelist>
<para>Example: UnpauseQueueMember(,SIP/3000)</para>
</description>
<ref type="application">Queue</ref>
<ref type="application">QueueLog</ref>
<ref type="application">AddQueueMember</ref>
<ref type="application">RemoveQueueMember</ref>
<ref type="application">PauseQueueMember</ref>
<ref type="application">UnpauseQueueMember</ref>
<ref type="function">QUEUE_VARIABLES</ref>
<ref type="function">QUEUE_MEMBER</ref>
<ref type="function">QUEUE_MEMBER_COUNT</ref>
<ref type="function">QUEUE_EXISTS</ref>
<ref type="function">QUEUE_WAITING_COUNT</ref>
<ref type="function">QUEUE_MEMBER_LIST</ref>
<ref type="function">QUEUE_MEMBER_PENALTY</ref>
</application>
<application name="QueueLog" language="en_US">
<synopsis>
Writes to the queue_log file.
</synopsis>
<syntax>
<parameter name="queuename" required="true" />
<parameter name="uniqueid" required="true" />
<parameter name="agent" required="true" />
<parameter name="event" required="true" />
<parameter name="additionalinfo" />
</syntax>
<description>
<para>Allows you to write your own events into the queue log.</para>
<para>Example: QueueLog(101,${UNIQUEID},${AGENT},WENTONBREAK,600)</para>
</description>
<see-also>
<ref type="application">Queue</ref>
<ref type="application">QueueLog</ref>
<ref type="application">AddQueueMember</ref>
<ref type="application">RemoveQueueMember</ref>
<ref type="application">PauseQueueMember</ref>
<ref type="application">UnpauseQueueMember</ref>
<ref type="function">QUEUE_VARIABLES</ref>
<ref type="function">QUEUE_MEMBER</ref>
<ref type="function">QUEUE_MEMBER_COUNT</ref>
<ref type="function">QUEUE_EXISTS</ref>
<ref type="function">QUEUE_WAITING_COUNT</ref>
<ref type="function">QUEUE_MEMBER_LIST</ref>
<ref type="function">QUEUE_MEMBER_PENALTY</ref>
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
</application>
<function name="QUEUE_VARIABLES" language="en_US">
<synopsis>
Return Queue information in variables.
</synopsis>
<syntax>
<parameter name="queuename" required="true">
<enumlist>
<enum name="QUEUEMAX">
<para>Maxmimum number of calls allowed.</para>
</enum>
<enum name="QUEUESTRATEGY">
<para>The strategy of the queue.</para>
</enum>
<enum name="QUEUECALLS">
<para>Number of calls currently in the queue.</para>
</enum>
<enum name="QUEUEHOLDTIME">
<para>Current average hold time.</para>
</enum>
<enum name="QUEUECOMPLETED">
<para>Number of completed calls for the queue.</para>
</enum>
<enum name="QUEUEABANDONED">
<para>Number of abandoned calls.</para>
</enum>
<enum name="QUEUESRVLEVEL">
<para>Queue service level.</para>
</enum>
<enum name="QUEUESRVLEVELPERF">
<para>Current service level performance.</para>
</enum>
</enumlist>
</parameter>
</syntax>
<description>
<para>Makes the following queue variables available.</para>
<para>Returns <literal>0</literal> if queue is found and setqueuevar is defined, <literal>-1</literal> otherwise.</para>
</description>
<see-also>
<ref type="application">Queue</ref>
<ref type="application">QueueLog</ref>
<ref type="application">AddQueueMember</ref>
<ref type="application">RemoveQueueMember</ref>
<ref type="application">PauseQueueMember</ref>
<ref type="application">UnpauseQueueMember</ref>
<ref type="function">QUEUE_VARIABLES</ref>
<ref type="function">QUEUE_MEMBER</ref>
<ref type="function">QUEUE_MEMBER_COUNT</ref>
<ref type="function">QUEUE_EXISTS</ref>
<ref type="function">QUEUE_WAITING_COUNT</ref>
<ref type="function">QUEUE_MEMBER_LIST</ref>
<ref type="function">QUEUE_MEMBER_PENALTY</ref>
</see-also>
</function>
<function name="QUEUE_MEMBER" language="en_US">
<synopsis>
Count number of members answering a queue.
</synopsis>
<syntax>
<parameter name="queuename" required="true" />
<parameter name="option" required="true">
<enumlist>
<enum name="logged">
<para>Returns the number of logged-in members for the specified queue.</para>
</enum>
<enum name="free">
David Vossel
committed
<para>Returns the number of logged-in members for the specified queue that either can take calls or are currently wrapping up after a previous call.</para>
</enum>
<enum name="ready">
<para>Returns the number of logged-in members for the specified queue that are immediately available to answer a call.</para>
</enum>
<enum name="count">
<para>Returns the total number of members for the specified queue.</para>
</enum>
<enum name="penalty">
<para>Gets or sets queue member penalty.</para>
</enum>
<enum name="paused">
<para>Gets or sets queue member paused status.</para>
</enum>
<enum name="ringinuse">
<para>Gets or sets queue member ringinuse.</para>
<para>Allows access to queue counts [R] and member information [R/W].</para>
<para>
<replaceable>queuename</replaceable> is required for all operations
<replaceable>interface</replaceable> is required for all member operations.
</para>
<see-also>
<ref type="application">Queue</ref>
<ref type="application">QueueLog</ref>
<ref type="application">AddQueueMember</ref>
<ref type="application">RemoveQueueMember</ref>
<ref type="application">PauseQueueMember</ref>
<ref type="application">UnpauseQueueMember</ref>
<ref type="function">QUEUE_VARIABLES</ref>
<ref type="function">QUEUE_MEMBER</ref>
<ref type="function">QUEUE_MEMBER_COUNT</ref>
<ref type="function">QUEUE_EXISTS</ref>
<ref type="function">QUEUE_WAITING_COUNT</ref>
<ref type="function">QUEUE_MEMBER_LIST</ref>
<ref type="function">QUEUE_MEMBER_PENALTY</ref>
</see-also>
</function>
<function name="QUEUE_MEMBER_COUNT" language="en_US">
<synopsis>
Count number of members answering a queue.
</synopsis>
<syntax>
<parameter name="queuename" required="true" />
</syntax>
<description>
<para>Returns the number of members currently associated with the specified <replaceable>queuename</replaceable>.</para>
<warning><para>This function has been deprecated in favor of the <literal>QUEUE_MEMBER()</literal> function</para></warning>
</description>
<ref type="application">Queue</ref>
<ref type="application">QueueLog</ref>
<ref type="application">AddQueueMember</ref>
<ref type="application">RemoveQueueMember</ref>
<ref type="application">PauseQueueMember</ref>
<ref type="application">UnpauseQueueMember</ref>
<ref type="function">QUEUE_VARIABLES</ref>
<ref type="function">QUEUE_MEMBER</ref>
<ref type="function">QUEUE_MEMBER_COUNT</ref>
<ref type="function">QUEUE_EXISTS</ref>
<ref type="function">QUEUE_WAITING_COUNT</ref>
<ref type="function">QUEUE_MEMBER_LIST</ref>
<ref type="function">QUEUE_MEMBER_PENALTY</ref>
<function name="QUEUE_EXISTS" language="en_US">
<synopsis>
Check if a named queue exists on this server
</synopsis>
<syntax>
<parameter name="queuename" />
</syntax>
<description>
<para>Returns 1 if the specified queue exists, 0 if it does not</para>
</description>
<see-also>
<ref type="application">Queue</ref>
<ref type="application">QueueLog</ref>
<ref type="application">AddQueueMember</ref>
<ref type="application">RemoveQueueMember</ref>
<ref type="application">PauseQueueMember</ref>
<ref type="application">UnpauseQueueMember</ref>
<ref type="function">QUEUE_VARIABLES</ref>
<ref type="function">QUEUE_MEMBER</ref>
<ref type="function">QUEUE_MEMBER_COUNT</ref>
<ref type="function">QUEUE_EXISTS</ref>
<ref type="function">QUEUE_WAITING_COUNT</ref>
<ref type="function">QUEUE_MEMBER_LIST</ref>
<ref type="function">QUEUE_MEMBER_PENALTY</ref>
</see-also>
</function>
<function name="QUEUE_WAITING_COUNT" language="en_US">
<synopsis>
Count number of calls currently waiting in a queue.
</synopsis>
<syntax>
<parameter name="queuename" />
</syntax>
<description>
<para>Returns the number of callers currently waiting in the specified <replaceable>queuename</replaceable>.</para>
</description>
<see-also>
<ref type="application">Queue</ref>
<ref type="application">QueueLog</ref>
<ref type="application">AddQueueMember</ref>
<ref type="application">RemoveQueueMember</ref>
<ref type="application">PauseQueueMember</ref>
<ref type="application">UnpauseQueueMember</ref>
<ref type="function">QUEUE_VARIABLES</ref>
<ref type="function">QUEUE_MEMBER</ref>
<ref type="function">QUEUE_MEMBER_COUNT</ref>
<ref type="function">QUEUE_EXISTS</ref>
<ref type="function">QUEUE_WAITING_COUNT</ref>
<ref type="function">QUEUE_MEMBER_LIST</ref>
<ref type="function">QUEUE_MEMBER_PENALTY</ref>
</see-also>
</function>
<function name="QUEUE_MEMBER_LIST" language="en_US">
<synopsis>
Returns a list of interfaces on a queue.
</synopsis>
<syntax>
<parameter name="queuename" required="true" />
</syntax>
<description>
<para>Returns a comma-separated list of members associated with the specified <replaceable>queuename</replaceable>.</para>
</description>
<ref type="application">Queue</ref>
<ref type="application">QueueLog</ref>
<ref type="application">AddQueueMember</ref>
<ref type="application">RemoveQueueMember</ref>
<ref type="application">PauseQueueMember</ref>
<ref type="application">UnpauseQueueMember</ref>
<ref type="function">QUEUE_VARIABLES</ref>
<ref type="function">QUEUE_MEMBER</ref>
<ref type="function">QUEUE_MEMBER_COUNT</ref>
<ref type="function">QUEUE_EXISTS</ref>
<ref type="function">QUEUE_WAITING_COUNT</ref>
<ref type="function">QUEUE_MEMBER_LIST</ref>
<ref type="function">QUEUE_MEMBER_PENALTY</ref>
</function>
<function name="QUEUE_MEMBER_PENALTY" language="en_US">
<synopsis>
Gets or sets queue members penalty.
</synopsis>
<syntax>
<parameter name="queuename" required="true" />
<parameter name="interface" required="true" />
</syntax>
<description>
<para>Gets or sets queue members penalty.</para>
<warning><para>This function has been deprecated in favor of the <literal>QUEUE_MEMBER()</literal> function</para></warning>
<see-also>
<ref type="application">Queue</ref>
<ref type="application">QueueLog</ref>
<ref type="application">AddQueueMember</ref>
<ref type="application">RemoveQueueMember</ref>
<ref type="application">PauseQueueMember</ref>
<ref type="application">UnpauseQueueMember</ref>
<ref type="function">QUEUE_VARIABLES</ref>
<ref type="function">QUEUE_MEMBER</ref>
<ref type="function">QUEUE_MEMBER_COUNT</ref>
<ref type="function">QUEUE_EXISTS</ref>
<ref type="function">QUEUE_WAITING_COUNT</ref>
<ref type="function">QUEUE_MEMBER_LIST</ref>
<ref type="function">QUEUE_MEMBER_PENALTY</ref>
</see-also>
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
<manager name="Queues" language="en_US">
<synopsis>
Queues.
</synopsis>
<syntax>
</syntax>
<description>
</description>
</manager>
<manager name="QueueStatus" language="en_US">
<synopsis>
Show queue status.
</synopsis>
<syntax>
<xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
<parameter name="Queue" />
<parameter name="Member" />
</syntax>
<description>
</description>
</manager>
<manager name="QueueSummary" language="en_US">
<synopsis>
Show queue summary.
</synopsis>
<syntax>
<xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
<parameter name="Queue" />
</syntax>
<description>
</description>
</manager>
<manager name="QueueAdd" language="en_US">
<synopsis>
Add interface to queue.
</synopsis>
<syntax>
<xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
<parameter name="Queue" required="true" />
<parameter name="Interface" required="true" />
<parameter name="Penalty" />
<parameter name="Paused" />
<parameter name="MemberName" />
<parameter name="StateInterface" />
</syntax>
<description>
</description>
</manager>
<manager name="QueueRemove" language="en_US">
<synopsis>
Remove interface from queue.
</synopsis>
<syntax>
<xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
<parameter name="Queue" required="true" />
<parameter name="Interface" required="true" />
</syntax>
<description>
</description>
</manager>
<manager name="QueuePause" language="en_US">
<synopsis>
Makes a queue member temporarily unavailable.
</synopsis>
<syntax>
<xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
<parameter name="Interface" required="true" />
<parameter name="Paused" required="true" />
<parameter name="Queue" />
<parameter name="Reason" />
</syntax>
<description>
</description>
</manager>
<manager name="QueueLog" language="en_US">
<synopsis>
Adds custom entry in queue_log.
</synopsis>
<syntax>
<xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
<parameter name="Queue" required="true" />
<parameter name="Event" required="true" />
<parameter name="Uniqueid" />
<parameter name="Interface" />
<parameter name="Message" />
</syntax>
<description>
</description>
</manager>
<manager name="QueuePenalty" language="en_US">
<synopsis>
Set the penalty for a queue member.
</synopsis>
<syntax>
<xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
<parameter name="Interface" required="true" />
<parameter name="Penalty" required="true" />
<parameter name="Queue" />
</syntax>
<description>
</description>
</manager>
<manager name="QueueMemberRingInUse" language="en_US">
<synopsis>
Set the ringinuse value for a queue member.
</synopsis>
<syntax>
<xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
<parameter name="Interface" required="true" />
<parameter name="RingInUse" required="true" />
<parameter name="Queue" />
</syntax>
<description>
</description>
</manager>
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
<manager name="QueueRule" language="en_US">
<synopsis>
Queue Rules.
</synopsis>
<syntax>
<xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
<parameter name="Rule" />
</syntax>
<description>
</description>
</manager>
<manager name="QueueReload" language="en_US">
<synopsis>
Reload a queue, queues, or any sub-section of a queue or queues.
</synopsis>
<syntax>
<xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
<parameter name="Queue" />
<parameter name="Members">
<enumlist>
<enum name="yes" />
<enum name="no" />
</enumlist>
</parameter>
<parameter name="Rules">
<enumlist>
<enum name="yes" />
<enum name="no" />
</enumlist>
</parameter>
<parameter name="Parameters">
<enumlist>
<enum name="yes" />
<enum name="no" />
</enumlist>
</parameter>
</syntax>
<description>
</description>
</manager>
<manager name="QueueReset" language="en_US">
<synopsis>
Reset queue statistics.
</synopsis>
<syntax>
<xi:include xpointer="xpointer(/docs/manager[@name='Login']/syntax/parameter[@name='ActionID'])" />
<parameter name="Queue" />
</syntax>
<description>
</description>
</manager>
Jason Parker
committed
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<managerEvent language="en_US" name="QueueMemberStatus">
<managerEventInstance class="EVENT_FLAG_AGENT">
<synopsis>Raised when a Queue member's status has changed.</synopsis>
<syntax>
<parameter name="Queue">
<para>The name of the queue.</para>
</parameter>
<parameter name="MemberName">
<para>The name of the queue member.</para>
</parameter>
<parameter name="Interface">
<para>The queue member's channel technology or location.</para>
</parameter>
<parameter name="StateInterface">
<para>Channel technology or location from which to read device state changes.</para>
</parameter>
<parameter name="Membership">
<enumlist>
<enum name="dynamic"/>
<enum name="realtime"/>
<enum name="static"/>
</enumlist>
</parameter>
<parameter name="Penalty">
<para>The penalty associated with the queue member.</para>
</parameter>
<parameter name="CallsTaken">
<para>The number of calls this queue member has serviced.</para>
</parameter>
<parameter name="LastCall">
<para>The time this member last took a call, expressed in seconds since 00:00, Jan 1, 1970 UTC.</para>
</parameter>
<parameter name="Status">
<para>The numeric device state status of the queue member.</para>
<enumlist>
<enum name="0"><para>AST_DEVICE_UNKNOWN</para></enum>
<enum name="1"><para>AST_DEVICE_NOT_INUSE</para></enum>
<enum name="2"><para>AST_DEVICE_INUSE</para></enum>
<enum name="3"><para>AST_DEVICE_BUSY</para></enum>
<enum name="4"><para>AST_DEVICE_INVALID</para></enum>
<enum name="5"><para>AST_DEVICE_UNAVAILABLE</para></enum>
<enum name="6"><para>AST_DEVICE_RINGING</para></enum>
<enum name="7"><para>AST_DEVICE_RINGINUSE</para></enum>
<enum name="8"><para>AST_DEVICE_ONHOLD</para></enum>
</enumlist>
</parameter>
<parameter name="Paused">
<enumlist>
<enum name="0"/>
<enum name="1"/>
</enumlist>
</parameter>
<parameter name="Ringinuse">
<enumlist>
<enum name="0"/>
<enum name="1"/>
</enumlist>
</parameter>
</syntax>
</managerEventInstance>
</managerEvent>
<managerEvent language="en_US" name="QueueMemberAdded">
<managerEventInstance class="EVENT_FLAG_AGENT">
<synopsis>Raised when a member is added to the queue.</synopsis>
<syntax>
<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter)" />
</syntax>
<see-also>
<ref type="managerEvent">QueueMemberRemoved</ref>
<ref type="application">AddQueueMember</ref>
</see-also>
</managerEventInstance>
</managerEvent>
<managerEvent language="en_US" name="QueueMemberRemoved">
<managerEventInstance class="EVENT_FLAG_AGENT">
<synopsis>Raised when a member is removed from the queue.</synopsis>
<syntax>
<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter)" />
</syntax>
<see-also>
<ref type="managerEvent">QueueMemberAdded</ref>
<ref type="application">RemoveQueueMember</ref>
</see-also>
</managerEventInstance>
</managerEvent>
<managerEvent language="en_US" name="QueueMemberPaused">
<managerEventInstance class="EVENT_FLAG_AGENT">
<synopsis>Raised when a member is paused/unpaused in the queue.</synopsis>
<syntax>
<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter)" />
<parameter name="Reason">
<para>The reason a member was paused.</para>
</parameter>
</syntax>
<see-also>
<ref type="application">PauseQueueMember</ref>
<ref type="application">UnPauseQueueMember</ref>
</see-also>
</managerEventInstance>
</managerEvent>
<managerEvent language="en_US" name="QueueMemberPenalty">
<managerEventInstance class="EVENT_FLAG_AGENT">
<synopsis>Raised when a member's penalty is changed.</synopsis>
<syntax>
<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter)" />