Dequeue

Dequeue

The dequeue verb removes the lowest priority call from a specified queue and bridges that call to the current caller.

Note: Calls can optionally be enqueued with priority values that will dictate their order in the queue. If priorities are not specified, the queue will operate in FIFO (First-In, First-Out) order.

{
  "verb": "dequeue",
  "name": "support",
  "beep": true,
  "timeout": 60
}

You can use the following attributes with the dequeue command:

Option Description Required
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 to invoke when the call ends. If no webhook is provided, execution will continue with the next verb in the current application. 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
timeout Number of seconds to wait on an empty queue before returning (default: wait forever). No

The actionHook webhook will contain a dequeueResult property indicating the completion reason:

  • 'hangup' – The bridged call was abandoned while listening to the confirmHook message.
  • 'complete' – The call was successfully bridged and ended with a caller hangup.
  • 'timeout' – No call appeared in the named queue during the timeout interval.
  • 'error' – A system error of some kind occurred.

Ready To Get Started?