[Asterisk-Users] Codec Voodoo

Hadar Pedhazur hadar at unorthodox.com
Thu Mar 25 18:08:38 MST 2004


I have three * servers that all talk to each just fine, and
all talk to other * servers (like NuFone, VoicePulse, etc.).
I have hard-phones connected to Sipura SPA-2000s on two of
the * servers via a local network connection. The third *
server only gets connected to remotely, both with IAX and
SIP softphones, and with a "roaming" Sipura with
hard-phones.

The setup works well. All of the * servers communicate
exclusively with GSM between themselves (and also to NuFone
and VoicePulse). The quality is pretty good. The "local"
hard phones are using g711 uLaw (since I think that the X100P
cards I believe use uLaw by default as well, but I could be
way off on that assumption). Codec transcoding from uLaw to
GSM seems to work just fine.

 From a couple of people who post regularly on this list, I
have heard that they have great success with iLBC (and some
with Speex as well). I think that NuFone prefers iLBC as
well, though it works remarkably well for me with GSM.

I did some experiments in forcing my * servers to
communicate with each other only with iLBC. When I do that,
and can see that they are indeed using iLBC, the quality is
horrible. There is long stutter, like every sound is being
"stretched" out.

I purchased g729 licenses from Digium for all three servers
as well. Using g729 on the Sipura devices yielded no better
quality than the built-in g726. However, when I made two *
servers communicate only with g729, the quality was
marginally better than iLBC, and ridiculously worse than
GSM. This was surprising to me.

All of this is with a very recent cvs checkout of *, done
this past Monday the 22nd I believe.

Last point is that if I turn jitterbuffer on (with =yes),
then I never hear _any sound_ whatsoever, but there are _no
errors_ on either side of the channel. I can see on the CLI
that voicemail prompts are being played (for example), but I
can't hear anything on either side. Turning jitterbuffer=no
immediately restores sound, but the quality only sounds good
with GSM.

What I don't understand is how some people have success with
iLBC, and I don't. I also noticed one or two posts from
people that claim that GSM isn't working for them, yet it
works really well for me. Are there any settings that I am
unaware of (other than the standard "allow/disallow"
directives) that I should be tweaking to make these other
codecs work as I understand they should?

P.S. One last piece of voodoo, just if anyone knows the
answer to this. On occasion, I use DIAX to connect to the
remote * server. It works very well, and is the best of the
IAX softphones (IMHO). Yesterday, it was working just fine.
Today, from a different location (both yesterday and today
behind NAT, just from different networks), it connects fine,
but I have zero sounds and zero errors. There were _no_
changes to the server or the software setup in between.

In the past, I have had trouble using X-Lite to this
particular * server. Today, when DIAX wasn't working
(neither was iaxcomm, it's not a specific DIAX problem), I
tried X-Lite again, and it worked flawlessly...

The last bit of info on this is that one of the other *
servers is on the same lan as the DIAX client, but on
different machines. Both are coming from the same NAT
router though. The * machine is in the DMZ, so all packets
that are sent to the public side are routed directly to *,
and that part works perfectly. I don't know if DIAX is
clashing with * packets, but I know this has worked in the
past (though it's been 2 weeks since I've tried, and I did
cvs up the * server since it last worked...).

Thanks in advance to any brave soul who tackles some or all
of these questions/issues! :-)





More information about the asterisk-users mailing list