mirror of
https://github.com/jambonz/next-static-site.git
synced 2025-12-19 04:47:44 +00:00
Feat/queue enhancements (#70)
* queue changes * minor * dequeue changes * note release that priority queues were added in
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
# dequeue
|
# dequeue
|
||||||
The `dequeue` verb removes the a call from the front of a specified queue and bridges that call to the current caller.
|
The `dequeue` verb removes the lowest priority call from a specified queue and bridges that call to the current caller.
|
||||||
|
|
||||||
|
Note that (as of release 0.8.3-4) calls can optionally be [enqueued](/docs/webhooks/enqueue) with priority values that will dictate how they are ordered in the queue. If priorities are not specified then the queue will operate in FIFO order.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -15,6 +17,7 @@ You can use the following options in the `dequeue` command:
|
|||||||
| option | description | required |
|
| option | description | required |
|
||||||
| ------------- |-------------| -----|
|
| ------------- |-------------| -----|
|
||||||
| name | name of the queue | yes |
|
| name | name of the queue | yes |
|
||||||
|
| callSid | a specific call to dequeue; if not provided the lowest priority call or the call at the head of the queue will be dequeued | no|
|
||||||
| actionHook | A webhook invoke when call ends. If no webhook is provided, execution will continue with the next verb in the current application. <br/>See below for specified request parameters.| no |
|
| actionHook | A webhook invoke when call ends. If no webhook is provided, execution will continue with the next verb in the current application. <br/>See below for specified request parameters.| no |
|
||||||
| beep | if true, play a beep tone to this caller only just prior to connecting the queued call; this provides an auditory cue that the call is now connected | no |
|
| beep | if true, play a beep tone to this caller only just prior to connecting the queued call; this provides an auditory cue that the call is now connected | no |
|
||||||
| timeout | number of seconds to wait on an empty queue before returning (default: wait forever) | no |
|
| timeout | number of seconds to wait on an empty queue before returning (default: wait forever) | no |
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ You can use the following options in the `enqueue` command:
|
|||||||
| option | description | required |
|
| option | description | required |
|
||||||
| ------------- |-------------| -----|
|
| ------------- |-------------| -----|
|
||||||
| name | name of the queue | yes |
|
| name | name of the queue | yes |
|
||||||
|
| priority | (added in 0.8.3-4) optional priority value between 0 and 999. Calls are dequeued in priority order, lowest to highest| no (default: 999)|
|
||||||
| actionHook | A webhook invoke when operation completes. <br/>If a call is dequeued through the `leave` verb, the webook is immediately invoked. <br/>If the call has been bridged to another party via the `dequeue` verb, then the webhook is invoked after both parties have disconnected. <br/>If no webhook is provided, execution will continue with the next verb in the current application. <br/>See below for specified request parameters.| no |
|
| actionHook | A webhook invoke when operation completes. <br/>If a call is dequeued through the `leave` verb, the webook is immediately invoked. <br/>If the call has been bridged to another party via the `dequeue` verb, then the webhook is invoked after both parties have disconnected. <br/>If no webhook is provided, execution will continue with the next verb in the current application. <br/>See below for specified request parameters.| no |
|
||||||
| waitHook | A webhook to invoke while the caller is in queue. The only allowed verbs in the application returned from this webhook are `say`, `play`, `pause`, and `leave`, </br>See below for additional request parameters| no|
|
| waitHook | A webhook to invoke while the caller is in queue. The only allowed verbs in the application returned from this webhook are `say`, `play`, `pause`, and `leave`, </br>See below for additional request parameters| no|
|
||||||
|
|
||||||
@@ -27,6 +28,10 @@ The *actionHook* webhook will contain the following additional parameters:
|
|||||||
- 'bridged' - a `dequeue` verb caused the call to be bridged to another call
|
- 'bridged' - a `dequeue` verb caused the call to be bridged to another call
|
||||||
- 'error' - a system error of some kind occurred
|
- 'error' - a system error of some kind occurred
|
||||||
- `queueTime` - the number of seconds the call spent in queue
|
- `queueTime` - the number of seconds the call spent in queue
|
||||||
|
- `queueSize` - the number of calls remaining in queue
|
||||||
|
- `queuePosition` - the zero-based position of the call in queue before it was removed
|
||||||
|
- `callSid` - the unique identifier for the call
|
||||||
|
- `callId` - the sip Call-ID for the call
|
||||||
|
|
||||||
The *waitHook* webhook will contain the following additional parameters:
|
The *waitHook* webhook will contain the following additional parameters:
|
||||||
|
|
||||||
@@ -35,7 +40,7 @@ The *waitHook* webhook will contain the following additional parameters:
|
|||||||
- `queueTime`: the current number of seconds the call has spent in queue
|
- `queueTime`: the current number of seconds the call has spent in queue
|
||||||
- `queueSize`: the current number of calls in the queue
|
- `queueSize`: the current number of calls in the queue
|
||||||
|
|
||||||
YOu can also optionally receive [queue webhook notifications](/docs/webhooks/queue-notifications) any time a members joins or leaves a queue.
|
You can also optionally receive [queue webhook notifications](/docs/webhooks/queue-notifications) any time a members joins or leaves a queue.
|
||||||
|
|
||||||
<p class="flex">
|
<p class="flex">
|
||||||
<a href="/docs/webhooks/dtmf">Prev: dtmf</a>
|
<a href="/docs/webhooks/dtmf">Prev: dtmf</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user