Asterisk Codecs
Asterisk supports the following codecs
- G.711 ulaw (as used in US)
- G.711 alaw (as used in Europe)
- G.723.1 - pass-thru for people who need a license , free for other people
- G.726 - 32kbps in Asterisk 1.0.3, 16/24/32/40kbps in CVS HEAD.
- 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
To tell which codec is being used for a specific call:
sip show channels
iax2 show channels
To use with allow and disallow, here is the association table:
G.711 ulaw = ulaw (US standard)
G.711 alaw = alaw (European standard)
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:
disallow=all
allow=alaw
allow=ulaw
File name extensions
Extensions for various encoded files in Asterisk- wav:
- pcm:
- gsm:
Packetization
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:
- Asterisk config codecs.conf: Mainly used for speex codec configuration
- Codecs
- Asterisk cli show codecs
- Asterisk CLI: show translation
- Asterisk bandwidth
- Asterisk | FAQ | Tips & Tricks
Page Changes
variables for codecs?
exten => 100,n,GotoIf($"${CODEC_VIDEO}" = "h.264"?200:300) // play h.264 video otherwise play h.263
exten => 100,200,Playback(video264)
exten => 100,300,Playback(video263)
Packetization
With this patch, packetization can be set for each codec for SIP peer/user, as well as match to remote packetization values if present in SDP.
What CODEC am I using?
How can I know if I am using
g.726 - 40
g.726 - 32
g.726 - 16
etc.
or ASTERISK only support g.726 - 32
Re: Quality Voice
be a member os asterisk-lists and post your problem with much more inputs so people can help you
Quality Voice
Hi... i need your help .... the quality voice from my asterisk id very low how to change this!!!