Adding G.729 For Free

alexburke
Posts: 99
Member Since:
2006-06-10

If you want to use Digium's "official" G.729 (low-bandwidth but very decent quality codec, 8KB/sec instead of ulaw's 64KB/sec), you need to buy a license per channel used.

However, there's an open source version which seems to work really well. I recommend you install it by doing the following when connected to your Asterisk box as root:

cd /usr/lib/asterisk/modules

Then do ONLY ONE of the following, depending which architecture your Asterisk box's CPU is:

wget http://kvin.lv/pub/Linux/Asterisk/built-for-asterisk-1.2/codec_g729-gcc-...
wget http://kvin.lv/pub/Linux/Asterisk/built-for-asterisk-1.2/codec_g729-gcc-...
wget http://kvin.lv/pub/Linux/Asterisk/built-for-asterisk-1.2/codec_g729-gcc-...
wget http://kvin.lv/pub/Linux/Asterisk/built-for-asterisk-1.2/codec_g729-gcc-...
wget http://kvin.lv/pub/Linux/Asterisk/built-for-asterisk-1.2/codec_g729-gcc-...

Then connect to the Asterisk console with:
asterisk -r
and type (adjust accordingly):
load codec_g729-gcc-athlon-sse.so

You should then see something like:
Loaded /usr/lib/asterisk/modules/codec_g729-gcc-athlon-sse.so => (G729/PCM16 (signed linear) Codec Translator, based on IPP)
== Registered translator 'g729tolin' from format g729 to slin, cost 1
== Registered translator 'lintog729' from format slin to g729, cost 6

Exit from the console with:
quit

Then use nano to edit /etc/asterisk/sip.conf and just below:
allow=ulaw
add:
allow=gsm
allow=g729

Then, if you still want to use G.711 (ulaw) between your box and your trunks (and between your box and your phones) for the time being until you have more time to experiment with it, go to your trunk config pages in FreePBX and add the following to the PEER DETAILS section:
disallow=all
allow=ulaw

On each of your phone extension pages, set "disallow" to all and set "allow" to ulaw. This will force them to use only ulaw. Click the red bar and you're done.

Now you're set up to use G.729 for free, but only when you're ready to try it out; to do this, you could go to your trunk config and put a semicolon at the beginning of the disallow line, which would then allow the system-wide settings (in sip.conf) to affect that trunk, which then it would start using. You could alternately change allow=ulaw to allow=g729 to force it to use only that codec.

To verify what codec you're actually using, while you're on a call connect to the Asterisk console with:
asterisk -r
and type:
sip show channels

--

Alexander Burke, A+, CCNA
Hardware hacker and all-around technogeek



pmoore4321
Posts: 54
Member Since:
2006-05-31
Re: Adding G.729 For Free

Works good for me. I used the Athlon.

Thanks



Ret
Posts: 14
Member Since:
2006-06-01
Re: Adding G.729 For Free

They are open source codecs but it seems you still have to pay for a license to use them.

Check the original website: http://www.readytechnology.co.uk/open/ipp-codecs/



carlosmcse
Posts: 24
Member Since:
2006-10-25
Re: Adding G.729 For Free

I'm getting the following error mesage:

asterisk1*CLI> load codec_g729-gcc-pentium4.so
Unable to load module codec_g729-gcc-pentium4.so
asterisk1*CLI>

Any ideas?



cllirabbit
Posts: 30
Member Since:
2006-08-18
Re: Adding G.729 For Free

This may sound like a dumb question, but if you're not sure of which architecture your Asterisk box's CPU is (or all you know is that it's some model Pentium), is there any command you can issue that will tell you for sure, in a way that would positively indicate which package should be used?

Under Windows there are system utilities that can be downloaded that will tell you more than you could ever want to know about your system, so I'm guessing there must be some Linux command that will detect which processor you have.



mammoth
Posts: 449
Member Since:
2006-06-14
Re: Adding G.729 For Free

Trixbox will do it for you. Click the System Info link on the main page under "System."



sanssome
Posts: 21
Member Since:
2006-08-02
Re: Adding G.729 For Free

Can anyone comment on the quality of the open source G.729 codec compared to Digiums? I am thinking of using these instead of Digium's which I am licensed for (i.e. royalty paid.) I'm battling the bug that holds on to decoder licenses when calls end.



rasker
Posts: 529
Member Since:
2006-06-02
Re: Adding G.729 For Free

um.... they are not open source in any way. Not only do you have to pay intel to use the IPP libraries but you have to pay the g.729 license holders for the g.729 licences (or digium). they are produced as a proof of concept and actually should only be distributed as code.

Also I believe they are quite an old code base of the reference g.729 codec so not really all that optimised.

However with all the horses under the hood of an average cheapo PC these days it's not a huge issue to run lots of g.729 channels.

I would like some hardphone vendor to throw out a speex based hardphone. That would put the cat amongst the pidgeons as speex is comparable to g.729, open source, actively developed and multiplatform. you can then hassle your provider to support it and presto all these issues go away.

R



javco
Posts: 13
Member Since:
2006-07-12
Re: Adding G.729 For Free

Hi.

I installed the G.729 as the instructions here say. Now I am able to use the G.729 codec on my asterisk but I stoped with some problems, and I want to ask if some body can help me.

1) I tried to enable two Lines with G.729 on a PAP2 but I am able to only use the codec g729 in one of the lines. Do you know how I can use the codec in both lines?

2) I am using IAX on some remote extensions but I see that any of the Softpones I have (Mac) support de G729 codec. Do you know if there is an IAX softphone for the mac with G.729 Support?

Thanks,
Javco



a_hensler
Posts: 18
Member Since:
2006-08-08
Re: Adding G.729 For Free

To reply to your number 1. question about g729 on two lines; I don't think the PAP2 is capable of that. It only has enough processing power to compress one line at a time. The PAP2 is the same as the SPA-2000; and the voip-wiki page ( http://www.voip-info.org/wiki/view/SIPURA+SPA-2000 ) state:

"If you want to use a compressed codec to save on bandwidth (G.726 or G.729) the SPA-2000 doesn't have enough computing power to compress two phone calls at the same time. So you are limited to one compressed call and one uncompressed (G.711 codec) at the same time. The improved SPA-2002 does not have this limitation."

In my case; the PAP2 is local; so everything is G711 and if required the outgoing trunk is g729; so I don't have to worry about the G729 being an issue on the PAP2. Not sure if the compression info above relates to the PAP2 version2 though; but I think if you can only have one G729 call at a time; it must be the PAP2 v1.



javco
Posts: 13
Member Since:
2006-07-12
Re: Adding G.729 For Free

Thanks for the answer.

Regarding the 2nd question somebody have an answer?

2) I am using IAX on some remote extensions but I see that any of the Softpones I have (Mac) support de G729 codec. Do you know if there is an IAX softphone for the mac with G.729 Support?

Greetings,
Javco



hoolahoous
Posts: 59
Member Since:
2006-06-02
Re: Adding G.729 For Free

PAP2 v1 doesn't support two simultaneous g729's.
However you can set them as 'preffered' codec in both lines. (do not select 'use preffered codecs only). That will make sure that PAP2 will try to use G729 first. If it is already being used by second line, only then it will fall back to g711u on second line.
Only adapter I know of which can handle two g729's at same time is WRTP54G vonage router + ata (if you are able to unlock it).



joefromcan
Posts: 10
Member Since:
2006-11-24
Duron? What to use Adding G.729 For Free

what if your syste info says you have a amd duron should I use the athlon (even though its not a atlon) or should I pick one of the pentiums?!

HELP



joefromcan
Posts: 10
Member Since:
2006-11-24
Re: Duron? What to use Adding G.729 For Free

So You all know and there is record for othere nubies out there.. I tryed the athlon.. it just sorta stopped asterisk dead weird.. so I rm 'd it (removed it from the computer.. then I tried the next one it sorta gave a error.. but the PII one did work for the duron..

So fellow AMD Duron USERS out there you want the PII or well it works I never tried the otheres..

I used it with a snom 200 and a sipura 3000 I had to force it to use 729a (the hardware) seem to do the trick and for the peers.. I have had 3 channels at once so far tested.. please tell me how you all have done..

I hope people have found this info helpfull

NOw if we could just get things running on debian..

Of course I just use this for testing and will purchace proper licences when they fix there problems with the pay version!!



sandy
Posts: 4
Member Since:
2007-01-19
Re:Problem Adding G.729 For Free

Problem with adding G729 codec free.
Hi,
I have downloaded G729 codec for my pentium machine from this link
wget http://kvin.lv/pub/Linux/Asterisk/built-for-asterisk-1.2/codec_g7...
as specified in one of the posts.

I am currently using Asterisk 1.2.14 and zaptel-1.2.12. But still i am facing some problems stated below :

1. It still shows UNKNOWN format for the channels.
2. I dont hear any voice when i select G729 codec.

Could any one tell me the solution for this?
Thanks in advance ! :)



anchor85
Posts: 678
Member Since:
2006-06-07
Re:Problem Adding G.729 For Free

If you go to the asterisk command line by running asterisk -vvvr in the console. you can then enter show translation and that should display a table with 11 rows and columns for all the codecs loaded on your system

There is a row and column for g729 that has entries such as below for the translation times between formats (in milliseconds). Ive just picked the g729 row here.

g723 gsm ulaw alaw g726 adpcm slin lpc10 g729 speex ilbc
g729 - 8 5 5 11 5 4 9 - - 33

[this does not format correctly but you get the idea]

But this shows that g729 is loaded into the system. If the g729 codec is not loaded the row and column for g729 are blank.

John

--

John
Cat24.net



sandy
Posts: 4
Member Since:
2007-01-19
Re:Problem Adding G.729 For Free

Hi john,
I have already tried like what you have said,when i type show translation,it does shows the values as below :

g723 gsm ulaw alaw g726 adpcm slin lpc10 g729 speex ilbc
g729 9 4 3 3 3 3 2 5 - - 16

After this i even unloaded and loaded the G729 Codec and also restarted the asterisk. But still i am facing the problems.
Can u suggest any other solution to this problem.

Thanks n Regards,
sandy :)



sandy
Posts: 4
Member Since:
2007-01-19
Re:Problem Adding G.729 For Free

Hi john,
I have already tried like what you have said,when i type show translation,it does shows the values as below :

g723 gsm ulaw alaw g726 adpcm slin lpc10 g729 speex ilbc
g729 9 4 3 3 3 3 2 5 - - 16

After this i even unloaded and loaded the G729 Codec and also restarted the asterisk. But still i am facing the problems.
Can u suggest any other solution to this problem.

Thanks n Regards,
sandy :)



mrees
Posts: 8
Member Since:
2007-01-16
Re: Adding G.729 For Free

So what if you have a Pentium D?
No codecs? :(

I tried the P4 codec with no luck. Asterisk crashed on bootup.

A major bummer

has anyone had any luck getting g.729 working using the Latest Trixbox on a Pentium D?

Cheerz,
mrees



mvsystems
Posts: 1120
Member Since:
2006-06-05
Re: Adding G.729 For Free

wow...asterisk is free, trixbox is free, pony up and buy the real 729 from Digium.

--

Tim Booth FtOCC
MaineVoIP Systems
VisionCom
Portland, Maine



anchor85
Posts: 678
Member Since:
2006-06-07
Re: Adding G.729 For Free

Sandy,
I have no idea as to the real cause of your error message. It looks as though you have installed the G729 successfully. Check in sip.conf and iax.conf and make sure that you have have an 'allow=g729' if not your trunks (at least) will not be able to use g729. I have

disallow=all
allow=g729
allow=ulaw
allow=alaw
allow=gsm

Also make sure that the phones themselves are set to accept g729.

John

--

John
Cat24.net



didan
Posts: 1
Member Since:
2007-01-30
Re: Adding G.729 For Free

Perfect !! g729 + trixbox rulaz.. (P4)



jades
Posts: 2340
Member Since:
2006-11-26
Re: Adding G.729 For Free

is there a release for xeon processors?
thanks

--

Joseph Ades
josephades1_at_gmail_dot_com
(212) 937-4299



rasker
Posts: 529
Member Since:
2006-06-02
Re: Adding G.729 For Free

Don't think there is anything specific for Xeons. Performance improvements come from using SSE/SSE2 rather than larger caches found on Xeons.

You could use my script to auto-install the g.729 codecs. It does various checks to pickup the processor features and then selects an appropriate codec version. It can also install a 'safer' version and also remove installed codecs (if they are crashing asterisk).

http://www.trixbox.org/modules/newbb/viewtopic.php?viewmode=flat&...

Rehan



n4dsl
Posts: 6
Member Since:
2007-02-21
I did the instructions in

I did the instructions in this forum, and now my box is dead, asterisk won't start, how can undo what I did

Now when I do a asterisk -r

Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist

what do I do?



engjohn
Posts: 522
Member Since:
2006-05-31
Delete the

Delete the "codec_g729-gcc--sse.so" file

Then restart asterisk



jades
Posts: 2340
Member Since:
2006-11-26
since trixbox's website has

since trixbox's website has changed, can you please update the link your provided? because it says page not found

thanks a lot

--

Joseph Ades
josephades1_at_gmail_dot_com
(212) 937-4299



voipman
Posts: 127
Member Since:
2006-06-19
Is there any difference of

Is there any difference of using this g729 for free than the one from digium for $30 a piece? Is it better in anyway?



alben
Posts: 21
Member Since:
2007-03-27
trixbox and g729

can you kindly tell me what i need to do on my trixbox after i succesfully installed the g729 as per above instructions so I can use my voip provider?
i have the voip provider proxy ip and my username and password.

thanks a lot



tokio69
Posts: 18
Member Since:
2007-03-30
Link no longer working

Hi Rehan,

can you place a working link for your scripts or stuff. Still having issues with installing g729 codec.

Trix scipts US is also no longer working. and also the links in the first post are f__t up.

Tom



robr
Posts: 61
Member Since:
2006-11-04
installing g729

Looking at the links in the first post, they are no longer correct. I clicked on one of the links and I believe for an athlon, what I want to get is this:
wget http://asterisk.hosting.lv/bin/codec_g729-ast12-gcc4-glibc-athlon...

I have downloaded that file to the /usr/lib/asterisk/modules directory

However when I try to load it, I get an error:
fax*CLI> load codec_g729-ast12-gcc4-glibc-athlon-sse.so
Unable to load module codec_g729-ast12-gcc4-glibc-athlon-sse.so

Ok, I think I got it, I'm running an x64 Athlon so needed a different codec

wget http://asterisk.hosting.lv/bin/codec_g729-ast12-icc-glibc-x86_64-...
chmod 755 codec_g729-ast12-icc-glibc-x86_64-pentium4.so
asterisk -vr
fax*CLI> load codec_g729-ast12-icc-glibc-x86_64-pentium4.so
Loaded /usr/lib/asterisk/modules/codec_g729-ast12-icc-glibc-x86_64-pentium4.so => (G729/PCM16 (signed linear) Codec Translator, based on IPP)

fax*CLI> show translation
Translation times between formats (in milliseconds)
Source Format (Rows) Destination Format(Columns)

g723 gsm ulaw alaw g726 adpcm slin lpc10 g729 speex ilbc
g723 - - - - - - - - - - -
gsm - - 2 2 2 2 1 5 33 - 12
ulaw - 3 - 1 2 2 1 5 33 - 12
alaw - 3 1 - 2 2 1 5 33 - 12
g726 - 3 2 2 - 2 1 5 33 - 12
adpcm - 3 2 2 2 - 1 5 33 - 12
slin - 2 1 1 1 1 - 4 32 - 11
lpc10 - 4 3 3 3 3 2 - 34 - 13
g729 - 5 4 4 4 4 3 7 - - 14
speex - - - - - - - - - - -
ilbc - 3 2 2 2 2 1 5 33 - -
fax*CLI>

Bingo. Works great. This whole post really needs to be updated with better instructions and the script mentioned above needs to be rewritten, but for the most part you just need to figure out which file to download via the links in the first post, do a manual download, and the rest is accurate.

fax*CLI> sip show channels
Peer User/ANR Call ID Seq (Tx/Rx) Form Hold Last Message
192.168.10.110 500 499f4018-e1 00101/00102 g729 No Rx: INVITE
.
.
.



silktech
Posts: 5
Member Since:
2007-08-20
Do the phones have to

Do the phones have to support this codec?

I am getting a SIP response 488 "Not Acceptable Here"

with Xlite..



kerryg
Posts: 6793
Member Since:
2006-05-31
DO NOT CONTINUE THIS

DO NOT CONTINUE THIS DISCUSSION!!!

The use of the alternate codec is illegal in the United States and its use is violation of copyright law. This means you are in a public forum discussing using pirated software. Do not continue to discuss this here and do not use this codec as you would be breaking the law.

I hate to put it this way but you cannot discuss illegal activities here. Sorry.

--

Kerry Garrison
http://www.VoipStore.com - http://3cxbook.com
(888) VOIPSTORE - (888) 864-7786



16again
Posts: 370
Member Since:
2007-03-04
afaik, g729 patents aren't

afaik, g729 patents aren't valid over here in Europe, so for me there's nothing illegal in discussing the free codec on a public forum.



kerryg
Posts: 6793
Member Since:
2006-05-31
Except this public forum is

Except this public forum is located in the United States where it is illegal.

--

Kerry Garrison
http://www.VoipStore.com - http://3cxbook.com
(888) VOIPSTORE - (888) 864-7786



gregjones
Posts: 123
Member Since:
2006-06-06
Bingo

Kerry is correct. Discussion on this US forum subjects you to US law.



daviddabs
Posts: 8
Member Since:
2007-12-06
I'd love to see US law

I'd love to see US law prosecute someone in Europe - worst that could happen is we could be banned from entering the US.

Anyway isnt the owner of the patent for these codecs up in the air at the moment, so we wouldn't really know who to pay a royalty to for its use.

Anyway one thing that Ive discovered is using this codec will break faxing over sip if your not selective where its activated.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.