How To change codec

Which is the best and most adequate codec to use, and where it can be changed?

You can change the code sequence editing the sip.conf file

You should find something like


you can activate the codec simply allowing it:

allow=alaw (g711a)
allow=ulaw (g711u)

Codec bandwidth comsumption:

Codec BR NEB
G.711 64 Kbps 87.2 Kbps
G.729 8 Kbps 31.2 Kbps
G.723.1 6.4 Kbps 21.9 Kbps
G.723.1 5.3 Kbps 20.8 Kbps
G.726 32 Kbps 55.2 Kbps
G.726 24 Kbps 47.2 Kbps
G.728 16 Kbps 31.5 Kbps
iLBC 15 Kbps 27.7 Kbps

Please remember that g723 and g729 codecs can be used only in passthrought, so you must use an ATA or a SIP phone that manages those codecs. In addition, they must be supported from your VoIP provider.

If you need you can buy a g729 license per line on the digium site.

The best codec from the voice quality point of view is g711, but uses more and more bandwidth than other codecs. If you have a good bandwidth, use it.

I think that the g729 codec is a good compromise between voice quality and bandwidth consumption.

is there any way to choose the codec dynamically? say, use 711 for the first 2 concurrent calls but 729 for the 3rd to start preserving bandwidth.

Please post here original config.