Skip to content

Commit b041f32

Browse files
authored
Added docs for warm-transfer-with-twiml (#234)
* Added docs for warm-transfer-with-twiml * minor tweak
1 parent a0f4d81 commit b041f32

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

fern/call-forwarding.mdx

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,4 +259,50 @@ Here is a full example of a `transferCall` payload using the warm transfer with
259259
}
260260
```
261261

262+
#### 3. Warm Transfer with TwiML
263+
264+
In this mode, Vapi executes TwiML instructions on the destination call leg before connecting the destination number.
265+
266+
* **Configuration:**
267+
* Set the `mode` to `"warm-transfer-with-twiml"`.
268+
* Provide the TwiML instructions in the `twiml` property.
269+
* Supports only `Play`, `Say`, `Gather`, `Hangup`, and `Pause` verbs.
270+
* Maximum TwiML length is 4096 characters.
271+
272+
* **Example:**
273+
274+
```json
275+
"transferPlan": {
276+
"mode": "warm-transfer-with-twiml",
277+
"twiml": "<Say>Hello, transferring a customer to you.</Say><Pause length=\"2\"/><Say>They called about billing questions.</Say>"
278+
}
279+
```
280+
281+
282+
Here is a full example of a `transferCall` payload using the warm transfer with TwiML mode:
283+
284+
```json
285+
{
286+
"type": "transferCall",
287+
"messages": [
288+
{
289+
"type": "request-start",
290+
"content": "I'll transfer you to someone who can help."
291+
}
292+
],
293+
"destinations": [
294+
{
295+
"type": "number",
296+
"number": "+14155551234",
297+
"description": "Transfer to customer support",
298+
"transferPlan": {
299+
"mode": "warm-transfer-with-twiml",
300+
"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>",
301+
"sipVerb": "refer"
302+
}
303+
}
304+
]
305+
}
306+
```
307+
262308
**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)