***

title: swmlTransfer
slug: /reference/typescript/agents/function-result/swml-transfer
description: Transfer the call to a SWML endpoint with a custom AI response.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[connect]: /docs/server-sdks/reference/typescript/agents/function-result/connect

[functionresult]: /docs/server-sdks/reference/typescript/agents/function-result

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.

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

## **Parameters**

<ParamField path="dest" type="string" required={true} toc={true}>
  Destination URL for the transfer (a SWML endpoint, SIP address, etc.).
</ParamField>

<ParamField path="aiResponse" type="string" required={true} toc={true}>
  Text injected as `ai_response` via a SWML `set` verb before the transfer
  executes.
</ParamField>

<ParamField path="final" type="boolean" default="true" toc={true}>
  Whether this is a permanent transfer (`true`) or temporary (`false`).
</ParamField>

## **Returns**

[`FunctionResult`][functionresult] -- `this`, for chaining.

## **Example**

```typescript {4}
import { FunctionResult } from '@signalwire/sdk';

const result = new FunctionResult()
  .swmlTransfer('sip:support@example.com', 'Transferring you to support.');
```