On Wed, May 07, 2008 at 11:32:54AM +0800, Ohad Levy wrote:
> ilbc is the best "compression wize" but takes the most of the cpu.
> 
> I can have up to four gsm channels on my linksys openwrt box :)

iLBC has a not-exatly-free license, and has thus been remomved fromt he
default distribution. Review its license to see if you agree to it. It
has not been included in the Debian and Fedora packages.

iLBC's great claim to fame is that each packet is processed completely
separately. Therefore it is much less sensitive than others to loss of
frames. But this also comes at the cost of efficiency.

Speex allows quite a tradeoff between quality and bandwidth. Have a look
at the [speex] section in codecs.conf . Either set "quality" or try
enabling "vbr". I figure both sides have to agree on that (yes,
Asterisk's codec negotiation needs to improve a bit).

One other place to reduce bandwidth consumption is to send packets less
frequently. VoIP sends many small packats (e.g: once per 20ms or 30ms). 
Therefore the ratio in those packets between the header and the useful 
RTP payload is not good enough. One way to improve this ratio is to send 
more payload in each packet: send one packet in each 40 ms or 60 ms.

See
http://svn.digium.com/svn/asterisk/branches/1.4/doc/rtp-packetization.txt
Note that there's a limit to what you can get from this: if the packets
are already full, you'll gain nothing and only increase the delay (and
even the jitter). You can not use this on iLBC: I'm not sure if this is
something inherent to its algorithm or simply its license that does not
allow doing anything that is not allow diverging from the RFC.

IAX also has a "trunk mode" - if you have two concurrent calls between
the same two Asterisk intances, they can share the same packets. and
thus you can use them more efficiently. This is because IAX sends all
the RTP streams over the same socket (Yes, there are some upsides and
downsides to this approach).

Now armed with that basic knowledge, you can toy with the numbers here:
http://blog.asteriskguide.com/bandcalc/bandcalc.php

I hope they now make more sense.

-- 
Tzafrir Cohen         | [EMAIL PROTECTED] | VIM is
http://tzafrir.org.il |                    | a Mutt's
[EMAIL PROTECTED] |                    |  best
ICQ# 16849754         |                    | friend

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to