text stringlengths 0 152 |
|---|
Now that you’ve added callcounter=yes to sip.conf (we’ll be using SIP channels |
throughout the rest of our examples), let’s see how to add members to our queues |
from the Asterisk CLI. |
Adding a queue member to the support queue can be done with the queue add |
member command: |
*CLI> queue add member PJSIP/SOFTPHONE_B to support |
Added interface 'PJSIP/SOFTPHONE_B' to queue 'support' |
A query of the queue will verify that our new member has been added: |
*CLI> queue show support |
support has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talktime), |
W:0, C:0, A:0, SL:0.0%, SL2:0.0% within 0s |
Members: |
PJSIP/SOFTPHONE_B (ringinuse disabled) (dynamic) (Not in use) has taken no calls yet |
No Callers |
To remove a queue member, you would use the queue remove member command: |
*CLI> queue remove member PJSIP/SOFTPHONE_B from support |
Removed interface PJSIP/SOFTPHONE_B from queue 'support' |
Of course, you can use the queue show command again to verify that your member |
has been removed from the queue: |
*CLI> queue show support |
216 |
| |
Chapter 12: Automatic Call Distribution Queues |
support has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talktime), |
W:0, C:0, A:0, SL:0.0%, SL2:0.0% within 0s |
Members: |
PJSIP/SOFTPHONE_B (ringinuse disabled) (dynamic) (Not in use) has taken no calls yet |
No Callers |
We can also pause and unpause members in a queue from the Asterisk console, with |
the queue pause member and queue unpause member commands. They take a similar |
format to the previous commands we’ve been using: |
*CLI> queue pause member PJSIP/SOFTPHONE_B queue support reason Callbacks |
paused interface 'PJSIP/SOFTPHONE_B' in queue 'support' for reason 'Callbacks' |
*CLI> queue show support |
support has 0 calls (max unlimited) in 'rrmemory' strategy |
(0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s |
Members: |
SIP/0000FFFF0001 (dynamic) (paused) (Not in use) has taken no calls yet |
No Callers |
*CLI> queue show support |
support has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talktime), |
W:0, C:0, A:0, SL:0.0%, SL2:0.0% within 0s |
Members: |
PJSIP/SOFTPHONE_B (ringinuse disabled) (dynamic) (paused:Callbacks) (Not in use) |
has taken no calls yet |
No Callers |
By adding a reason for pausing the queue member, such as lunchtime, you ensure |
that your queue logs will contain some additional information that may be useful. |
Here’s how to unpause the member: |
*CLI> queue unpause member PJSIP/SOFTPHONE_B queue support reason FinishedCallBacks |
unpaused interface 'PJSIP/SOFTPHONE_B' in queue 'support' for reason 'FinishedCallbacks' |
In a production environment, the CLI would not normally be the best way to control |
the state of agents in a queue. Instead, there are dialplan applications that allow |
agents to inform the queue as to their availability. |
Defining Queue Members in the queue_members Table |
If you define a queue member in the asterisk.queue_members table of the database, |
that member will always be logged into the queue. This usually doesn’t work well if |
your members are human beings, since humans tend to get up and move about. |
Within each queue definition, you simply define the members thus: |
MySQL> insert into `asterisk`.`queue_members` |
(queue_name,interface,penalty) |
VALUES |
'hotline','PJSIP/SOME_NON_HUMAN','0'); |
Queue Members |
| |
217 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.