Seygi
03/31/2025, 8:14 PMVapi Support Bot
03/31/2025, 8:16 PMjson
"voicemailDetection": {
"provider": "twilio",
"voicemailDetectionTypes": [
"machine_end_beep",
"machine_end_silence",
"human",
"fax",
"unknown",
"machine_end_other"
],
"enabled": true,
"machineDetectionTimeout": 45,
"machineDetectionSpeechThreshold": 2400,
"machineDetectionSpeechEndThreshold": 2400,
"machineDetectionSilenceTimeout": 6000
}
3. Include the endCall tool in your assistant configuration - Add the endCall
tool to your assistant's available tools:
json
{
"model": {
"provider": "openai",
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "system",
"content": "You are an assistant. When voicemail is detected, use the endCall function."
}
],
"tools": [
{
"type": "endCall"
}
]
}
}
4. Update your system prompt - Modify your assistant's system prompt to include instructions for handling voicemail detection. For example:
```Vapi Support Bot
03/31/2025, 8:16 PM5. **Enable Vapi's built-in voicemail tool** - Add the voicemail tool to your model configuration:
```json
"tools": [
{ "type": "voicemail" },
{ "type": "endCall" }
]
When voicemail is detected, your assistant will trigger the endCall
tool based on your system prompt instructions.
Is there anything specific about this setup you'd like me to explain in more detail?
Source:
- [Vapi documentation](https://docs.vapi.ai/phone-calling/voice-mail-detection)Praveen Nair
03/31/2025, 10:53 PM