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

Daniel Silaro daniel.silaro at gmail.com
Tue May 23 15:16:05 MST 2006


Steve,

I have gone to install spandsp and while patching against Asterisk
1.2.7.1 I get:

[root at pbx apps]# patch <apps_Makefile.patch
patching file Makefile
Hunk #2 FAILED at 104.
1 out of 2 hunks FAILED -- saving rejects to file Makefile.rej
[root at pbx apps]# cd /usr/src/asterisk

Any ideas where I may be going wrong?




On 5/21/06, Steve Underwood <steveu at coppice.org> wrote:
> Daniel Silaro wrote:
>
> > Steve,
> >
> > Would it be enough to replace the Asterish g726 codec with your
> > version or does one have to install spandsp also?
>
> You need to install spandsp to use my code. What I have provided in
> codec_g726.c is a thin layer to access the G.726 codec in spandsp itself.
>
> I missed in step in my last email.
> http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.2pre25/codecs_Makefile.patch
> contains a patch for the codecs/Makefile. This patch needs to be applied
> before rebuilding Asterisk.
>
> Regards,
> Steve
>
> >
> > 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
> >
>
> _______________________________________________
> --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