Skip to content

SIP Bridge Audio Quality: Grainy/Choppy on All Calls (Enterprise Voice AI Platform) #5253

@testedmedia

Description

@testedmedia

Environment

  • LiveKit Cloud Project: voiceconsole-qepnkdkp
  • Agent SDK: @livekit/agents v1.2.0, @livekit/rtc-node v0.13.24
  • SIP Provider: Telnyx (credential connection)
  • Inbound Trunk: ST_cELUNjYgg3CB (krispEnabled: true, encryption: DISABLE)
  • Outbound Trunk: ST_3c2PdSQNSDB5 (UDP transport)
  • TTS: ElevenLabs Flash v2.5 + Cartesia Sonic failover
  • STT: Deepgram nova-3
  • Agent Hosting: Railway (Docker, node:22-slim)

Description

We're building an enterprise voice AI platform. Phone calls through the SIP bridge sound grainy/choppy (~85-90% quality). WebRTC widget calls on the same agent are crystal clear (100%).

The audio artifacts are consistent across:

  • All TTS providers (ElevenLabs, Cartesia)
  • All call attempts
  • Multiple Railway regions (US West B, US Central)

This matches the issues described in TEL-56 and AGT-2226.

What We've Tried (None Fixed the Audio Quality)

  1. G.722 HD Voice enabled on Telnyx (inbound codecs: G722, G711U, G711A)
  2. Krisp enabled/disabled on inbound trunk
  3. NoiseCancellation removed from agent code (was double-processing with trunk Krisp)
  4. Jitter buffer tuned to 40-120ms on Telnyx
  5. SRTP disabled on both Telnyx and LiveKit trunk
  6. TTS sample rate set to 16kHz to match G.722
  7. audioSampleRate: 16000 in session.start() outputOptions
  8. Multiple Railway regions tested
  9. ca-certificates added to Docker image

Questions

  1. What codec is actually negotiated on the SIP leg? How do we verify?
  2. Is the SIP mixer buffer fix from #348 (5 frames -> 15 frames) deployed on LiveKit Cloud?
  3. What configuration do enterprise customers use for crystal clear phone audio?
  4. Are there any SIP bridge settings not exposed in the SDK (ptime, DTX, FEC)?

Additional Issue: LiveKit Phone Number Not Routing

We purchased a LiveKit Phone Number (+19848849165, PN_PPN_QoiYJzLSMwnV) to test managed telephony. Status shows ACTIVE, assigned to dispatch rule SDR_NscPJKLvW8eR. When called, it rings once and immediately hangs up. No agent logs appear. Agent works fine for outbound via Telnyx.

Recent Test Call

Room name: recording-for-ticket-1774684969 (available in LiveKit Cloud logs for project voiceconsole-qepnkdkp)

We're happy to provide recordings or get on a call to debug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    SIPbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions