Skip to content

Commit 1a94e4b

Browse files
authored
feat: add ivr navigation best practices (#641)
1 parent 0e25282 commit 1a94e4b

File tree

3 files changed

+103
-1
lines changed

3 files changed

+103
-1
lines changed

fern/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,9 @@ navigation:
296296
- page: Enterprise environments (DEV/UAT/PROD)
297297
path: enterprise/dev-uat-prod.mdx
298298
icon: fa-light fa-diagram-project
299+
- page: IVR navigation
300+
path: ivr-navigation.mdx
301+
icon: fa-light fa-phone-office
299302
- section: Testing
300303
collapsed: true
301304
icon: fa-light fa-clipboard-check

fern/ivr-navigation.mdx

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
title: IVR Navigation
3+
subtitle: How to navigate IVR menu systems effectively
4+
slug: ivr-navigation
5+
---
6+
7+
## Overview
8+
9+
Vapi offers the [DTMF tool](https://docs.vapi.ai/tools/default-tools#dial-keypad-dtmf) to enable your assistants to navigate IVR menus and enter digits (for example, member IDs, account numbers, and dates).
10+
11+
IVR systems can be sensitive to timing and formatting; this guide explains common challenges and provides practical recommendations to make IVR navigation reliable.
12+
13+
## Recommendations
14+
15+
### 1. Add short pauses between digits
16+
17+
Some IVRs buffer audio or expect digits at a slower pace. Sending digits too quickly (for example, `123456#`) can cause missed or misread inputs. Prompt your assistant to insert brief pauses between digits, so it has better chances of success, as it gives the IVR more time to register each tone.
18+
19+
Provider-specific pause characters
20+
21+
- **Twilio / Telnyx**: Use `w` for a 0.5s pause, `W` for a 1s pause. Example: `1w2w3W4#`
22+
- **Vonage**: Use `p` for a 0.5s pause. Example: `1p2p3#`
23+
24+
Start with 0.5s pauses and increase only if digits are still missed.
25+
26+
<Warning>Vapi phone numbers and BYOK SIP do not support pause characters at this time.</Warning>
27+
28+
### 2. Give menus time to finish before responding
29+
30+
IVR menus often speak slowly and include longer silences than typical user speech. If your assistant responds too quickly, it may send tones before the IVR has finished listing options and there's a chance that is not ready to receive inputs.
31+
32+
- **Wait for all options to be spoken** before sending the first DTMF sequence.
33+
- **Stay silent while waiting** by replying with a single space character (" ") so nothing is spoken.
34+
- **Avoid overlapping speech** with IVR audio; prioritize listening until the option is clear.
35+
36+
**Prompt Example**
37+
38+
```txt
39+
[When navigating an IVR tree]
40+
- WAIT for all options to be spoken before proceeding
41+
- Once you have heard all options, use the dtmf tool with an input digit that matches the option you want to select
42+
- Avoid saying anything if using the dtmf tool at the same time
43+
44+
[When waiting]
45+
- Reply with an empty string like " " to ensure nothing is spoken
46+
47+
[Call Flow]
48+
1. Navigate IVR tree (if needed)
49+
- In order to get connected with a live representative that can handle your request, you may need to navigate an IVR tree.
50+
- This might sound like "Press 1 for..."
51+
- Look for options that indicate operator assistance
52+
- As soon as you get connected to a human, proceed to the next step
53+
```
54+
55+
**LiveKit Smart Endpointing**
56+
57+
Use a [startSpeakingPlan](https://docs.vapi.ai/customization/speech-configuration#start-speaking-plan) that allows slower cadence at the beginning of calls (commonly when interacting with IVRs) and faster cadence once a human answers.
58+
59+
```json title="startSpeakingPlan"
60+
{
61+
"startSpeakingPlan": {
62+
"smartEndpointingPlan": {
63+
"provider": "livekit",
64+
"waitFunction": "t < 30 ? (x * 500 + 300) : (20 + 500 * sqrt(x) + 2500 * x^3)"
65+
}
66+
}
67+
}
68+
```
69+
70+
<Info>In the waitFunction, <code>t</code> represents <strong>time elapsed in seconds</strong>. This function favors slower responses in the first 30 seconds, then accelerates for human conversations. Adjust the threshold and coefficients to match your IVR timing and human conversation cadence.</Info>
71+
72+
### 3. Retry with progressively slower inputs or spoken fallback
73+
74+
Some IVRs accept inputs more reliably on a second attempt or when digits arrive more slowly. If digits fail, retry with increased spacing; if tones still fail, speak the option out loud as a fallback.
75+
76+
Examples:
77+
78+
```txt title="Progressive retries"
79+
1st try → 123# (fast)
80+
2nd try → 1w2w3# (medium; 0.5s gaps)
81+
3rd try → 1W2W3# (slow; 1s gaps)
82+
```
83+
84+
```txt title="Fallback to spoken input"
85+
User: For Sales press 1 or say "Sales"
86+
Assistant: dtmf(digits=1)
87+
User: For Sales press 1 or say "Sales"
88+
Assistant: dtmf(digits=w1)
89+
User: For Sales press 1 or say "Sales"
90+
Assistant: Sales
91+
```
92+
93+
### 4. Compare telephony transports for your target IVRs
94+
95+
DTMF sending varies across telephony providers due to internal implementations. For the phone numbers and IVRs you target, test multiple transports and choose the most reliable for your use case.
96+
97+
- **Try and compare**: Twilio, Telnyx, Vonage, Vapi Numbers, and BYOK SIP
98+
- **Evaluate**: digit recognition accuracy, latency between digits, and success rate across menu depths.
99+

fern/tools/default-tools.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ There are three methods for sending DTMF in a phone call:
124124

125125
<Note>
126126
Vapi's DTMF tool integrates with telephony provider APIs to send DTMF tones using the out-of-band RFC 2833 method. This approach is widely supported and more reliable for transmitting the signals, especially in VoIP environments.
127-
Note, the tool's effectiveness depends on the IVR system's configuration and their capturing method. If you are running into issues, try different telephony providers or have your assistant say the options out loud if available.
127+
Note, the tool's effectiveness depends on the IVR system's configuration and their capturing method. See our [IVR navigation guide](https://docs.vapi.ai/tools/ivr-navigation) for best practices.
128128
</Note>
129129

130130
#### API Request

0 commit comments

Comments
 (0)