Menu

Expand
Rate this page:

Codecs

G729, OPUS and AMR-NB can be enabled. Twilio will enable these codecs for you. If you are interested in joining details are at the bottom of this page.

Twilio supports the following codecs for Elastic SIP Trunking

  1. PCMU
  2. PCMA
  3. G729
  4. OPUS
  5. AMR-NB

AMR-NB

  • AMR-NB has a set of 8 modes which vary in bitrate from 4.75kbps to 12.2kbps. Twilio supports all 8 modes. A call can be limited to a subset of these modes via a=fmtp:mode-set SDP parameter.
  • octet-align and mode-set are supported by Twilio. Any other AMR-NB SDP parameter will operate with its default value.
  • Throughout the call, either side can request a change of mode by sending a Codec Mode Request (CMR). Twilio responds to CMR received from call peers, but does not send CMRs.
  • Twilio AMR-NB supports VAD, DTX, and SID frames.

Termination

When the call is coming into Twilio, we will match first supported codec in the SDP offer.

AMR-NB:

  • Twilio supports mode-set parameter when receiving SDP offers
  • For termination calls, Twilio accepts both formats.
    • octet-align=0: bandwidth efficient format (default)
    • octet-align=1: octet aligned format

By default Twilio will only support PCMU and PCMA. If you are interested in using G729, OPUS and AMR-NB codecs please fill out the details below.

Origination

When Twilio is sending the call to you by default it will send the following PCMU and PCMA in the followingorder in SDP:

  1. PCMU
  2. PCMA

By filling out the details below, you can also use G729, OPUS and AMR-NB. The following will be the order of priority for codecs you will see in SDP parameter

  1. OPUS
  2. PCMU
  3. PCMA
  4. G729
  5. AMR-NB

If Twilio enabled the Codec for your account

Twilio will send the codecs in this order

G729 PCMU
PCMA
G729
OPUS OPUS
PCMU
PCMA
AMR-NB PCMU
PCMA
AMR-NB
G729, OPUS OPUS
PCMU
PCMA
G729
G729, AMR-NB PCMU
PCMA
G729
AMR-NB
G729, OPUS, AMR-NB OPUS
PCMU
PCMA
G729
AMR-NB

AMR-NB:

  • For origination calls, Twilio does not offer mode-set. Therefore the default set of all 8 modes is offered for outbound calls.
  • For origination calls, Twilio only offers in the default octet-align=0 format.
Enable the codec for me

If you are interested in using any of these (G729, OPUS and AMR-NB) codecs, please fill out Request Form with your information, and you will be contacted with more details.

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.

        
        
        

        Thank you for your feedback!

        We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!

        Refer us and get $10 in 3 simple steps!

        Step 1

        Get link

        Get a free personal referral link here

        Step 2

        Give $10

        Your user signs up and upgrade using link

        Step 3

        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more