swmlTransfer

View as MarkdownOpen in Claude

Transfer the call to a SWML endpoint. The aiResponse text is injected into the call flow via a SWML set verb before the transfer executes.

For simple phone-number or SIP transfers, use connect() instead. Use swmlTransfer() when you need to hand off to another SWML document and set up a return message.

Parameters

dest
stringRequired

Destination URL for the transfer (a SWML endpoint, SIP address, etc.).

aiResponse
stringRequired

Text injected as ai_response via a SWML set verb before the transfer executes.

final
booleanDefaults to true

Whether this is a permanent transfer (true) or temporary (false).

Returns

FunctionResultthis, for chaining.

Example

1import { FunctionResult } from '@signalwire/sdk';
2
3const result = new FunctionResult()
4 .swmlTransfer('sip:support@example.com', 'Transferring you to support.');