Skip to content

Commit bb3c3f1

Browse files
committed
Added docs for warm-transfer-with-twiml
1 parent 9779578 commit bb3c3f1

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

fern/call-forwarding.mdx

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,25 @@ In this mode, Vapi delivers a custom static message to the recipient before tran
220220
}
221221
```
222222

223+
#### 3. Warm Transfer with TwiML
224+
225+
In this mode, Vapi executes TwiML instructions on the destination call leg before connecting the customer.
226+
227+
* **Configuration:**
228+
* Set the `mode` to `"warm-transfer-with-twiml"`.
229+
* Provide the TwiML instructions in the `twiml` property.
230+
* Supports only `Play`, `Say`, `Gather`, `Hangup`, and `Pause` verbs.
231+
* Maximum TwiML length is 4096 characters.
232+
233+
* **Example:**
234+
235+
```json
236+
"transferPlan": {
237+
"mode": "warm-transfer-with-twiml",
238+
"twiml": "<Say>Hello, transferring a customer to you.</Say><Pause length=\"2\"/><Say>They called about billing questions.</Say>"
239+
}
240+
```
241+
223242
#### Complete Example
224243

225244
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
259278
}
260279
```
261280

281+
Here is a full example of a `transferCall` payload using the warm transfer with TwiML mode:
282+
283+
```json
284+
{
285+
"type": "transferCall",
286+
"messages": [
287+
{
288+
"type": "request-start",
289+
"content": "I'll transfer you to someone who can help."
290+
}
291+
],
292+
"destinations": [
293+
{
294+
"type": "number",
295+
"number": "+14155551234",
296+
"description": "Transfer to customer support",
297+
"transferPlan": {
298+
"mode": "warm-transfer-with-twiml",
299+
"twiml": "<Say>Hello, this is an incoming call from a customer.</Say><Pause length=\"1\"/><Say>They have questions about their recent order.</Say><Pause length=\"1\"/><Say>Connecting you now.</Say>",
300+
"sipVerb": "refer"
301+
}
302+
}
303+
]
304+
}
305+
```
306+
262307
**Note:** In all warm transfer modes, the `{{transcript}}` variable contains the full transcript of the call and can be used within the `summaryPlan`.

0 commit comments

Comments
 (0)