Glitches, Crickly noise, chopping, some time voice goes away

I am facing these issues: here is my configuration: STT Deepgram Nova 3 and Nova 2 phone call, LLM: OpenAI gpt-5.1, gpt-4.1 mini, TTS: RIME Arcana. We have a dynamic agent system. What I mean by a dynamic agent system. we can create as many agents as we need using the same AgentSession. Livekit Selfhosted over AWS. Using Twilio. All the agents are working perfectly over WebRTC. We have added UI web tester and that is working fine no glitches, chopping or anything related.

Our platform frontend: https://supporthive.ai/

If webrtc sounds good but SIP has "Glitches, Crickly noise, chopping" I would start by looking at the PCAP and see what the jitter, loss and delta looks like.

ws_url: ws://localhost:7880
redis:
address: localhost:6381
sip_port: 5060
sip_port_tcp: 5060
rtp_port_range:
start: 10000
end: 10500
use_external_ip: true

Jitter buffer smooths out network timing variations — critical for clean audio.

Without it, any packet arriving early/late causes clicks, pops, or gaps.

jitter_buffer:
enabled: true
min_delay: 50 # ms — minimum buffer (absorbs normal jitter)
max_delay: 200 # ms — cap to prevent excessive latency
enable_jitter_buffer: true
enable_jitter_buffer_prob: 1.0
logging:
level: info
sample: false
inbound_calls_per_second: 70
max_calls_per_ip: 50

This is sip-config.yaml file. i have tried different configuration but worked

What happend is that on aprill 25 i made changes in the agent_dyanmic flow and it worked for one day. today when i come back and make a call to my agent it again the issue even though i did not modify the code or any configuration. i am not sure why this behavior repeat again and again it is been a month or so that we are facing this issue

Is this self-hosted LiveKit server? What do you see in the PCAPs? Do you see a diference between the two?

Yes, this is a fully self-hosted LiveKit setup (livekit, livekit-sip, livekit-agent and livekit-egress all running as Docker containers in NetworkMode=host on our AWS instance, with no LiveKit Cloud project), so the dashboard’s PCAP-download feature isn’t available — but tcpdump works fine on the host and we can capture SIP/RTP packets ourselves whenever needed. I haven’t captured PCAPs yet for either the web test_call.py or the real PSTN call, so I can’t compare them at the packet level — what I do have is the LiveKit-SIP call statistics for the PSTN call (mixer.restarts: 106, mixes_jump: 1434, mixes_zero: 717) versus the web call which never touches the SIP mixer at all, and that gap (rather than any PCAP diff) is what’s driving the choppiness.

If you notice a change on a specific date I would check my deployment logs and see what you changed. Sound like a networking issue to me.