Skip to main content

HD voice for SIP

LiveKit SIP supports high fidelity calls by enabling HD voice.

On this page

Overview

Telephone calls have traditionally been routed through the Public Switched Telephone Network (PSTN), a technology for landlines dating back over a century. PSTN calls are limited to an 8kHz sample rate using a narrowband audio codec, resulting in audio that typically sounds muffled or lacks range.

Modern cell phones can use VoIP for calls when connected via Wi-Fi or mobile data. VoIP can leverage wideband audio codecs that transmit audio at a higher sample rate, resulting in much higher quality audio, often referred to as HD Voice.

LiveKit SIP supports wideband audio codecs such as G.722 out of the box, providing higher quality audio when used with HD Voice-capable SIP trunks or endpoints.

HD voice support

HD voice requires a wideband codec on every leg of a call. LiveKit SIP supports the G.722 wideband codec and enables it by default, so whether a call uses HD voice depends on your SIP trunking provider or PBX.

When LiveKit sends an SDP offer, for example when it places an outbound call, it lists G.722 first by default. When LiveKit answers an SDP offer, for example for an inbound call, it selects G.722 whenever the offer includes it, regardless of where G.722 appears in the list. As a result, any SIP trunking provider or PBX that supports G.722 can carry HD voice calls to and from LiveKit. To learn more, see Audio codecs negotiation and support.

Provider support for G.722 varies. Some providers require you to enable G.722 or HD voice for a phone number or SIP trunk, and others don't support wideband codecs on their SIP trunks. Check the codec documentation for your provider to confirm support.

Use LiveKit Phone Numbers

LiveKit Phone Numbers supports HD voice out-of-the-box.

Verify the codec for a call

To confirm that a call uses HD voice, check the codec it negotiated in the LiveKit Cloud dashboard:

  1. Navigate to the Telephony → Calls  page.
  2. Select a call from the list.
  3. In the SIP details section, check the Codec value. A G.722 value, such as G722/8000, means LiveKit and your provider exchanged audio using G.722. The 8000 rate is a known quirk of the SDP specification; G.722 transmits 16 kHz audio.