Voicemail detection beepMaxAwaitSeconds does not w...
# support
p
I'm using Vapi voicemail detection provider with the recommended settings https://docs.vapi.ai/calls/voicemail-detection#vapi-provider-recommended. The docs https://docs.vapi.ai/calls/voicemail-detection#important-beepmaxawaitseconds-configuration say that beepMaxAwaitSeconds is the maximum it will wait until reading the voicemail script. My interpretation of this is that it is meant as a stopgap for when we dont detect that its a voicemail using the provider. What I'm seeing in practice is that any value other than 0 makes this wait the whole wait period every time, even if a voicemail is detected in the logs. For support and example call is
019a28a3-d338-7aa8-a38c-eb55f0897e6b
. At 5s the voicemail recording stops, at 6s google returns
Customer detected as voicemail by google
, then silence until 25s when the max wait seconds is reached and the voicemail script is read. In contrast, if I set the beepMaxAwaitSeconds value to 0 which the docs recommends against I see the correct behavior 019a2856-f3cc-722b-a8ab-4d887ab9b20d: at 7s google detects voicemail and it reads the script immediately. Am I understanding this incorrectly? The way the docs are written makes it seem like many people are confused by this configuration. To me this seems like a clear bug. The detection is working properly but the assistant is not reacting to it when beepMaxAwaitSeconds is set. This section of the docs is incorrect in my experience "If beep detected early: Bot speaks immediately after the beep (optimal)". Any clarification or help debugging this would be very much appreciated! Thanks
v
Based on the documentation,
beepMaxAwaitSeconds
should allow the bot to speak immediately after a voicemail beep is detected, but your experience suggests it always waits the full period unless set to
0
. As a workaround, you can set
beepMaxAwaitSeconds: 0
to have the script play as soon as detection occurs, even though the docs recommend against this for most cases.
Copy code
json
"voicemailDetection": {
  "provider": "vapi",
  "beepMaxAwaitSeconds": 0
}
If this behavior is critical for your workflow, consider reporting it to Vapi support as a potential bug, since the observed behavior does not match the documentation's description. Source: - [Vapi Voicemail Detection Documentation](https://docs.vapi.ai/calls/voicemail-detection)
p
That is what I'm doing currently but it has some negative side effects as highlighted in the docs "Risk of low values: Bot may start speaking before the actual beep and get cut off by the voicemail system". cc @Vapi reporting this as a bug. Please let me know if theres somewhere else I should file this.
v
Hey! I can help you figure this out. From what you’re describing, it does seem like beepMaxAwaitSeconds isn’t acting as expected when a voicemail is detected early. Just to clarify—are you using the latest Vapi SDK, and do you have any custom logic running before the voicemail script? Once I know that, I can help debug why the assistant waits the full time instead of responding right away. @Pat
p
Hey @Vignxt Flow thanks for the quick reply! We're using the python sdk
vapi-server-sdk==1.7.3
to trigger calls. We dont have any custom logic, our voicemail_message contents are sent as an assistant_overrides with the call create request. Let me know if you need anything else from my end!
c
Hi Pat, To enhance voicemail detection accuracy, you can configure the detection settings for your assistants. Here are some key options and adjustments you might consider: 1. **Choose a Detection Provider**: - **Vapi**: Recommended for fast, accurate handling. - **Google**: Offers high accuracy with audio detection. - **OpenAI**: Allows for flexible phrasing with transcript detection. 2. **Voicemail Detection Configuration**: - Customize your detection with the
backoffPlan
and set appropriate values for
startAtSeconds
,
frequencySeconds
, and
maxRetries
. - Adjust
beepMaxAwaitSeconds
to ensure that your message times correctly with the voicemail beep. For most systems, a setting between 25-30 seconds is recommended. 3. **Use the Assistant-Controlled Voicemail Tool**: - If you require dynamic control over voicemail handling, the voicemail tool allows your assistant to determine when to leave a message based on detected indicators like "leave a message" or "at the tone." 4. **Pre-recorded Messages**: - For consistent clarity, use pre-recorded audio files for your messages, supporting
.mp3
or
.wav
files. For detailed configuration steps, refer to the [Voicemail Detection](https://docs.vapi.ai/calls/voicemail-detection) and [Voicemail Tool](https://docs.vapi.ai/tools/voicemail-tool) documentation. Adjust your settings based on your specific needs to optimize performance.
p
For what its worth I have had success with all other configuration options except beepMaxAwaitSeconds. It would also be helpful to hear about how termination of a call works in the mean time. The issue we have with beepMaxAwaitSeconds = 0 right now is that it starts early in some cases gets interrupted potentially multiple times, then the call ends while its reading the voicemail script (10s into the call) directly after it receives the final voicemail detected event. I suspect that fixing beepMaxAwaitSeconds will resolve this as well but any information on how
sending TERMINATE message
events are triggered would be helpful so we can make it less sensitive and allow the voicemail message to complete. Also the end call predefined function is disabled, so its not that.
v
Thanks for confirming that — that helps a lot. Since you’re on vapi-server-sdk==1.7.3 and using assistant_overrides directly, it’s possible the delay behavior is tied to how the SDK handles the provider event callback rather than your configuration itself. I’ve seen similar cases where the detection fires correctly, but the assistant doesn’t resume until the max wait timer expires. I can help you dig into the event flow and pinpoint where the delay occurs. Let’s move this to a private chat so I can review your call setup and logs in detail and help you fix it faster. @Pat
4 Views