Codecs
AMR, AMR-WB and EVS codecs for Asterisk
Mobile networks speak AMR, AMR-WB and EVS. Stock Asterisk does not. We add the three codecs to Asterisk 16 as native codec modules, together with 16 kHz DTMF, so a wideband mobile call can terminate on your platform without an extra transcoding box.
The problem
VoLTE, VoWiFi and IMS interconnects offer AMR (8 kHz), AMR-WB (16 kHz) and increasingly EVS in the SDP. A platform that cannot negotiate them has two options: transcode in a separate media gateway, or fail the call with 488 Not Acceptable Here. Both cost money and add a hop that degrades quality.
What stock Asterisk does
Stock Asterisk 16 can at most pass AMR and AMR-WB through unchanged, and has no EVS at all. There is no encoder or decoder, so nothing can be recorded, played back, bridged to another codec or processed in the dialplan.
What we change
- Codec modules in C:
codec_amr,codec_evsand the AMR-WB path, registered as the codecsamr,amrwbandevs, so they work with the usualallow=lines and transcode to and from the other codecs. - EVS through the 3GPP reference library (TS 26.445). Since version 3.4.2 the library is delivered as two RPMs, built reproducibly with its headers, so it is no longer compiled on each server.
- 16 kHz DTMF: RFC 4733
telephone-event/16000, events 0 to 15, negotiated next to the wideband codec. Payload formats follow RFC 4867 for AMR and AMR-WB.
; sip.conf, peer for the mobile interconnect
disallow=all
allow=amrwb
allow=evs
allow=alaw
What the SDP looks like
m=audio 16384 RTP/AVP 98 96
a=rtpmap:98 AMR-WB/16000/1
a=fmtp:98 mode-set=0,1,2,8;octet-align=1
a=rtpmap:96 telephone-event/16000
a=fmtp:96 0-15
Compatibility
| Asterisk | 16 LTS, with chan_sip and chan_pjsip |
|---|---|
| Codecs | AMR, AMR-WB, EVS |
| DTMF | RFC 4733, events 0-15, 8 and 16 kHz |
| Verified | Live in mobile operator networks |
Framing details (Compact vs Header-Full) and Codec Mode Requests are covered on the EVS Compact mode and CMR page.
Related
Need this on your platform? Tell us the Asterisk version and the interconnect, and we reply within 24 hours.
Request a quote