<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>AddQueueMember()</title><link rel="stylesheet" href="styles.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /><link rel="start" href="index.html" title="Asterisk™: The Future of Telephony" /><link rel="up" href="asterisk-APP-B.html" title="Appendix B. Application Reference" /><link rel="prev" href="asterisk-APP-B.html" title="Appendix B. Application Reference" /><link rel="next" href="asterisk-APP-B-5.html" title="ADSIProg()" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">AddQueueMember()</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="asterisk-APP-B.html">Prev</a> </td><th width="60%" align="center">Appendix B. Application Reference</th><td width="20%" align="right"> <a accesskey="n" href="asterisk-APP-B-5.html">Next</a></td></tr></table><hr /></div><div class="refentry" lang="en" xml:lang="en"><a id="asterisk-APP-B-3"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>AddQueueMember() — Dynamically adds queue members to the specified call queue</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><a id="I_programlisting_tt2088"></a><pre class="programlisting">AddQueueMember(<em class="replaceable"><code>queuename</code></em>[,<em class="replaceable"><code>interface</code></em>[,<em class="replaceable"><code>penalty</code></em>,[<em class="replaceable"><code>option</code></em>,[<em class="replaceable"><code>membername</code></em>]]]])</pre></div><div class="refsect1" lang="en" xml:lang="en"><a id="id4175301"></a><h2></h2><p><a id="I_indexterm_tt2089" class="indexterm"></a>Dynamically adds the specified <em class="replaceable"><code>interface</code></em> to an existing queue named <em class="replaceable"><code>queuename</code></em>, as specified in <a href="asterisk-APP-D-SECT-34.html" title="queues.conf"><code class="filename">queues.conf</code></a>. If specified, <em class="replaceable"><code>penalty</code></em> sets the penalty for queues to use this member. Members with a lower penalty are called before members with a higher <span class="keep-together">penalty</span>.</p><p>The <code class="literal">AddQueueMember()</code> application sets a channel variable named <code class="literal">AQMSTATUS</code> upon completion. The <code class="literal">AQMSTATUS</code> variable will be set to one of the following values:</p><table class="simplelist" border="0" summary="Simple list"><tr><td> <code class="literal">ADDED</code> </td></tr><tr><td> <code class="literal">MEMBERALREADY</code> </td></tr><tr><td> <code class="literal">NOSUCHQUEUE</code> </td></tr></table><p>Calling <code class="literal">AddQueueMember()</code> without an <em class="replaceable"><code>interface</code></em> argument will use the interface that the caller is currently using.</p><p>If the <em class="replaceable"><code>option</code></em> argument is set to <code class="literal">j</code>, Asterisk cannot add the <em class="replaceable"><code>interface</code></em> to the specified queue, and there exists an <code class="literal">n</code>+101 priority (where <code class="literal">n</code> is the number of the current priority), the call will jump to that priority.</p><p>The <em class="replaceable"><code>membername</code></em> argument may be set to the name of the queue member. Consequently, this name will show up in the entries of the <code class="filename">queue_log</code> as well as Asterisk Manager Interface events, making it easier to identify the agent for reporting purposes:</p><a id="I_programlisting_tt2090"></a><pre class="programlisting">; add SIP/3000 to the techsupport queue, with a penalty of 1 <span class="strong"><strong>exten => 123,1,AddQueueMember(techsupport,SIP/3000,1)</strong></span></pre></div><div class="refsect1" lang="en" xml:lang="en"><a id="asterisk-APP-B-4"></a><h2>See Also</h2><p><a href="asterisk-APP-B-144.html" title="Queue()"><span class="refentrytitle">Queue()</span></a>, <a href="asterisk-APP-B-153.html" title="RemoveQueueMember()"><span class="refentrytitle">RemoveQueueMember()</span></a>, <a href="asterisk-APP-B-132.html" title="PauseQueueMember()"><span class="refentrytitle">PauseQueueMember()</span></a>, <a href="asterisk-APP-B-231.html" title="UnpauseQueueMember()"><span class="refentrytitle">UnpauseQueueMember()</span></a>, <a href="asterisk-APP-B-9.html" title="AgentLogin()"><span class="refentrytitle">AgentLogin()</span></a> , <a href="asterisk-APP-D-SECT-34.html" title="queues.conf"><code class="filename">queues.conf</code></a></p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="asterisk-APP-B.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="asterisk-APP-B.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="asterisk-APP-B-5.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix B. Application Reference </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> ADSIProg()</td></tr></table></div><div xmlns="" id="svn-footer"><hr /><p>You are reading <em>Asterisk: The Future of Telephony</em> (2nd Edition for Asterisk 1.4), by Jim van Meggelen, Jared Smith, and Leif Madsen.<br /> This work is licensed under the <a href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative Commons Attribution-Noncommercial-No Derivative Works License v3.0</a>.<br /> To submit comments, corrections, or other contributions to the text, please visit <a href="http://oreilly.com/catalog/9780596510480/">http://www.oreilly.com/</a>.</p></div></body></html>