[asterisk-dev] $1000USD for fix of Asterisk g726-32 codec

Daniel Silaro daniel.silaro at gmail.com
Sun May 21 00:20:12 MST 2006


The distortion problem is full reproducable and I am certain it is bas
g726 code in Asterisk. For example with Polycom phones:

Polycom (using g711) -> Asterisk -> VoIP termination (g726)

The called party hears terrible distortion. Setting
voice.gain.tx.digital.handset="-6" in sip.cfg pretty much "fixes" the
problem. Cisco handsets seem to have lower gain by default and seem
OK, however if you listen in hard when the volumes are high you do
still hear breaks in the sound where the distortion would have been.
Changing the VoIP termination codec to g711 always fixes the problem
and sound perfect at any volume/gain levels.



On 5/21/06, Steve Underwood <steveu at coppice.org> wrote:
> Daniel Silaro wrote:
>
> > Steve,
> >
> > The current Asterisk g726-32 codec is functional and works ok for the
> > most part however it does give a distorted sound if you raise your
> > voice while speaking or if volume levels increase above "normal".
> > Switching over to g711 does not have this problem. Something is
> > clearly not right there with the codec implementation. If you have a
> > better g726 codec and you or someone else (I am not a programmer) is
> > willing to adapt/hook it into Asterisk I am willing to honor my offer
> > of $1000 USD.
>
> If it is only at high volume you might be hitting errors in the current
> G.726 code for Asterisk, or you might have a big DC offset in your
> signals. There shouldn't be any significant DC in a telephony signal,
> but there often is, and sometimes it is huge. A really big DC component
> upsets most simple lossy codecs, like G.711 or G.726. More complex lossy
> codecs tend to have their own internal way of coping with DC.
>
> Lets start with a correct implementation of G.726.
>
> Install a recent version of spandsp, such as
> http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.2pre25/spandsp-0.0.2pre25.tar.gz
>
> Now replace the codecs/codec_g726.c file in your Asterisk source code
> with
> http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.2pre25/codec_g726.c
>
> Rebuild Asterisk and see what happens. I haven't had time to test my
> version of codec_g726.c, but it compiles OK and it is very simple -
> there isn't a lot to go wrong. spandsp contains a test suite for the
> actual codec, which fully exercises it against the ITU test vectors, so
> the code that does the real work is well proven.
>
> If DC is the problem, I can add DC blocking to remove it.
>
> I thought Asterisk could use the 40k, 32k and 24k bps bit rates for
> G.726 these days, but having checked it seems it cannot. Only the G.726
> file format code allows for the various bit rates. My G.726 codec
> supports all the rates - 40k, 32k, 24k, and 16k - so adding support for
> all of them in Asterisk is pretty simple. It also supports compliant
> transcoding between G.711 and G.726, but I'm not sure how much work is
> needed to make Asterisk take advantage of that. Compliant transcoding
> significantly improves quality when you go G.711->G.726->G.711.
>
> Regards,
> Steve
>
>
> Regards,
> Steve
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>



More information about the asterisk-dev mailing list