Skip to content

<Enqueue>

Put the caller in a TaskRouter queue to wait for an agent.

Puts the caller in a TaskRouter queue: the caller waits in a private conference (hearing waitUrl) while a task is created in workspaceSid for workflowSid, and an agent who accepts the task joins that conference. The text of <Enqueue> (a queue name) is not used. The optional <Task> child gives the task’s attributes as JSON; the call SID is always added (as callsid). The queue conference is recorded from the start unless the account’s recording policy suppresses it. Attribute names of <Enqueue> are matched in any letter case. Verbs after <Enqueue> run once the caller leaves the queue conference.

<Response>
<Enqueue workspaceSid="WS0123456789abcdef" workflowSid="WW0123456789abcdef"
waitUrl="https://example.com/queue-music.mp3">
<Task>{"type":"support","language":"en"}</Task>
</Enqueue>
</Response>

The element’s text is its value (see the description above).

Attribute Values Default Description
workspaceSid string — TaskRouter workspace the task is created in.
workflowSid string — TaskRouter workflow that routes the task.
taskChannelSid string — TaskRouter task channel of the task.
waitUrl An absolute http:// or https:// URL a classical music track Hold music or TinyML for the waiting caller, as <Conference waitUrl>.
waitUrlMethod GET, POST POST HTTP method for waitUrl.
action An absolute http:// or https:// URL — Stored on the task as its action URL for TaskRouter; SIPRTC itself does not request it.
method GET, POST — Accepted and ignored. Accepted; currently has no effect.
Element Description
<Task> Task attributes (and optional worker proficiency) for TaskRouter. Must be the first child.