From bb3c3f1820fcb83d65dc76e91843a629dcb6ede6 Mon Sep 17 00:00:00 2001 From: Sri Date: Tue, 25 Feb 2025 11:24:05 -0800 Subject: [PATCH 1/2] Added docs for warm-transfer-with-twiml --- fern/call-forwarding.mdx | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/fern/call-forwarding.mdx b/fern/call-forwarding.mdx index 0cd5b5b2d..4cb34693e 100644 --- a/fern/call-forwarding.mdx +++ b/fern/call-forwarding.mdx @@ -220,6 +220,25 @@ In this mode, Vapi delivers a custom static message to the recipient before tran } ``` +#### 3. Warm Transfer with TwiML + +In this mode, Vapi executes TwiML instructions on the destination call leg before connecting the customer. + +* **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." +} +``` + #### Complete Example Here is a full example of a `transferCall` payload using the warm transfer with summary mode: @@ -259,4 +278,30 @@ Here is a full example of a `transferCall` payload using the warm transfer with } ``` +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`. From 918164d89ce9e4e44e0a786d953ede080d33d744 Mon Sep 17 00:00:00 2001 From: Sri Date: Tue, 25 Feb 2025 11:27:10 -0800 Subject: [PATCH 2/2] minor tweak --- fern/call-forwarding.mdx | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/fern/call-forwarding.mdx b/fern/call-forwarding.mdx index 4cb34693e..7079ffeaa 100644 --- a/fern/call-forwarding.mdx +++ b/fern/call-forwarding.mdx @@ -220,25 +220,6 @@ In this mode, Vapi delivers a custom static message to the recipient before tran } ``` -#### 3. Warm Transfer with TwiML - -In this mode, Vapi executes TwiML instructions on the destination call leg before connecting the customer. - -* **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." -} -``` - #### Complete Example Here is a full example of a `transferCall` payload using the warm transfer with summary mode: @@ -278,6 +259,26 @@ 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