G729 in ATA

I am using a LinksysSPA 2102 ATA to bridge my POTS phone to an Asterisk 1.8.4 Server (ASUS RT-N16).

Has anyone configured G729 in an ATA and configured a SIP VOIP channel (in my case callcentric) to use G729 encoding, without installing the G729 codec on the * server?

I would think that this is possible \ preferable because the hardware in the ATA would be doing the heavy lifting.

It’s supposedly possible, but Asterisk will not be able to generate any tones. You also have to be careful with Originate/call files, as the default codec must be g729, for those to work.

@David55: I think that this url: http://www.callcentric.com/faq/8/100 reads as the G729 to be the #1 default codec?

When a call is setup between my VOIP provider (Callcentric) and my ATA, I understand that they negotiate which codec to use. Both ends support G729. Throw in Asterisk in between the two as a pass through and I can then select Gtalk or Callcentric to make \ receive calls. I am acclimating the relatives to use G729 Callcentric and familiarizing the more advance ones to use a SIP URI.

I found an article discussing Passthrough: http://www.voip-info.org/wiki/view/Asterisk+G.729+pass-thru and it suggested sip.conf contain:

[general] disallow=all allow=g729 allow=ulaw allow=alaw

I don’t think that any of these codecs support the Gtalk codecs:

[quote]Today, Google Talk supports the following standard voice codecs:
We also support the following codecs from Global IP Sound: ISAC, IPCMWB, EG711U, EG711A.[/quote]

So I guess I would need to add G.722 to the list above: this chart shows speex codec is on par with G729 when it come to bandwidth. Not sure how one would go about having Asterisk convert G.722 or G729 (from ATA) to Speex for Gtalk. How to check if Speex is in my distro of Asterisk:

Disclaimer: this command is for informational purposes only.
It does not indicate anything about your configuration.

              1 (1 <<  0)                (0x1)  audio       g723   (G.723.1)
              2 (1 <<  1)                (0x2)  audio        gsm   (GSM)
              4 (1 <<  2)                (0x4)  audio       ulaw   (G.711 u-law)
              8 (1 <<  3)                (0x8)  audio       alaw   (G.711 A-law)
             16 (1 <<  4)               (0x10)  audio   g726aal2   (G.726 AAL2)
             32 (1 <<  5)               (0x20)  audio      adpcm   (ADPCM)
             64 (1 <<  6)               (0x40)  audio       slin   (16 bit Signed Linear PCM)
            128 (1 <<  7)               (0x80)  audio      lpc10   (LPC10)
            256 (1 <<  8)              (0x100)  audio       g729   (G.729A)
            512 (1 <<  9)              (0x200)  audio      speex   (SpeeX)
           1024 (1 << 10)              (0x400)  audio       ilbc   (iLBC)
           2048 (1 << 11)              (0x800)  audio       g726   (G.726 RFC3551)
           4096 (1 << 12)             (0x1000)  audio       g722   (G722)

If anyone has experience setting up Asterisk as a pass through and configuring both an ATA to negotiate using G729 with Callcentric I would be interested in how you implemented this. Is this something you would setup in the setup of the Callcentric channel in sip.conf by specifying the codecs:

context=from-callcentric ;how incoming calls are handle: defined in: extensions.conf

I tried this and forced the ATA to use G729, however, calls did not go through to the ATA. I disabled “force G729 Codec” and calls went through using the ulaw codec.

root@athomehost:~# asterisk -rx "sip show channels" Peer User/ANR Call ID Format Hold Last Message Expiry Peer 3609170032 370f97e627b119f 0x4 (ulaw) No Tx: ACK <guest> 101 49df06406bb43e6 0x4 (ulaw) No Tx: ACK 101 2 active SIP dialogs

Apparently, I need another control mechanism to force G729 codec usage? Or should allowed codecs be specified in extensions.conf?

I would like all callcentric traffic to be configured to negotiate use of G729 codec, with Asterisk as the passthrough (broker?). Any examples are appreciated.

I checked my Asterisk configuration with my VOIP (callcentric) connection. It shows that the SIP peer (named ‘callcentric’) is configured for G729:

root@athomehost:~# asterisk -rx "sip show peer callcentric" | grep Codec Codecs : 0x100 (g729) Codec Order : (g729:20)

I am wondering if not having a G729 codec on Asterisk causes the codec negotiation to default to a ulaw codec. I would have thought that disallow /allow statements:

context=from-callcentric ;how incoming calls are handle: defined in: extensions.conf

would force the configuration between Asterisk and callcentric to use the g729. My ATA is configured with the G729 as the preferred codec. Why is that when I make a call it uses ulaw?

Check the preffered codec in the ATA too.

My ATA has two SIP channels. Let’s call them Ch1 (channel 1) and Ch2. Ch1’s codec was forced to be 729a. Ch2’s preferred codec is 729a and is registered with Asterisk, which has a Callcentric Channel.

Ch1: registered to callcentric : G729A Codec = Forced (use only this codec)
Ch2: registered to Asterisk : G729A Codec = Preferred

A call placed from Ch1 (G729A Only) to another callcentric phone (parents) works fine. A call from Ch1 to the Asterisk Callcentric channel is has an immediate reply “the person you have called is unavailable… yada yada yada”.

This tells me that call inbound G729 SIP traffec is not negotiated by Asterisk to the other G729 endpoint. I hope the more experienced (especially Digium employees) will tell me I’m wrong and provide remedy guidance. Thanks.

You can’t reliably infer the nature of the problem from the diagnostic you quoted. You need to turn on sip debugging and sip module debugging and see what Asterisk is sending and receiving, and if and how it comes to the conclusion that there is no acceptable codec.

To get Asterisk to convert between two codecs you install, and where necessary, licence, codec modules that when chained together can perform the conversion. That probably means the G.729 codec and licence, sold by Digium, and a G.722 to linear codec, which come with Asterisk.