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

from signalwire.relay import RelayClient
client = RelayClient(
project="your-project-id",
token="your-api-token",
contexts=["default"],
)
@client.on_call
async def handle_call(call):
await call.answer()
action = await call.play([{"type": "tts", "params": {"text": "Transferring you now..."}}])
await action.wait()
result = await call.transfer("support-queue")
print(f"Transfer result: {result}")
client.run()