Thanks — I understand you want to force PCMA / G.711 from the browser so calls reach PSTN via your SIP trunk.
Short answer: you cannot force the browser-side WebRTC client to use PCMA/G.711. Browsers use Opus for WebRTC media and do not expose a reliable way to make the client send G.711. LiveKit bridges WebRTC (Opus) to SIP and will use G.711 on the SIP/PSTN leg as needed — transcoding between Opus and G.711 is handled by the SIP bridge.
What to check since audio isn’t reaching the landline:
• Confirm your SIP trunk settings (codec support, phone number, auth, IPs/ports) with your provider.
• Verify LiveKit’s SIP trunk config matches the provider (UDP/TCP/TLS, SRTP/RTP, allowed codecs).
• Check firewall/NAT for RTP: ensure UDP RTP ports used by LiveKit and the trunk are open and not blocked.
• Inspect call setup and SDP exchange logs to confirm LiveKit offered/negotiated G.711 to the SIP side and whether any codecs were rejected.
• Test with a known-working SIP provider (e.g., Twilio/Telnyx) or a SIP softphone to isolate whether the trunk or LiveKit bridge is the issue.
If you’d like, tell me:
• which SIP provider and transport (UDP/TCP/TLS) you’re using,
• an example call SID / timestamps or logs (SDP from browser and SIP INVITE/200 OK), and
I’ll walk through the specific checks and point out what to look for in the SDP and trunk configuration.
Sources:
Agents telephony integration | LiveKit Documentation |
SIP Telephony and Encryption |
Why WebRTC beats WebSockets for realtime voice AI | LiveKit |
Firewall Tips, with interactive elements