rare-sapphire
rare-sapphire5mo ago

Twilio call quality is very bad. Is it twilio or Vapi?

Hi, Really enjoying using Vapi - its the best service for building voice bots. Although sometimes my calls are of the crazy bad quality. Like its just noize, and the speech cannot be recognized. Its weird because it happens on calls taken in quiet rooms in ideal environments. Is this something on the Twilio side? Any advice on how to fix it, or to debug? I attached the example of the recording downloaded from the Vapi. This call was taken in the ideal environment. I have 0 idea why the quality is so bad.
29 Replies
like-gold
like-gold5mo ago
@ihorcodes Hmmm.... Can you provide a slightly longer recording? it's a little hard to hear anything there.
rare-sapphire
rare-sapphireOP5mo ago
yeah, that's the point. the part when user is talking is unrecognizable. in the attached recording i kept the part when the bot it talking.
Sahil
Sahil5mo ago
Hey! To help track down this issue, could you share: - The call ID
This would really help us figure out what went wrong!
rare-sapphire
rare-sapphireOP5mo ago
Call ID: 679707fb-1a6d-44ce-ae86-29885346f32f
Sahil
Sahil5mo ago
it sounds like its twilio related. the Vapi assistant sounds clear and only the user side is a bit fuzzy. I would run some tests with just twilio just to try and isolate the issue. on your side, is the assistant sounding clear to you?
rare-sapphire
rare-sapphireOP5mo ago
thanks for confirming this. yes, i bought few numbers with Telnyx and i haven't experienced same issues
Sahil
Sahil5mo ago
glad we could confirm that. let us know if you have any issues with Telnyx or other providers regarding the same issue so we can dive deeper into the issue.
other-emerald
other-emerald5mo ago
I’m having a similar issue to the one mentioned above, but with Telnyx. The AI sounds perfectly clear on my end, but it can barely hear me. When I check the call logs, my voice is super compressed and almost unintelligible, so it's no surprise the agent can’t understand. Just before that, I had a regular phone call with a friend — no issues at all, they heard me perfectly — so it’s clearly not a problem with my phone. Here’s one example with the audio file attached: Call ID: b8754efb-ea17-49fb-9df6-5e8a43cb32dc Same issue on another call: Call ID: 41690194-3dcb-45d3-84ff-933f10c41941 Let me know if you have any idea where this might be coming from.
other-emerald
other-emerald5mo ago
Hey everyone, I was having an issue where the AI could barely hear me (super compressed voice), even though I could hear it perfectly. After a lot of testing, I finally found a fix that completely solves the problem. ✅ Switching to a manual SIP Trunking setup on Telnyx fixed everything. The audio is now crystal clear and the AI understands me without any issues. I followed this old VAPI tutorial https://docs.vapi.ai/advanced/sip/telnyx#2-configure-telnyx-for-inbound-calls (pretty outdated — broken screenshots, etc.), and after some trial and error, I got it working. Worth noting: I kept most of the config to its defaults, and I'm only dealing with inbound calls — I haven’t configured or tested anything for outbound calls. 🔁 Just to be sure, I switched back to the default Telnyx setup (via API Key Telnyx in VAPI / "Programmable Voice" in Telnyx) — and the issue came back immediately. So it’s definitely the SIP Trunking setup that makes it work. 📸 Here's a screenshot of my working setup. --- ⚠️ That said, I’m a bit concerned. I’m not sure if this is the “official” way to set things up, especially since the tutorial seems abandoned. And since I’m planning to use VAPI at a larger scale (dozens or even hundreds of calls per day), I really hope this config is stable and won’t break over time. 👉 Would be great to get confirmation from the VAPI team on whether this is a reliable long-term setup.
Telnyx SIP Integration
How to integrate SIP Telnyx to Vapi
No description
No description
No description
No description
like-gold
like-gold5mo ago
@Valentin | SiteXw @ihorcodes Now that I have a bit more context, and the recordings I downloaded and analyzed - here are my comments: - The issue you're exhibiting is not related to VAPI, it is related to the communications provider - there is no question about it. - It doesn't matter if you route it via Twilio or Telnyx, or any other carrier in the world for that matter, it could - and most probably would, happen again. - The audio issue you're experiencing is exhibited due to Network Jitter, causing audio packets to simply get lost in transit, what you hear as gaps in the audio. Now, here are a few things you need to remember: - Telnyx, Twilio, Plivo, or any other comapny has infrastructure in pre-set locations, not in every country in the world. - Calls are routed from the point of origin or to the point of destination, based upon Internet connectivity - and the Internet isn't a bullet proof place. - Carriers normally use g711 based codecs. These are 64kbps consuming, over an 8KHz sample rate. The recording of the VAPI side sounds more like 128kbps over a 16KHz or even a 24KHz sample rate. This means that the carrier must transcode the audio from VAPI, and vice versa - which introduces another latency and audio loss (when you transcode, you always lose some of the data, mathematically speaking). All things considered - when working in "exotic locations" (eg. not any of the following: US, West Europe, Middle East, Pacific) - you may run into these issues, depending on the carrier and their business relationships in the region.
other-emerald
other-emerald5mo ago
Okay, but as for me, I live in Paris (France, West Europe), I’m with Orange (the best carrier in France), and my phone uses Wi-Fi for calls (so the quality is superior). Moreover, the "SIP Trunking" mode in Telnyx works perfectly, whereas the "Programmable Voice" mode works very, very poorly (as previously mentioned). So I’m having a hard time understanding what you’re telling me.
like-gold
like-gold5mo ago
Well, programmable voice and elastic SIP trunking use 2 very different systems. Elastic SIP trunking is geared for improved transcoding and interconnecting capability programmable voice is geared towards localized services the internal routing of these services at Telnyx and Twilio is different
other-emerald
other-emerald5mo ago
In the case of the "Programmable Voice" mode, what do you make of the first line of my message?
like-gold
like-gold5mo ago
What do you mean ?
other-emerald
other-emerald5mo ago
I mean that what you're highlighting is at odds with what I'm observing on my end. You're talking about network instability and various other issues, but in my case, pretty much everything is aligned for things to work properly. That's why I don't understand where the problem is coming from. In the end, my issue is more or less resolved, since if I switch to "SIP Trunking" mode, it's perfectly stable. The problem I have with this method is that call forwarding to another number doesn't work (for example, when the caller asks to speak to a human). Whereas call forwarding works just fine in "Programmable Voice" mode... It's never-ending...
like-gold
like-gold5mo ago
Did you enable SIP REFER support in your SIP trunk? Oh, telnyx doesn't support that - if I'm not mistaken.
other-emerald
other-emerald5mo ago
I’m not really sure what it is, and I don’t see it anywhere in the Telnyx interface (although I did come across some references to it in their API documentation).
like-gold
like-gold5mo ago
Telnyx doesn't support that feature. However, what you can do is pass your telnyx SIP trunk via cloudonix (or a similar tool) and then by implementing the relevant API via an agent tool, you can obtain a similar functionality or even a better one. Regarding your first comment, the fact that your network is great, says nothing about what happens on the way from your network to anywhere else. It would be like saying that because traffic is flowing nicely at Gardenord, a traffic jam at the Notredam is impossible (I'm confident messed up the spelling)
flat-fuchsia
flat-fuchsia5mo ago
@Nir S (CEO/Founder @Cloudonix) how to do that do i have to pay an additional fee for the transfer call?
like-gold
like-gold4mo ago
@Toketo1 What do you mean, which "fee" are you referring to exactly ?
other-emerald
other-emerald4mo ago
Telnyx doesn't matter much to me, so what other solution can I use to do something that seems particularly basic to me on Vapi?
like-gold
like-gold4mo ago
@Valentin | SiteXw One of the fundamental problems with communications and telephony in general, is that it is considered simple and basic - while in fact, it is one of the most complicated pieces of technology and regulations ever invented. I've been in the telecom industry for the past 26 years - let's put it this way, picking up the phone and dialing, and getting the other side to answer - involves hundreds of little systems working together, making things happen. Your other option is to "go solo" - or to be more accurate - "take control of your fate". Personally speaking, I don't like buying numbers and services from Twilio/Telnyx and such, because I know very well they are marking up over 200% on the price (sometimes even 600%). For example, a call minute in the US costs between $0.004 to $0.006 per minute - Twilio/Telnyx sells is for $0.0115. Now, considering their service and what they do, it's a reasonable markup. But in other places, the difference is crazy. For example, in some countries they sell a minute for $0.12 per minute, while the actual price should be $0.012 - that's a 900% markup. So, my point is this - if you are located in France for example, you can get a SIP Trunk from a local carrier, and try to connect it directly to VAPI. If it works - GREAT, you saved alot of money. If it doesn't work directly, you can use Cloudonix to connect it - and you'll still save alot of money on your calls and numbers.
other-emerald
other-emerald4mo ago
Thank you for your feedback, I understand the point you're making. One thing I perhaps should have clarified from the start is that the call forwarding needs to be directed to a dedicated landline. So, in principle, if it's a VOIP line, could that solve my issue, since I wouldn't need to go through the traditional phone system? Can Vapi handle forwarding to a VOIP SIP line?
like-gold
like-gold4mo ago
Yes and no In order for VAPI to "forward" to your "SIP LINE", your original number needs to be provided via same link, as the agent can't use different links you can do something like that via Cloudonix - which will enable your agent to connect with multiple systems at the same time.
other-emerald
other-emerald4mo ago
I found this post mentioning the availability of "SIP REFER": https://telnyx.com/release-notes/transfer-calls-with-sip-refer-live And there's an example in the Vapi documentation with Telnyx: https://docs.vapi.ai/advanced/sip/sip-trunk#sip-refer-call-transfer
Telnyx
Call Transfer with SIP REFER
We’re excited to announce that Telnyx Voice API users can now transfer calls using the SIP Refer method.
SIP Trunking
How to integrate your SIP provider with Vapi
like-gold
like-gold4mo ago
The transfer shown is internal, namely, an inbound call via a Telnyx number to a PSTN number via Telnyx. I'm doubtful this method will work on a non-telnyx URI.
stormy-gold
stormy-gold4mo ago
@Toketo1 @Nir S (CEO/Founder @Cloudonix) @Valentin | SiteXw Do you happen to have the issue that, with SIP integration, Vapi doesn't identify rejected calls and voicemail? When it was integrated with the key, it could identify them. Now, it treats everything as answered and charges for it, even rejected calls.
like-gold
like-gold4mo ago
You mean rejection post transfer?
stormy-gold
stormy-gold4mo ago
No, simply when a call is rejected by the user or not answered.

Did you find this page helpful?