Our team uses Livekit for building voice agents wh...
# ask-ai
v
Our team uses Livekit for building voice agents which talk over telephony for which we use Telenyx SIP. There is a subtle issue with audio packet delivery loss. This is the exactly flow where it is happening; 1. our AI navigates the IVR (using dtmf tones) , 2. our voice AI bot is put on hold ( could vary say 2-10mins) 3. a live human joins the call and asks the first question to which our agent responds 4. This response is however not heard by the human on the other side of the line prompting them to repeat the question 5. The second time onwards, once the AI replies the payer can hear it. This doesnt seem to be a livekit bug since I dont see any error logs in my application logs, however I wonder if this relates to 'Classic VoIP "First Packet Syndrome"' If so how would you recommend we fix this issue so that our voice ai bot can successfully be heard in telephony
t
Thanks for reaching out, Parashara. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I understand how frustrating audio packet loss can be, especially right at the start of a call. Let’s work through some steps that might help improve your experience: • Enable Jitter Buffer: Setting up the jitter buffer on your LiveKit SIP server can really help smooth out those variations in packet arrival times. This often makes a big difference in reducing initial packet loss. • Optimize Codec Configuration: It’s a good idea to make sure your Telnyx SIP trunk is set up with the G.722 codec for wideband audio, while keeping G.711U enabled for compatibility. Also, turning on the HD Voice feature on your phone number can enhance call quality. • Packet Loss Handling: LiveKit has some great built-in tools to detect and manage packet loss. Double-checking that your system is set up to use these can really help. • Network Quality Management: LiveKit works to prioritize audio quality even when the network is congested, which helps keep your calls clear and stable. When you get a chance, could you please confirm if jitter buffering is currently enabled in your setup? Also, sharing a bit about your Telnyx SIP trunk configuration would be really helpful. This way, I can provide guidance that’s tailored just for you. Sources: test/integration/sip_test.go | HD voice for SIP | LiveKit Docs | An open source stack for real-time multimodal AI | Create and configure Telnyx SIP trunk | LiveKit Docs | SIP troubleshooting guide | LiveKit Docs