diff --git a/fern/call-forwarding.mdx b/fern/call-forwarding.mdx
index 7079ffeaa..9bd4b567e 100644
--- a/fern/call-forwarding.mdx
+++ b/fern/call-forwarding.mdx
@@ -3,7 +3,6 @@ title: Call Forwarding
slug: call-forwarding
---
-
Vapi's call forwarding functionality allows you to redirect calls to different phone numbers based on specific conditions using tools. This guide explains how to set up and use the `transferCall` function for call forwarding.
## Key Concepts
@@ -53,17 +52,11 @@ The `transferCall` tool includes a list of destinations and corresponding messag
"properties": {
"destination": {
"type": "string",
- "enum": [
- "+1234567890",
- "+0987654321",
- "+1122334455"
- ],
+ "enum": ["+1234567890", "+0987654321", "+1122334455"],
"description": "The destination to transfer the call to."
}
},
- "required": [
- "destination"
- ]
+ "required": ["destination"]
}
},
"messages": [
@@ -106,6 +99,19 @@ The `transferCall` tool includes a list of destinations and corresponding messag
}
```
+You can also specify the `extension` parameter to forward the call to an extension.
+
+```json
+ "destinations": [
+ {
+ "type": "number",
+ "number": "+1234567890",
+ "extension": "4603",
+ "message": "I am forwarding your call to Department A. Please stay on the line."
+ }
+ ]
+```
+
### 2. Using the `transferCall` Function
When the assistant needs to forward a call, it uses the `transferCall` function with the appropriate destination:
@@ -119,7 +125,6 @@ When the assistant needs to forward a call, it uses the `transferCall` function
}
}
}
-
```
### 3. Customizing Messages
@@ -142,7 +147,6 @@ Customize the messages for each destination to provide clear information to the
}
]
}
-
```
## Instructing the Assistant
@@ -176,12 +180,13 @@ To implement a warm transfer, add a `transferPlan` object to the `transferCall`
In this mode, Vapi provides a summary of the call to the recipient before transferring.
-* **Configuration:**
- * Set the `mode` to `"warm-transfer-with-summary"`.
- * Define a `summaryPlan` specifying how the summary should be generated.
- * Use the `{{transcript}}` variable to include the call transcript.
+- **Configuration:**
+
+ - Set the `mode` to `"warm-transfer-with-summary"`.
+ - Define a `summaryPlan` specifying how the summary should be generated.
+ - Use the `{{transcript}}` variable to include the call transcript.
-* **Example:**
+- **Example:**
```json
"transferPlan": {
@@ -204,14 +209,15 @@ In this mode, Vapi provides a summary of the call to the recipient before transf
#### 2. Warm Transfer with Message
-In this mode, Vapi delivers a custom static message to the recipient before transferring the call.
+In this mode, Vapi delivers a custom message to the recipient before transferring the call.
+
+- **Configuration:**
-* **Configuration:**
- * Set the `mode` to `"warm-transfer-with-message"`.
- * Provide the custom message in the `message` property.
- * Note that the `{{transcript}}` variable is not available in this mode.
+ - Set the `mode` to `"warm-transfer-with-message"`.
+ - Provide the custom message in the `message` property.
+ - Note that the `{{transcript}}` variable is not available in this mode.
-* **Example:**
+- **Example:**
```json
"transferPlan": {
@@ -259,17 +265,69 @@ Here is a full example of a `transferCall` payload using the warm transfer with
}
```
-#### 3. Warm Transfer with TwiML
+#### 3. Warm Transfer with Wait and Say Message
+
+In this mode, Vapi waits for the recipient to speak first and then delivers a custom message to the recipient before transferring the call.
+
+- **Configuration:**
+
+ - Set the `mode` to `"warm-transfer-wait-for-operator-to-speak-first-and-then-say-message"`.
+ - Provide the custom message in the `message` property.
+ - Note that the `{{transcript}}` variable is not available in this mode.
+
+- **Example:**
+
+```json
+"transferPlan": {
+ "mode": "warm-transfer-wait-for-operator-to-speak-first-and-then-say-message",
+ "message": "Hey, this call has been forwarded through Vapi."
+}
+```
+
+#### 4. Warm Transfer with Wait and Say Summary
+
+In this mode, Vapi waits for the recipient to speak first and then delivers a summary of the call to the recipient before transferring the call.
+
+- **Configuration:**
+
+ - Set the `mode` to `"warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary"`.
+ - Define a `summaryPlan` specifying how the summary should be generated.
+ - Use the `{{transcript}}` variable to include the call transcript.
+
+- **Example:**
+
+```json
+"transferPlan": {
+ "mode": "warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary",
+ "summaryPlan": {
+ "enabled": true,
+ "messages": [
+ {
+ "role": "system",
+ "content": "Please provide a summary of the call."
+ },
+ {
+ "role": "user",
+ "content": "Here is the transcript:\n\n{{transcript}}\n\n"
+ }
+ ]
+ }
+}
+```
+
+#### 5. 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.
+- **Configuration:**
-* **Example:**
+ - Set the `mode` to `"warm-transfer-with-twiml"`.
+ - Provide the TwiML instructions in the `twiml` property.
+ - Supports only `Play`, `Say`, `Gather`, and `Pause` verbs.
+ - Maximum TwiML length is 4096 characters.
+ - TwiML must be provided as a single-line string without line breaks or tabs, and must be a valid XML string. For example: `Hello` is valid, but `Hello\n` is not.
+
+- **Example:**
```json
"transferPlan": {
@@ -278,7 +336,6 @@ In this mode, Vapi executes TwiML instructions on the destination call leg befor
}
```
-
Here is a full example of a `transferCall` payload using the warm transfer with TwiML mode:
```json
@@ -305,4 +362,7 @@ Here is a full example of a `transferCall` payload using the warm transfer with
}
```
-**Note:** In all warm transfer modes, the `{{transcript}}` variable contains the full transcript of the call and can be used within the `summaryPlan`.
+**Notes:**
+
+- In all warm transfer modes, the `{{transcript}}` variable contains the full transcript of the call and can be used within the `summaryPlan`.
+- For more details about transfer plans and configuration options, please refer to the [transferCall API documentation](https://docs.vapi.ai/api-reference/tools/create#request.body.transferCall.destinations.number.transferPlan)