Question: On LiveKit Cloud, can I control the codec offer in LiveKit’s
outbound SIP INVITE — e.g. offer PCMU/PCMA only, or reorder so G.722 isn’t
first? Is there a SIPOutboundTrunk / dispatch / project-level setting, or is
this Cloud-side (dashboard/support)?
I’ve read the codecs-negotiation docs
(docs.livekit.io/reference/telephony/codecs-negotiation): LiveKit uses early
offers and supports PCMU/PCMA/G.722 — but the docs don’t describe how to
restrict or reorder the offer.
Why: Outbound calls (LiveKit Cloud → Telnyx SIP trunk, LiveKit Agents +
ElevenLabs TTS @ pcm_16000) negotiate G.722, and there’s a short broadband
click/pop at the onset of every agent talkspurt (TTS egress). We traced it
(PCAP) to G.722 sub-band ADPCM — the predictor cold-starts at each talkspurt
onset. It’s the codec leg, not TTS (TTS renders clean, all 200s).
Codec negotiation (from PCAP — SDP offer/answer available on request):
- LiveKit outbound INVITE offers
9 0 8(G722 / PCMU / PCMA) - Telnyx answers
9(G722) only
So forcing G.711 would mean changing LiveKit’s offer (or its ordering).
Already tried / ruled out (tenant-side):
- Comfort-noise off — no effect
- Leading-silence padding (30 ms, 120 ms) — click persists
- Telnyx SIP Connection inbound codec list / Outbound Voice Profile — no
outbound-offer codec field livekit-api1.1.0CreateSIPOutboundTrunk— exposes only
media_encryption;audio_codecis read-only — no codec-order knob
Environment: LiveKit Cloud (project zodiac-mdg-voice), outbound trunk
ST_FzgDPd7sDTZX, Telnyx SIP trunk.
Related: livekit/livekit#4106 (open: “restrict codec to G.711”),
livekit/sip#122 (“no way to set codecs”), livekit/sip#238 (LiveKit outbound
INVITE shows the same RTP/AVP 9 0 8 G722-first offer), livekit/sip#608 / forum
thread #512 (same Telnyx outbound carrier artifacts, @ebilaly @ebilal).
Is offer-side codec control possible today, or is it a feature request? Thanks!