Is it posible to force the call ended reason to "v...
# support
y
Is there any way to force the "call ended" reason to be set to "voicemail"? Most of the time, Twilio doesn’t recognize that it has reached a voicemail. However, the AI seems to detect voicemail in the prompt and ends the call. When the AI ends the call, is it possible to automatically set the "call ended" reason to "voicemail," perhaps by invoking the voicemail tool? This is very important for us to properly follow our contactability protocol. cc: @hanzel_dzul
v
@Yoann C. Certainly! To ensure that the "call ended" reason is set to "voicemail" when the AI detects a voicemail, you can configure the voicemail detection settings within the VAPI. Since you mentioned that Twilio often doesn't recognize it has reached a voicemail, you can use the
assistantOverrides.voicemailDetection
object to fine-tune the voicemail detection. Here's what you can do: 1. Set the
provider
to
twilio
since that's the service you're using. 2. Configure the
voicemailDetectionTypes
to the types of voicemail detection you want to enable. This could include AI-based detection or other criteria. Once configured, the VAPI should automatically set the "call ended" reason to "voicemail" when the AI detects it. If you need to invoke a specific voicemail tool or function, please provide the name or details of the tool, and I can assist you further with that. If you're looking to update the settings right now, could you please provide the specific
voicemailDetectionTypes
you'd like to enable? If you need more information on how to configure these settings, please ask support for more info on this.
You can continue this conversation by mentioning me in the message.
y
Thank you. At the moment we have "voicemailDetectionTypes": [ "machine_end_beep", "machine_end_silence" ] In https://docs.vapi.ai/api-reference/assistants/get, I can see only the following options: machine_start, human, fax, unknown, machine_end_beep, machine_end_silence, machine_end_other How can I configure the parameters to set "voicemail" when the AI detects it?
@Vapi
v
@Yoann C. Based on the options available in the VAPI documentation, it seems that you are already using the relevant
voicemailDetectionTypes
to detect when a voicemail system has been reached (
machine_end_beep
and
machine_end_silence
). However, if you want to ensure that the "call ended" reason is explicitly set to "voicemail" when such a detection occurs, you might need to implement additional logic in your application to handle this. Here's a general approach you could take: 1. Monitor the call events for voicemail detection triggers (
machine_end_beep
or
machine_end_silence
). 2. When the AI detects a voicemail, use your application logic to set the "call ended" reason to "voicemail". This logic would typically be part of your call handling script or application code that interacts with the VAPI. If there is a specific tool or function provided by VAPI to set the "call ended" reason, you would call that function with the appropriate parameters. Unfortunately, without a specific tool or function name provided for setting the "call ended" reason, I cannot give you a precise code example or function call. If such a tool exists within the VAPI, please provide its name or further details, and I can assist you with how to invoke it. If you're unsure about the existence of such a tool or how to proceed, please ask support for more info on this.
c
You can't force a VM unless it literally goes to VM and it's detected.
s
@Yoann C. Instead of forcing the call end reason, you can use just the voicemail tool type without combining it with Twilio voicemail detection. This approach might work better for your needs. Let me know your thoughts on this.
y
Hi, @Shubham Bajaj just to be sure, you mean that instead of using: "voicemailDetection": { "provider": "twilio", "enabled": true, "machineDetectionTimeout": 10, "machineDetectionSpeechThreshold": 2500, "machineDetectionSpeechEndThreshold": 3000, "machineDetectionSilenceTimeout": 6000, "voicemailDetectionTypes": [ "machine_end_beep", "machine_end_silence", "machine_end_other" ] }, I should test with ? "voicemailDetection": { "voicemailDetectionTypes": [ "machine_end_beep", "machine_end_silence", "machine_end_other" ] },
s
@Yoann C. I meant to say don't use Twilio voicemail detection, instead use the voicemail tool only.
h
the documentation said you can use both, so I did, and sometimes it works with the voicemail message, other times it makes up a voicemail message, then says the voicemail message right after. do you think this is caused by using both twilio and the tool?
s
No not caused by using both, could you create a support ticket and ping me over there. Don't forget to share the call ids.