Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Elastic SIP Trunking Codecs



General Availability (GA) codecs

general-availability-ga-codecs page anchor

Twilio supports PCMU and PCMA for Elastic SIP Trunking.

GA codecs origination

ga-codecs-origination page anchor

When Twilio directs incoming traffic from the PSTN to your communications infrastructure, it will send PCMU and PCMA in the following order in the SDP parameter.

  1. PCMU
  2. PCMA

When Twilio receives outgoing traffic from your communications infrastructure to the PSTN, we will match the first supported codec in the SDP offer. Twilio supports PCMU and PCMA.


Limited Availability (LA) codecs

limited-availability-la-codecs page anchor

In addition to the default PCMU and PCMA codecs, Twilio offers limited availability to the G.729, OPUS, and AMR-NB codecs. To access these Limited Availability codecs, you must work with your account team.

(warning)

Warning

The G.729, OPUS, AMR-NB codecs are Limited Availability, meaning you must first request access to have them enabled on your account. If you need one or more of these codecs, please contact your account team.

Adaptive Multi-Rate Narrowband Codec (AMR-NB)

adaptive-multi-rate-narrowband-codec-amr-nb page anchor

Twilio AMR-NB supports Voice Activity Detection (VAD), Discontinuous Transmission (DTX), and Silence Insertion Descriptor (SID) frames.

Either party in a call can request a change of mode via a Codec Mode Request (CMR). Twilio will respond to CMRs received from call peers, but does not send CMRs.

The mode-set and octet-align media format SDP parameters are supported by Twilio. Any other AMR-NB SDP parameters will operate with their default values.

AMR-NB encoding modes

amr-nb-encoding-modes page anchor
  • The AMR-NB codec supports eight encoding modes, which vary in bitrate from 4.75 kb/s to 12.2 kb/s. Twilio supports all 8 modes.
  • A call can be limited to a subset of these modes via the a=fmtp:<fmt> mode-set SDP media format parameter (termination calls only).
  • For origination calls, Twilio does not offer the mode-set parameter. Therefore, the default set of all eight modes is offered for outbound calls.

If you have Limited Availability codecs enabled on your account, Twilio will send the codecs in the following order of priority in the SDP message:

  1. OPUS
  2. PCMU
  3. PCMA
  4. G.729
  5. AMR-NB
  • PCMU will always immediately precede PCMA.
  • If enabled on your account, OPUS will always be first, and will be immediately followed by PCMU, then PCMA.
  • If enabled on your account, G.729 will always immediately follow PCMA.
  • If enabled on your account, AMR-NB will always be last in priority.

AMR-NB origination calls

amr-nb-origination-calls page anchor

If you have Limited Availability codecs enabled on your account, Twilio will match the first supported codec across PCMU, PCMA, and the additional codecs you have enabled on your Twilio account.

AMR-NB termination calls

amr-nb-termination-calls page anchor
  • Twilio supports the mode-set SDP media format parameter when receiving SDP offers.
  • Twilio accepts both AMR-NB payload formats for the SDP media format parameter:

    • a=fmtp:<fmt> octet-align=0 (bandwith-efficient)
    • a=fmtp:<fmt> octet-align=1 (octet-aligned)

Rate this page: