My G729 problem re-visited

Ok, I built a test system to duplicate my problem and provide myself
a platform that I can mess around with to try and break any features.
My problem is G729 pass-through from a gateway to a phone. I think
I even have transcoding working, which makes me more confused on
what’s wrong with my pass-through. It must be a configuration issue.

The basics…

*CLI> core show version
Asterisk 1.4.11 built by root @ fwd-tst02 on a i686 running Linux

*CLI> show modules like 723
Module Description Use Count
codec_g723.so G.723.1 Coder/Decoder 0
format_g723.so G.723.1 Simple Timestamp File Format 0

*CLI> show modules like 729
Module Description Use Count
codec_g729.so G.729 Coder/Decoder 0
format_g729.so Raw G729 data 0

*CLI> show translation
[truncated]
g723 gsm ulaw alaw g726aal2 adpcm slin lpc10 g729 speex ilbc g726 g722
ulaw 5 2 - 1 2 2 1 3 7 - 11 2 -
alaw 5 2 1 - 2 2 1 3 7 - 11 2 -
g729 5 2 2 2 2 2 1 3 - - 11 2 -

The configuration…

[gateway]
type=friend
host=gateway
context=default-inbound
disallow=all
allow=g729

[phone]
type=friend
context=sip
host=dynamic
username=phone
secret=scott
dtmfmode=RFC2833
disallow=all
allow=g729
callerid=Scott
qualify=yes
canreinvite=no

exten => 1266,1,Dial(SIP/[number],30,t)
exten => 1266,2,Congestion

The environment…

PSTN -> Gateway -> Asterisk -> Phone

What I’m seeing works…

With the gateway setup to send both G711 and G729, it sends
an INVITE which includes both G711 and G729 codecs. Asterisk
sends an INVITE to my phone with only G729. The call is made
and there’s a conversation in G711 with the gateway and G729
with the phone. I assume this means Asterisk is transcoding.

What I"m seeing fails…

With the gateway setup to send only G729, it sends an INVITE
to Asterisk which includes only G729. Asterisk send an INVITE
to the phone using G729, too. The 200 OK from the phone to
the Asterisk includes G729. The 200 OK going from Asterisk to
the gateway doesn’t include ANY codec. The call is dropped the
moment I pickup the phone to answer the call.

My question…

Why does Asterisk not want to respond to my gateway in G729?
Even if the gateway requests it, Asterisk seems to just ignore it.
From the transcoding call, and phone to phone G729 calls, I have
proof that Asterisk knows how to handle G729 calls.

Where do I go from here???

Thanks,
Scott

Hi

Well finaly we get a dialplan. and it may answer your problem…

exten => 1266,1,Dial(SIP/[number],30,t)

you need to try

exten => 1266,1,Dial(SIP/[number],30)

[quote=“ianplain”]you need to try

No, not the problem. I get the same result w/o the “t”.
Asterisk still doesn’t want to talk G729 back to the GW.

Thanks,
Scott

My tests have always been through a Cisco 3640 gateway.
I got my hands on a Cisco 5350 to try and the same issue.
They’re both running on pretty different IOS versions, too.

Thanks,
Scott

Just checking, but…

You did remember to get a G.729 license for your platform, right?

digium.com/en/products/voice/g729codec.php

digium.com/en/products/voice/g729policy.php

G.729 is not a public domain codec, and requires a license to use it on an Asterisk platform.

Yes, I purchased a license and it didn’t resolve the situation.
Not to mention what I’m doing I thought was "pass through"
and shouldn’t require a license anyways.

It will transcode when the gateway is 711 and phone is 729.
It will work 729 to 729 between phones through the Asterisk.
Just whenever the gateways are used, it won’t speak 729…

Thanks,
Scott

Did you say you purchased -A- license? Just one?

You need to purchase a license for each active G.729 channel that will be connected to the Asterisk. If you’re using one G.729 device and one G.711 device, you need only 1 license. If you need to communicate with more than one G.729 device simultaneously, you need to have licenses for each G.729 channel in service.

Yes, that was my error, I plan to purchase another G729 license.

However, if the gateway talks G729 and the phone talks G729, why
is Asterisk not using pass through? G729 to G729 works when we’re
using internal phones only. But put a gateway on one end and it fails.

Why would G729 phone to G729 phone work, while going from
G729 gateway to G729 phone not work? That is our problem.
If there’s a reason, I’m good with that, but I haven’t heard why?

Thanks,
Scott

It’s doing “pass through” yes, but it’s still supporting two channels. No transcoding is in progress, but that’s not the definition of the license. It’s how many supported endpoints are streaming back and forth to the Asterisk box.

Maybe the thing you want to do is set it up for re-invites. In that case, the G.729 phone will ask the Asterisk for a G.729 channel to an object (invite).

The Asterisk box won’t start a second G.729 session, instead it will tell the originating station that it can find the services it’s looking for ‘over-there’, and the originating station re-invites to the gateway. The gateway, being designed for G.729, and the station also being designed for G.729 are already licensed, so, no violation.

That might do it for you. In this setup, the Asterisk box becomes unaware of things like call start and stop times, and can’t do transcoding, but if that’s not important to you (you’re just using it for v-mail, routing and such) then it may work out.