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

1from signalwire.relay import RelayClient
2
3client = RelayClient(
4 project="your-project-id",
5 token="your-api-token",
6 host="your-space.signalwire.com",
7 contexts=["default"],
8)
9
10@client.on_call
11async def handle_call(call):
12 await call.answer()
13 await call.play([{"type": "tts", "text": "You are being placed in the support queue."}])
14
15 # Enter the queue
16 await call.queue_enter(
17 queue_name="support",
18 status_url="https://example.com/queue-status",
19 )
20
21 # The call stays in the queue until an agent dequeues it
22
23client.run()