Fails to Detect Voicemail Every Single Time
# support
n
Hi, I have been experimenting with Voicemail detection, I have tried to use the voicemail tool call (Vapi native) and Twilio's AMD but they never detect voicemail. With either of them enabled, when I call a phone number and it does not pick up and goes to voicemail, I can see the call status changes from
ringing
to
in-progress
. During voicemail it fails to detect voicemail and you cannot listen in since
listenUrl
websocket connection cannot be established during that time. After about 1 minute, I can see the call status changes to
ended
. I tried to debug via Vapi's dashboard but no recordings have been saved (as seen on screenshot). For reference, here is one of many calls that failed to detect voicemail -
cc9321cb-87e8-4980-801e-fe3951f8284f
. Thank you in advance for your help 🙂 https://cdn.discordapp.com/attachments/1336407849806462976/1336407850360242249/image.png?ex=67a3b24c&is=67a260cc&hm=63924cc0e4f569f1e3b6aa3146404ccb36e20e8512031668c29c7c303a9d8518&
v
message has been deleted
@N3squik Hello! I'm sorry to hear that you're experiencing issues with voicemail detection. It seems like you've been thorough in your testing with both VAPI's native voicemail detection and Twilio's Answering Machine Detection (AMD), but without the expected results. To assist you better, I'll need to gather a bit more information: 1. Could you confirm if the
voicemailDetection
is properly configured with the
enabled
property set to
true
? 2. Have you specified the
provider
for the voicemail detection? If so, which provider have you selected? 3. Are the
voicemailDetectionTypes
set to include the default values or have you customized them? Once I have this information, I'll be able to provide more targeted assistance. If there's a configuration issue, we can address it directly. If everything seems to be configured correctly, we may need to investigate further or escalate the issue to our technical support team. In the meantime, if you haven't already, please ensure that your webhook for voicemail detection is correctly set up to receive and handle the events, and that your network configurations allow for the
listenUrl
websocket connection to be established. Thank you for providing the call ID
cc9321cb-87e8-4980-801e-fe3951f8284f
. This will be helpful for the support team to trace the call logs and diagnose the issue. If you need immediate assistance, you can also reach out to our support team with this call ID for a more in-depth investigation.
You can continue this conversation by mentioning me in the message.
n
I used this guide - https://docs.vapi.ai/documentation/advanced-concepts/calls/voice-mail-detection I tried all options: 1. Default value (not specifying voicemail detection) 2.
Copy code
"voicemailDetection": {"provider": "twilio", "enabled": true}
3.
Copy code
"model": {"tools": [{ type: "voicemail" }]
s
logs
🔵 18:39:10:696 Call
cc9321cb-87e8-4980-801e-fe3951f8284f
Waited 300s But Transport Never Connected. @N3squik this call failed because twilio never connected with us, can you try making an another call?
n
Thanks @Shubham Bajaj for looking into it. But this happens on every call I make and dont answer the phone. Here is another call id -
3949ce53-c73f-4aba-96f9-795bf2f87bb6
For context, it does not happen when I answer the call. On pressing a random key number to skip Twilio's trial account message after answering the phone, the audio starts to stream fine.
s
@N3squik unless a call is picked you cannot detect if its a voicemail so eventually all calls have to terminate. To find out its a voicemail a call needs to be answered.
n
@Shubham Bajaj I am sorry but I do not understand how can it go to voicemail when the user picks up the phone. The whole point of voicemail is that the user does not pick up the phone. Same happens when the user ends call during ringing. As soon as hung up the call, the status changes to
in-progress
and is stuck for couple minutes before changing status to
ended
. Example call id "ae848f0a-e140-45bd-ac9a-7cdb2828cb33". Is this really how Vapi handles unanswered calls? I will end up reaching the concurrency limit really quickly because I have a bunch of calls stuck "in progress", waiting for the timeout. Also, for all such calls the ended reason is "Unknown Error", just seems like a bug.
@Shubham Bajaj @User @User @Sahil Maybe you can raise to the dev team for them to have a look in detail?
s
@N3squik Twilio calls have four states: queued, ringing, answered (in-progress), and completed. Even a voicemail is treated as an answered (in-progress) call by Twilio. This is what I meant earlier. We don’t set any timeouts—**as soon as we receive a status callback from Twilio, we update the status**. Regarding the unknown error: From what I can tell, the call never started. Here’s the flow I’m seeing: 1. You make a request to
api.vapi.ai/call/phone
. 2. We instruct Twilio to call the person. 3. The person picks up. 4. Twilio is supposed to send us
wss://phone-call-websocket.vapi.ai
, but this isn’t happening.
logs
🔵 14:49:02:289 Call
ae848f0a-e140-45bd-ac9a-7cdb2828cb33
Waited 300s But Transport Never Connected.
@N3squik For the benefit of doubts do you have other call IDs for which your getting
unknown-error
?
n
@Shubham Bajaj Correct my if I am wrong, Twilio should detect its Voicemail when the call
answered
, finish the call and respond to Vapi with
completed
. The unknown error happens for every call I make and dont answer/hang up. Here is another call_id -
b3e0efd1-dfb7-43c9-800d-5089cf55f9d6
. Could it be potentially because I am using trial version of Twilio? The reason I am saying is because when I answer the phone, I need to press any key before Twilio connects to Vapi.
v
The trail account has nothing do with unknown-error.
n
@Shubham Bajaj Then what do you suppose? I still seem to get it this error, does everyone has it too?
s
> for every call I make and dont answer/hang up. For these types of calls twilio is supposed to send us
customer-busy
or
customer-did-not-answer
> Correct my if I am wrong, Twilio should detect its Voicemail when the call answered, finish the call and respond to Vapi with completed. Your correct here. > Then what do you suppose? I still seem to get it this error, does everyone has it too? No everyone doesn't have this.
@N3squik I require assistance in comprehending the flow of events. When a call is initiated, it is either rejected or not answered, resulting in the display of an “unknown-error” message. If this scenario is accurate, essentially, the following sequence of events occurs: 1. A POST request is made to the URL /call. 2. Twilio is instructed to initiate the call, which is queued for execution. 3. Typically, Twilio promptly initiates the call and performs the necessary actions. 4. A background process monitors the call status within a time frame of 1-2 minutes. If the call has not been initiated by a call worker within this period, the call is marked as an “unknown-error.” However, this process fails to address the specific scenario you encountered, where Twilio is taking an extended period to initiate the call. Consequently, the call is erroneously marked as an “unknown-error.” @N3squikI would be delighted to discuss this further over the call. Please let me know if you are available to schedule a call.
n
@Shubham Bajaj Yeah lets schedule a call please, are you available on Saturday between 9am-6pm GMT?
s
can you send me a DM, so I can share my calendly link.
u
we have the same problem and same situation. was that solved ? we dont see the answer
n
No we are meeting next week to discuss. @@Shingokuga Out of curiosity are you also using your own Twilio and is it trial version?
u
Yeah, I saw me on your post xD
n
@Shubham Bajaj Tried calling with a different Twilio number and I tried the following default settings -
Copy code
voicemailDetection: {
  provider: "twilio",
  voicemailDetectionTypes: [
    "machine_start",
    "machine_end_beep",
    "machine_end_silence",
    "unknown",
    "machine_end_other"
  ],
  enabled: true,
  machineDetectionTimeout: 15,
  machineDetectionSpeechThreshold: 2500,
  machineDetectionSpeechEndThreshold: 2050,
  machineDetectionSilenceTimeout: 2000
}
Still no luck 😦
u
😢
s
@N3squik During our previous call, I noticed that when I made the call using my own numbers, the voicemail was detected. However, the numbers you own were not able to receive the call, indicating a potential telephony issue. Could you please verify the status of your number SHAKEN/STIR status? https://help.twilio.com/articles/1260803371030
n
@Shubham Bajaj I see, however this would only work if I call from US phone numbers - "We will enable SHAKEN/STIR for outbound calls on all United States numbers assigned to this Twilio Approved Business Profile." For context, I have bought UK phone number right from Twilio.
@Shubham Bajaj After upgrading from Twilio Trial to paid version, it looks like it solved the problem! 🙂 Could you still double check if that is Twilio's AMD that ends calls on Voicemail, I cant tell that from the logs. - 8bef7ec0-ef71-4eb0-9fe5-2f3543698d7f - d4118e11-ce5a-4204-a3ad-07a81ec4895c
s
@N3squik 🔵 13:09:23:665 [user LOG] Twilio detected "machine_end_beep" in 8919ms
I suggest checking out voicemail detection doc for saving the cost and increasing the voicemail detection success rate.
d
Hello, I have tried to set up the voicemail detection, but it is never detected. I have tried using Twilio, Vapi, Google, Openai as providers and still cannot detect the voicemail. When using VAPI the initial detection i tried was 0, 1 and 2 seconds. I have played round with the other configurations and it has never detected it is in voicemail. The call id is 9bba0466-fd27-40db-a2fd-d3bf742f3cd6, you can hear the "beep" from the voicemail, but the detection never happened.
v
Here is some configuration for more accurate detection for openAI. Let us know if you would like to try another config
Copy code
{
  "voicemailDetection": {
    "provider": "openai",
    "enabled": true,
    "backoffPlan": {
      "startAtSeconds": 3,
      "frequencySeconds": 6,
      "maxRetries": 4
    }
  }
}
d
no luck. I put the same config as mentioned { "voicemailDetection": { "provider": "openai", "enabled": true, "backoffPlan": { "startAtSeconds": 3, "frequencySeconds": 6, "maxRetries": 4 } } } And this is what i got: { "message": [ "voicemailDetection.property enabled should not exist" ], "error": "Bad Request", "statusCode": 400 } While trying without that line "enabled" the voicemaildetection was never triggered.
5 Views