text stringlengths 0 152 |
|---|
Table 12-2. Output of queue show CLI command |
Field Description |
W: |
C: |
A: |
SL: |
Queue weight |
Number of calls presented to this queue |
Number of calls that have been answered by a member |
Service level |
Now that you’ve created the queues, you need to configure your dialplan to allow calls |
to enter the queue. |
Add the following dialplan logic to the extensions.conf file (somewhere in the [sets] |
context): |
exten => 610,1,Noop() |
same => n,Progress() |
same => n,Queue(sales) |
same => n,Hangup() |
214 |
| |
Chapter 12: Automatic Call Distribution Queues |
exten => 611,1,Noop() |
same => n,Progress() |
same => n,Queue(support) |
same => n,Hangup() |
Save the changes to your extensions.conf file, and reload the dialplan with the |
dialplan reload CLI command. |
If you dial extension 610 or 611 at this point, you will end up with output like the |
following: |
== Setting global variable 'SIPDOMAIN' to '172.29.1.178' |
-- Executing [610@sets:1] NoOp("PJSIP/SOFTPHONE_A-00000004", "") in new stack |
-- Executing [610@sets:2] Progress("PJSIP/SOFTPHONE_A-00000004", "") in new stack |
-- Executing [610@sets:3] Queue("PJSIP/SOFTPHONE_A-00000004", "test") in new stack |
> 0x7facc801ed60 -- Strict RTP learning after remote set to: 172.29.1.166:4022 |
-- Started music on hold, class 'testmoh', on channel 'PJSIP/SOFTPHONE_A-00000004' |
> 0x7facc801ed60 -- Strict RTP switching to RTP target 172.29.1.166:4022 as source |
> 0x7facc801ed60 -- Strict RTP learning complete - Locking on 172.29.1.166:4022 |
-- Stopped music on hold on PJSIP/SOFTPHONE_A-00000004 |
== Spawn extension (sets, 610, 3) exited non-zero on 'PJSIP/SOFTPHONE_A-00000004' |
Note that you won’t join the queue at this point because there are no agents in the |
queue to answer calls. We have joinempty=no and leavewhenempty=yes configured, |
so callers will not be placed into the queue. (This would be a good opportunity to |
experiment with the joinempty and leavewhenempty options in queues.conf to better |
understand their impact on queues.) |
In the next section, we’ll demonstrate how to add members to your queue (as well as |
other member interactions with the queue, such as pause/unpause). |
Queue Members |
Queues aren’t very useful without someone to answer the calls that come into them, |
so we need a method for allowing agents to be logged into the queues to answer calls. |
There are various ways of going about this, so we’ll show you how to add members to |
the queue both manually (as an administrator, via either the CLI or hardcoded in the |
queue_members table) and dynamically (as the agent, through an extension defined in |
the dialplan). We’ll start with the Asterisk CLI method, which allows you to easily add |
members to the queue for testing, with minimal dialplan changes. Next we’ll show |
how you can define members in the queue_members table. Finally, we’ll show you how |
to add dialplan logic that allows agents to log themselves into and out of the queues |
and to pause and unpause themselves in queues they are logged into (this is likely the |
best method for production). |
Queue Members |
| |
215 |
Controlling Queue Members via the CLI |
We can add queue members to any available queue through the Asterisk CLI com‐ |
mand queue add. The format of the queue add command is (all on one line): |
*CLI> queue add member channel to queue [[[penalty penalty] as |
membername] state_interface interface] |
The channel is the channel we want to add to the queue, such as SIP/0000FFFF0003, |
and the queue name will be something like support or sales—any queue name that |
exists in /etc/asterisk/queues.conf. For now we’ll ignore the penalty option, but we’ll |
discuss it in “Advanced Queues” on page 223 (penalty is used to control the rank of a |
member within a queue, which can be important for agents who are logged into mul‐ |
tiple queues, or have differing skills). We can define the membername to provide details |
to the queue-logging engine. |
The state_interface option informs the queue of the device state to be monitored |
for this agent. The details of how to work with device states are discussed in Chap‐ |
ter 13. Go ahead and work through that chapter, and then come back here and con‐ |
tinue on. Don’t worry, we’ll wait. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.