[INFO] Codecs


#1

What web page can you recomend me where I can find informations aboaut codecs that Asterisk use to code the voice? I need information about what bandwith do they use and how good qualty do I get, how much procesor load they have (this isn’t so important).

Basicly, I need codec that has phone qualty with lowest bandwith comsuption. I don’t care how big will be procesor load.

Right now I usualy use ulaw, alaw and gsm. Ulaw needs around 190 kbps. That is, in my opinion to much.

Anyway, I need specification.

Thank you for your time.

Tomislav


#2

I have reed this
voip-info.org/wiki-Asterisk+bandwidth+iax2
and this
voip-info.org/wiki-Bandwidth+consumption
and visited this web page
asteriskguru.com/bandwidth_calculator.php

Now I have one easy question. g711 is ulaw, right? Which one is alaw?


#3

They’re both g711. Mu-law (“u-law”) is g711u and a-law is g711a.


#4

Thank you, and what about g729? It seams that it is good codec that spends only 24 kbps IP bandwidth. Is it installed with Asterisk? How do I call it?


#5

You must purchase licenses for as many concurrent channels as you exepect to use from Digium. General basic rule of thumb is as many licenses as you have trunks.

See the thread “sticky” at the very top of this forum for more details.


#6

[quote=“DevGuy”]You must purchase licenses for as many concurrent channels as you exepect to use from Digium. General basic rule of thumb is as many licenses as you have trunks.

See the thread “sticky” at the very top of this forum for more details.[/quote]

Thank you! It is weary usefull thread.

I have two more questions. What is diference between ulaw and alaw codec? What if one Asterisk server has defined codecs 1, 2 and 3. Another has 4, 5 and 6. What would hapen with call? Will it be established? What codec will thez use? (1, 2 and 3 is different than 4, 5, and 6).

Tomislav


#7

Codec’s much match otherwise the call will not go through (no audio). However, the ulaw and alaw g711 are pretty much industry standards across every equipment supplier out there, and g729 is supported by many as well (e.g. Cisco build it into their hadnsets be default).

Bottom line, you shouldn’t have any troubles - g711 a lwa & ulaw will cover most everything for you.


#8

[quote=“DevGuy”]Codec’s much match otherwise the call will not go through (no audio). However, the ulaw and alaw g711 are pretty much industry standards across every equipment supplier out there, and g729 is supported by many as well (e.g. Cisco build it into their hadnsets be default).

Bottom line, you shouldn’t have any troubles - g711 a lwa & ulaw will cover most everything for you.[/quote]

Thank you for your reply. I have one final question. Who has the right to chose, called or calling party? Example. *_no_1 (calling) has defined 1, 2 & 3 codecs, *_no_2 (called) has defined 3, 1 & 2 codecs. Whic codec will they use, 1, 2 or 3? Who has adwantage to chose?

Tomislav

P.S.
If you don’t know the answer, when I get time I will test it for myself :smile:


#9

Don’t know! From what I do understand Asterisk attempts all of it’s protocols to find a compatible one when initiating/receiving calls. So maybe it depends on who’s calling?


#10

Yeah, this is an interesting question - and one that may require reading the source code to answer.

If i configure sip.conf with allowed modems g729, gsm, ilbc, ulaw (in that order - in the global section, where order counts), connections to Sipgate will always end up using ulaw. If i remove ulaw from the list, it will use gsm. The only way to make it use g729 with Sipgate seems to be to disallow everything else.

This is potentially a problem. If Sipgate runs out of g729 licences (i.e., there aren’t any more available g729 channels), the call will fail because nothing else can be used.


#11

[quote=“WillKemp”]If i configure sip.conf with allowed modems g729, gsm, ilbc, ulaw (in that order - in the global section, where order counts), connections to Sipgate will always end up using ulaw. If i remove ulaw from the list, it will use gsm. The only way to make it use g729 with Sipgate seems to be to disallow everything else.
[/quote]

Thank you, you have answered my question. Asterisk, server, is the one who has advantage to chose which codec will be used. I belive in Sipgate codecs are defined in this order: ulaw, gsm, g729.

They have good bandwith and ulaw doesn’t take that much of procesor time like gsm or g729 does, that’s why it’s on first place. g729 is last because they have to pay licence for it.

I don’t belive that they will run out of g729 codec. And if you don’t use telephone for productional purpose, you can put it to be your only codec.

Tomislav