Twilio supports PCMU and PCMA codecs for Elastic SIP Trunking.
When Twilio directs incoming traffic from the Public Switched Telephone Network (PSTN) to your communications infrastructure, it sends PCMU and PCMA codecs in the following order in the Session Description Protocol (SDP) parameter:
When Twilio receives outgoing traffic from your communications infrastructure to the PSTN, it matches the first supported codec in the SDP offer. Twilio supports PCMU and PCMA codecs.
In addition to the default PCMU and PCMA codecs, Twilio offers Limited Availability (LA) for the G.729, Opus, and AMR-NB codecs.
If you require one of the Limited Availability codecs, contact your Twilio sales representative or talk to Twilio Sales.
Twilio supports AMR-NB with 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 responds to CMRs received from call peers but doesn't send CMRs.
Twilio supports the mode-set
and octet-align
media format SDP parameters. All other AMR-NB SDP parameters use their default values.
a=fmtp:<fmt> mode-set
SDP media format parameter (termination calls only).mode-set
parameter. Therefore, outbound calls use the default set of all eight modes.The payload format for a session can be in bandwidth-efficient or octet-aligned format.
This is configurable in the a=fmtp:<fmt> octet-align
SDP media format parameter for termination calls with Twilio.
octet-align=0
is the default, bandwidth-efficient format.octet-align=1
is the octet-aligned format.For origination calls, Twilio only offers the default bandwidth-efficient payload format (octet-align=0
).
If you have Limited Availability codecs enabled on your account, Twilio sends the codecs in the following order of priority in the SDP message:
octet-align=0
).mode-set
parameter. Therefore, outbound calls use the default set of all eight modes.If you have Limited Availability codecs enabled on your account, Twilio matches the first supported codec among PCMU, PCMA, and the additional codecs you have enabled on your Twilio account.
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
(bandwidth-efficient)a=fmtp:<fmt> octet-align=1
(octet-aligned)