RELAYCall

transfer

View as MarkdownOpen in Claude

Transfer control of the call to another RELAY application or SWML script. The current application loses control of the call after a successful transfer.

Parameters

dest
strRequired

The transfer destination. This can be a RELAY context name or a URL pointing to a SWML script.

Returns

dict — Server response confirming the transfer.

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 action = await call.play([{"type": "tts", "text": "Transferring you now..."}])
14 await action.wait()
15
16 result = await call.transfer("support-queue")
17 print(f"Transfer result: {result}")
18
19client.run()