RelayCall

queue_enter

View as MarkdownOpen in Claude

Place the call into a named queue. The caller waits in the queue until they are dequeued by another operation (such as an agent picking up) or removed via queue_leave().

This method emits calling.call.queue events. See Call Events for payload details.

Parameters

queue_name
strRequired

Name of the queue to enter.

control_id
Optional[str]

Custom control ID. Auto-generated if not provided.

status_url
Optional[str]

URL to receive queue status webhooks (position updates, dequeue events).

Returns

dict — Server response confirming the call entered the queue.

Example

from signalwire.relay import RelayClient
client = RelayClient(
project="your-project-id",
token="your-api-token",
host="your-space.signalwire.com",
contexts=["default"],
)
@client.on_call
async def handle_call(call):
await call.answer()
await call.play([{"type": "tts", "params": {"text": "You are being placed in the support queue."}}])
# Enter the queue
await call.queue_enter(
queue_name="support",
status_url="https://example.com/queue-status",
)
# The call stays in the queue until an agent dequeues it
client.run()