Skip to content

Commit 379b4ee

Browse files
author
stevenbdf
committed
feat: add test results
1 parent bf2ca22 commit 379b4ee

File tree

1 file changed

+43
-21
lines changed

1 file changed

+43
-21
lines changed

fern/tools/default-tools.mdx

Lines changed: 43 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ This function is provided when `endCall` is included in the assistant's list of
6262
}
6363
```
6464

65-
#### Dial Keypad (DTMF)
65+
#### Send Text
6666

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.
6868

6969
```json
7070
{
@@ -74,31 +74,24 @@ This function is provided when `dtmf` is included in the assistant's list of ava
7474
"messages": [
7575
{
7676
"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."
7878
}
7979
],
8080
"tools": [
8181
{
82-
"type": "dtmf"
82+
"type": "sms",
83+
"metadata": {
84+
"from": "+15551234567"
85+
}
8386
}
8487
]
8588
}
8689
}
8790
```
8891

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)
10093

101-
This function is provided when `sms` is included in the assistants 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.
10295

10396
```json
10497
{
@@ -108,21 +101,50 @@ This function is provided when `sms` is included in the assistant’s list of av
108101
"messages": [
109102
{
110103
"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."
112105
}
113106
],
114107
"tools": [
115108
{
116-
"type": "sms",
117-
"metadata": {
118-
"from": "+15551234567"
119-
}
109+
"type": "dtmf"
120110
}
121111
]
122112
}
123113
}
124114
```
125115

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.
147+
126148

127149
<Accordion title="Custom Functions: Deprecated">
128150
### Custom Functions

0 commit comments

Comments
 (0)