diff --git a/fern/call-forwarding.mdx b/fern/call-forwarding.mdx index 0cd5b5b2d..7079ffeaa 100644 --- a/fern/call-forwarding.mdx +++ b/fern/call-forwarding.mdx @@ -259,4 +259,50 @@ Here is a full example of a `transferCall` payload using the warm transfer with } ``` +#### 3. Warm Transfer with TwiML + +In this mode, Vapi executes TwiML instructions on the destination call leg before connecting the destination number. + +* **Configuration:** + * Set the `mode` to `"warm-transfer-with-twiml"`. + * Provide the TwiML instructions in the `twiml` property. + * Supports only `Play`, `Say`, `Gather`, `Hangup`, and `Pause` verbs. + * Maximum TwiML length is 4096 characters. + +* **Example:** + +```json +"transferPlan": { + "mode": "warm-transfer-with-twiml", + "twiml": "Hello, transferring a customer to you.They called about billing questions." +} +``` + + +Here is a full example of a `transferCall` payload using the warm transfer with TwiML mode: + +```json +{ + "type": "transferCall", + "messages": [ + { + "type": "request-start", + "content": "I'll transfer you to someone who can help." + } + ], + "destinations": [ + { + "type": "number", + "number": "+14155551234", + "description": "Transfer to customer support", + "transferPlan": { + "mode": "warm-transfer-with-twiml", + "twiml": "Hello, this is an incoming call from a customer.They have questions about their recent order.Connecting you now.", + "sipVerb": "refer" + } + } + ] +} +``` + **Note:** In all warm transfer modes, the `{{transcript}}` variable contains the full transcript of the call and can be used within the `summaryPlan`.