No g729 Passthrough

I just upgrade a PBX from Asterisk 1.2 to 1.4.

I can see the incoming gateway INVITEs requesting g729,
but the Asterisk is not passing through g729 to the phones.
This is a problem for gateways that only send g729 calls…



What other config options do I need to check? What debugs
can I perform to see what might be happening to my codecs?



See if it works. If not try:


Nope. Already tried that setup in my troubleshooting.


Could there have been any problems when I compiled
that might have left g729 out? Can I check via the CLI
to see if my Asterisk is even going to support g729? Is
it necessary to support a codec if it’s just for pass-thru?

I’ve read about this issue in several threads now, and I
am surprised there hasn’t been an obvious resolution?


Yes I believe that you need it there. Also try show G729 and show codecs from your CLI and see what comes up.

CLI> core show version
Asterisk built by root @ host on a i686 running Linux

CLI> show g729
No such command ‘show g729’ (type ‘help’ for help)

CLI> show codecs
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)
  65536 (1 << 16)  (0x10000)  image       jpeg   (JPEG image)
 131072 (1 << 17)  (0x20000)  image        png   (PNG image)
 262144 (1 << 18)  (0x40000)  video       h261   (H.261 Video)
 524288 (1 << 19)  (0x80000)  video       h263   (H.263 Video)
1048576 (1 << 20) (0x100000)  video      h263p   (H.263+ Video)
2097152 (1 << 21) (0x200000)  video       h264   (H.264 Video)


This could be the lead I was looking for…


so what was wrong?

i was reading about that codec and see its digium and you have to pay a license to use it…does that mean you have already payed the license but you just cant get it to work? Or does it work, but it is on the honor system if you sell the system you got to pay them for licensing?

im a little confused from the wiki

Actually… no dice.

CLI> show modules like
Module Description Use Count Annex A/B (floating point) G.729 Codec ( 0
1 modules loaded

I have the module successfully loaded, but Asterisk still is not
sending g729 through to my phone on the INVITE request. :cry:


Is anyone else actually passing through g729 on Asterisk 1.4.x?


It works for me.
Can you check ‘sip show peer’ for both your phone and trunk and see if g729 is displayed in both lines like I have it:

Codecs : 0x10c (ulaw|alaw|g729)
Codec Order : (alaw:20,ulaw:20,g729:20)

The gateway…

Codecs : 0x104 (ulaw|g729)
Codec Order : (ulaw:20,g729:20)

The phone…

Codecs : 0x10c (ulaw|alaw|g729)
Codec Order : (g729:20,ulaw:20,alaw:20)

Although it still doesn’t work even if I remove alaw|ulaw completely.
We are including ulaw on the gateway, temporarily, to get it to work.


Here’s some interesting logs…

[Sep 18 09:52:09] VERBOSE[2786] logger.c: == Registered file format g729, extension(s) g729
[Sep 18 09:52:09] VERBOSE[2786] logger.c: => (Raw G729 data)
[Sep 18 09:52:09] NOTICE[2786] codec_g729.c: G.729 transcoding module version 32, Copyright © 1999-2007 Digium, Inc.
[Sep 18 09:52:09] NOTICE[2786] codec_g729.c: This module is supplied under a commercial license granted by Digium, Inc.
[Sep 18 09:52:09] NOTICE[2786] codec_g729.c: Please see the full license text supplied by the accompanying
[Sep 18 09:52:09] NOTICE[2786] codec_g729.c: “register” utility, or ask for a copy from Digium.
[Sep 18 09:52:09] NOTICE[2786] codec_g729.c: This product includes software developed by the OpenSSL Project
[Sep 18 09:52:09] NOTICE[2786] codec_g729.c: for use in the OpenSSL Toolkit. (
[Sep 18 09:52:09] NOTICE[2786] codec_g729.c: Copyright © 1998-2006 The OpenSSL Project
[Sep 18 09:52:09] VERBOSE[2786] logger.c: == G.729 Host-ID: [x]
[Sep 18 09:52:09] WARNING[2786] codec_g729.c: Failed to initialize G.729 copy protection!
[Sep 18 09:52:09] VERBOSE[2786] logger.c: => (Annex A/B (floating point) G.729 Codec (optimized for i686))

So I’m getting a failed to init on the G729 codec?
I downloaded a precomplied binary from Digium.

Maybe this gives me some direction I should take??


No are barking up the wrong tree and to be honest the time you have spent on this it would be cheaper to by a couple of licences @ $10 each.

[quote]copy protection! [/quote] gives you a big clue, Odds on the reason passthrough is not working will be due to the dialplan in some way,

perhaps some debug of a call and also the dialplan in question would shed some light on it


  1. g729 phone -> Asterisk -> g729 phone = Works
  2. g729 gateway -> Asterisk -> g729 phone = Fails

In both cases, the initial INVITE to Asterisk includes g729.
In #2, it will not send g729 to the phone, but it does in #1.

Does this make any sense?


I have no problem spending $10 per channel, if that’s the problem.
I’m not convinced yet. I’ve heard from someone who has the same
problem after they purchased the licenses. I doubt it’s the problem.
Pass-through works phone to phone, but not gateway to phone, now
I just need to figure out why Asterisk treats them any different?


[quote]but not gateway to phone, now
I just need to figure out why Asterisk treats them any different? [/quote]

as I said before what does the dialplan looklike. My guess is you are proxing the media, and not reinviting it also how are you going to send the call to voicemail if the gateway only supports g729? or play a message ?

Basicly if a customer want g729, I buy licences and it all works. The end


Do we really need to buy anything for the passthrough mode? … +pass-thru

[quote=“thehemi”]1) g729 phone -> Asterisk -> g729 phone = Works
2) g729 gateway -> Asterisk -> g729 phone = Fails[/quote]

Actually… #1 works ONLY when BOTH devices are setup for g729 only
in the sip config file. If the SOURCE phone has multiple codecs, it fails.

I’m going to attempt a similar config using the gateway to phone test…