enter_queue
enter_queue
enter_queue
Place the current call in a named queue where it will wait to be connected to an available agent or resource.
While waiting, callers will hear music or custom audio.
When an agent connects to the queue (using the connect method), the caller and agent are bridged together.
After the bridge completes (when the agent or caller hangs up), execution continues with the SWML script specified in transfer_after_bridge.
An object that accepts the following properties.
Name of the queue to enter. If a queue with this name does not exist, it will be automatically created.
SWML to execute after the bridge completes (when the agent or caller hangs up). This defines what should happen after the call is connected to an agent and the bridge ends.
Can be either:
HTTP or HTTPS URL to deliver queue status events. Status events will be sent via HTTP POST requests. See Queue Status Callbacks for event details.
URL for media to play while waiting in the queue. The file will be fetched using an HTTP GET request. Supported audio formats include:
WAV (audio/wav, audio/wave, audio/x-wav)MP3 (audio/mpeg)AIFF (audio/aiff, audio/x-aifc, audio/x-aiff)GSM (audio/x-gsm, audio/gsm)μ-law (audio/ulaw)Default hold music will be played if not set.
Maximum time in seconds to wait in the queue before timeout.
When you provide a status_url, SignalWire will send HTTP POST requests to that URL for the following queue events.
The type of event that is being reported. Will always be calling.call.queue for queue events.
The SWML channel identifier for the call (format: swml:{uuid}).
Unix timestamp with microsecond precision indicating when the event occurred.
The SignalWire project ID (UUID format).
The SignalWire Space ID (UUID format).
An object containing the event-specific parameters.
The event type identifier.
Possible Values:
enqueue - Caller added to queueleave - Caller left without being bridgeddequeue - Caller pulled from queue and bridgedUnique queue entry identifier (UUID format).
The name of the queue.
The caller’s position in the queue. Set to 0 when dequeued.
The total number of callers in the queue. Set to 0 when dequeued.
Average wait time in the queue (in seconds).
Unix timestamp in microseconds when the caller entered the queue. Set to 0 in dequeue events.
Unix timestamp in microseconds when the caller was dequeued. Set to 0 in enqueue and leave events, populated in dequeue events.
Unix timestamp in microseconds when the caller left the queue. Set to 0 in enqueue and dequeue events, populated in leave events.
The callback URL that was configured for status events.
Control identifier (UUID format). Present in enqueue and leave events. May be null in dequeue events.
The call identifier (UUID format).
The node identifier where the call is being processed (format: {uuid}@{region}).
enqueue EventSent when a caller is added to the queue.
leave EventSent when a caller leaves the queue without being bridged to another call (e.g., timeout, hangup).
dequeue EventSent when a caller is pulled out of the queue and bridged with another caller.
Set by the method:
entering - Call is entering the queueconnecting - Call is in the process of connecting to an agentconnected - Successfully connected to an agentleaving - Call is leaving the queuetimeout - Waited too long and timed outhangup - Caller hung up while waitingfailed - Queue operation failed due to an error