Asterisk codecs

Business SIP Providers
Provider Plan Details Monthly Rate *
Vonage Business SIP Trunking
  • One provider & nationwide coverage
  • Easily integrated into your existing infrastructure
  • More uptime, flexibility and disaster recovery options
ClarityTel SIP Trunking Made Clear and Simple
  • Rapid ROI - Flat Rate SIP Pricing
  • Goodbye PRI - No More LD Charges
  • Tier 1 Redundant Network Provider with SLA’s
4 trunk min.
VoIPLy Build your phone system online in 5 minutes
  • Unlimited Business Pro Plan
  • Enterprise Disaster Recovery
  • NO Contracts, NO Trunk Fees
VoIP Hardware Solutions
Provider Solution Details
VoIP Hardware Zycoo UC Solutions
  • Modular Design IP PBX for SMB
  • Remote office Centralized Management solution
  • 3rd party app integration, Enterprise Billing, Android & iOS client
Yeastar Communications Solutions
  • Cost-effective IP-PBX Solution for SMB
  • FXS, FXO, GSM, BRI and PRI VoIP Gateways
  • Rich features and reliable performance
Business PBX Solutions
Provider Solution Details
Bicom VoIP Become an ITSP Now!
  • Become a serious competitor in VoIP Immediately
  • FULL Consultancy, Installation, Training & Support
  • Sell Hosted IP PBXs, Biz Lines, Call Centre
  • Turnkey Provisioning at your data center
3CX Software PBX for Windows, Linux and the Cloud
  • Open Standards Software Solution
  • Easy to Install and Manage
  • Auto Configures Phones & Trunks
  • Android, iOS, Windows & Mac clients

Asterisk Codecs

Asterisk supports the following narrow-band and wideband (HD audio) codecs:

  • G.711 ulaw (as used in US)
  • G.711 alaw (as used in Europe)
  • G.722 - 16 kHz wideband codec; passthrough, playback and recording in Asterisk 1.4; full support incl. transcoding in Asterisk 1.6, a backport for 1.4 is available, or use this more up-to-date patch
  • G.723.1 - pass-thru for people who need a license , free for other people
  • G.726 - 32kbps only (16/24/32/40kbps supported in format_g726 for files); flawed until Asterisk 1.4 which corrected the implementation and introduced codec g726aal2 and setting g726nonstandard for backwards compatibility with Asterisk 1.2 installations
  • G.729 - may require a license unless using pass-thru, free version available for use in countries without patents or for educational use only
  • GSM
  • iLBC
  • LPC10 (not recommended!)
  • Speex - configurable 4-48kbps, VBR, ABR, etc. see bug 2536. For Asterisk 1.4. there is patch 10519 available that adds wideband support for the OpenWengo software client

Use this commands in the Asterisk CLI for a detailed listing of the actual capabilities:

show codecs **
show translation
show translation recalc 10

    • show codecs Screen output
The 'show codecs' command is deprecated and will be removed in a future release. Please use 'core show codecs' instead.

Disclaimer: this command is for informational purposes only.
It does not indicate anything about your configuration.

1 (1 << 0) (0x1) audio g723 (G.723.1)
2 (1 << 1) (0x2) audio gsm (GSM)
4 (1 << 2) (0x4) audio ulaw (G.711 u-law)
8 (1 << 3) (0x8) audio alaw (G.711 A-law)
16 (1 << 4) (0x10) audio g726aal2 (G.726 AAL2)
32 (1 << 5) (0x20) audio adpcm (ADPCM)
64 (1 << 6) (0x40) audio slin (16 bit Signed Linear PCM)
128 (1 << 7) (0x80) audio lpc10 (LPC10)
256 (1 << 8) (0x100) audio g729 (G.729A)
512 (1 << 9) (0x200) audio speex (SpeeX)
1024 (1 << 10) (0x400) audio ilbc (iLBC)
2048 (1 << 11) (0x800) audio g726 (G.726 RFC3551)
4096 (1 << 12) (0x1000) audio g722 (G722)
65536 (1 << 16) (0x10000) image jpeg (JPEG image)
131072 (1 << 17) (0x20000) image png (PNG image)
262144 (1 << 18) (0x40000) video h261 (H.261 Video)
524288 (1 << 19) (0x80000) video h263 (H.263 Video)
1048576 (1 << 20) (0x100000) video h263p (H.263+ Video)
2097152 (1 << 21) (0x200000) video h264 (H.264 Video)

To tell which codec is being used for a specific call use one of the following CLI commands:

sip show channels
iax2 show channels

To use with allow and disallow, here is the association table:

G.711 µ-law companding (Canada, Japan and US) = ulaw
G.711 A-law companding (rest of the world) = alaw
G.722 = g722 (don't confuse this with g722.1 or g722.2)
G.723.1 = g723.1 (pass-thru only)
G.726 = g726
G.729 = g729
GSM = gsm
iLBC = ilbc
LPC10 = lpc10
Speex = speex
ADPCM = adpcm

A typical use might be:


File name extensions

Extensions for various encoded files in Asterisk
  • wav:
  • pcm:
  • gsm:


Various clients support variable sample periods / packetization. Asterisk 1.2 and earlier only supports 20ms packetization in RTP-based protocols like SIP and MGCP, so you should configure your client to use this. However, iLBC with its 30 ms packets also works with Asterisk 1.2. 1.4 and later include support for variable packetization, either settable in the config or set automatically according to the SDP.

See also:

Created by: flavour, Last modification: Fri 01 of Jul, 2011 (14:57 UTC) by hindmasj
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+