Dequeue

Removes the lowest priority call from a specified queue and bridges that call to the current caller.

Calls can optionally be enqueued 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.

1{
2 "verb": "dequeue",
3 "name": "support",
4 "beep": true,
5 "timeout": 60
6}

Parameters

name
stringRequired

name of the queue

callSid
string

a specific call to dequeue; if not provided, the lowest priority call or the call at the head of the queue will be dequeued

actionHook
string

A webhook invoked 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.

beep
boolean

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

timeout
number

number of seconds to wait on an empty queue before returning (default: wait forever)

actionHook properties

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