You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/tools/default-tools.mdx
+43-21Lines changed: 43 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -62,9 +62,9 @@ This function is provided when `endCall` is included in the assistant's list of
62
62
}
63
63
```
64
64
65
-
#### Dial Keypad (DTMF)
65
+
#### Send Text
66
66
67
-
This function is provided when `dtmf` is included in the assistant's list of available tools (see configuration options [here](/api-reference/assistants/create#request.body.model.openai.tools.dtmf)). The assistant will be able to enter digits on the keypad.
67
+
This function is provided when `sms` is included in the assistant's list of available tool (see configuration options [here](/api-reference/assistants/create#request.body.model.openai.tools.sms)). The assistant can use this function to send SMS messages using a configured Twilio account.
68
68
69
69
```json
70
70
{
@@ -74,31 +74,24 @@ This function is provided when `dtmf` is included in the assistant's list of ava
74
74
"messages": [
75
75
{
76
76
"role": "system",
77
-
"content": "You are an assistant at a law firm. When you hit a menu, use the dtmf function to enter the digits."
77
+
"content": "You are an assistant. When the user asks you to send a text message, use the sms function."
78
78
}
79
79
],
80
80
"tools": [
81
81
{
82
-
"type": "dtmf"
82
+
"type": "sms",
83
+
"metadata": {
84
+
"from": "+15551234567"
85
+
}
83
86
}
84
87
]
85
88
}
86
89
}
87
90
```
88
91
89
-
<Note>
90
-
There are three methods for sending DTMF in a phone call:
91
-
92
-
1.**In-band DTMF**: DTMF tones are transmitted as part of the regular audio stream. This is the simplest method, but it can suffer from quality issues if the audio stream is compressed or degraded.
93
-
2.**Out-of-band DTMF via RFC 2833**: This method sends DTMF tones separately from the audio stream, within RTP (Real-Time Protocol) packets. It's typically more reliable than in-band DTMF, particularly for VoIP applications where the audio stream might be compressed. RFC 2833 is the standard that initially defined this method. It is now replaced by RFC 4733 but this method is still referred by RFC 2833.
94
-
3.**Out-of-band DTMF via SIP INFO messages**: In this approach, DTMF tones are sent as separate SIP INFO messages. While this can be more reliable than in-band DTMF, it's not as widely supported as the RFC 2833 method.
95
-
96
-
As of writing, Vapi's DTMF tool uses in-band DTMF. Please note that this method may not work with certain IVRs. If you are running into this issue, the recommended approach is to have your assistant say the options out loud if available. For example, when an IVR says "Press 1 or say Sales for the Sales department," prefer having the assistant say "Sales."
97
-
</Note>
98
-
99
-
#### Send Text
92
+
#### Dial Keypad (DTMF)
100
93
101
-
This function is provided when `sms` is included in the assistant’s list of available tool (see configuration options [here](/api-reference/assistants/create#request.body.model.openai.tools.sms)). The assistant can use this function to send SMS messages using a configured Twilio account.
94
+
This function is provided when `dtmf` is included in the assistant's list of available tools (see configuration options [here](/api-reference/assistants/create#request.body.model.openai.tools.dtmf)). The assistant will be able to enter digits on the keypad.
102
95
103
96
```json
104
97
{
@@ -108,21 +101,50 @@ This function is provided when `sms` is included in the assistant’s list of av
108
101
"messages": [
109
102
{
110
103
"role": "system",
111
-
"content": "You are an assistant. When the user asks you to send a text message, use the sms function."
104
+
"content": "You are an assistant at a law firm. When you hit a menu, use the dtmf function to enter the digits."
112
105
}
113
106
],
114
107
"tools": [
115
108
{
116
-
"type": "sms",
117
-
"metadata": {
118
-
"from": "+15551234567"
119
-
}
109
+
"type": "dtmf"
120
110
}
121
111
]
122
112
}
123
113
}
124
114
```
125
115
116
+
There are three methods for sending DTMF in a phone call:
117
+
118
+
1.**In-band**: tones are transmitted as part of the regular audio stream. This is the simplest method, but it can suffer from quality issues if the audio stream is compressed or degraded.
119
+
2.**Out-of-band via RFC 2833**: tones are transmitted separately from the audio stream, within RTP (Real-Time Protocol) packets. It's typically more reliable than in-band DTMF, particularly for VoIP applications where the audio stream might be compressed. RFC 2833 is the standard that initially defined this method. It is now replaced by RFC 4733 but this method is still referred by RFC 2833.
120
+
3.**Out-of-band via SIP INFO messages**: tones are sent as separate SIP INFO messages. While this can be more reliable than in-band DTMF, it's not as widely supported as the RFC 2833 method.
121
+
122
+
<Note>
123
+
Vapi's DTMF tool uses in-band method. Please note that this method may not work with certain IVRs. If you are running into this issue, the recommended approach is to have your assistant say the options out loud if available. For example, when an IVR says "Press 1 or say Sales for the Sales department," prefer having the assistant say "Sales."
124
+
</Note>
125
+
126
+
##### Tool Effectiveness
127
+
128
+
To evaluate this tool, we set up a Vapi assistant with the DTMF tool enabled and conducted calls to a range of IVR systems, including a Twilio IVR (configured via Studio Flows) and several third-party IVRs such as pharmacies and insurance companies.
129
+
130
+
**Testing Methodology**
131
+
132
+
We called and navigated through the IVRs using three different strategies:
133
+
134
+
1.**Direct Dialpad**: calling from a personal phone and dialing options using the dialpad.
135
+
2.**Vapi DTMF Tool**: an assistant configured with the DTMF tool.
136
+
3.**Manual DTMF Sound**: calling from a personal phone and playing DTMF tones generated by software. _(similar approach as the Vapi DTMF Tool)_
137
+
138
+
**Key Findings**
139
+
140
+
- The assistant successfully navigated some of the third-party IVRs.
141
+
- The assistant encountered issues with Twilio IVRs, likely due to Twilio’s preference for RFC 2833.
142
+
- Observed occasional delays in DTMF tone transmission, which may affect effectiveness with IVRs that have short timeouts.
143
+
144
+
**Conclusion**
145
+
146
+
The tool's effectiveness depends on the IVR system's configuration and DTMF capturing method. We are working to improve compatibility and reduce transmission delays for broader and more reliable support.
0 commit comments