I'm having a weird issue, I've got a Twilio Inboun...
# ask-ai
m
I'm having a weird issue, I've got a Twilio Inbound call handling setup... When I run my agent, it registers the worker with Livekit and then when I phone it, it answers the call and speaks to me as you would expect... normally this works like 95% of the time, but today for some reason it's only answering about 10% of my calls. Most of them are just ringing out without being assigned to an agent but the occasional call gets through. Has anyone else seen this behaviour before? Is this a known issue and if so how do I prevent this kind of intermittent behaviour?
t
Thanks for reaching out, Joseph. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
The intermittent issue with agents not answering Twilio Inbound calls—where most calls ring out but some connect—is a known scenario and is often related to configuration and infrastructure reliability. • Primary recommendation: For high reliability, you must run multiple servers for each agent name. This redundancy significantly reduces the chance of calls ringing out without assignment. • Resource isolation: Ensure your agent servers are dedicated—do not run other applications on these servers, as resource contention frequently causes intermittent failures. • Timeout mechanism: The system has a 10-second room connection timeout. If your agent does not establish a connection within this window, calls will ring out and not be assigned. • Follow production guidelines: Review and implement best practices such as proper load balancing, auto-scaling, and ensuring constant worker availability. This aligns with production deployment standards and mitigates these issues. • LiveKit built-in failover: LiveKit will attempt to assign the call to another available worker if one fails, but without sufficient reliability and failover configuration, unassigned calls can still occur. Adjust your deployment to include redundant agents, isolate resources, and follow infrastructure guidelines to minimise these intermittent failures. If you have already implemented these steps and still face the problem, or if you need guidance on specific configuration details, please provide more context about your deployment setup or any relevant logs/errors. Full reference details available upon request. Sources: How to Get Help from LiveKit | Speech & Audio Processing | livekit/livekit_composite | DeepWiki | pkg/sip/inbound.go | Web and mobile frontends | LiveKit Docs
m
I'm only running a single server with my agent on, but I don't understand why it's suddenly only answering 10% of my calls? I don't want to have to spin up 10-20 servers just for one agent to make sure it answers... what causes the agent to "miss" the call answering event? Could it be that I'm registering workers and failing to "deregister" them so that LiveKit is getting confused as I keep adding new workers without taking down the old ones? Essentially a "worker leak"
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!