[Asterisk-Users] G.729 passthrough notes (wiki fodder?)

John Todd jtodd at loligo.com
Thu Mar 11 07:58:55 MST 2004


I did some cursory searching on the list archives, and was not able 
to come up with this solution, so I'll summarize.  Someone else 
should put this on the Wiki, since I am terribly lazy when it comes 
to web-ifying things.

I had previously passed G.729 (and G.723) through Asterisk, using 
SIP, between various SIP phones and a Cisco PRI gateway to which I 
have access.  I had previously remembered just ensuring that the Dial 
statement on the outbound call did not have "T", or "t" nor Monitor 
associated with the channel, so that Asterisk didn't have to "listen" 
to the RTP stream.  This was simply packets in/packets out, no 
transcoding or de-coding required.  I didn't want it to do a SIP 
re-invite, since I wanted to use the Asterisk server as an RTP proxy 
for various reasons that I won't go into here.

I tried getting this to work the other day, and for some reason it 
was not functioning as I had recalled.  No matter how simple my 
dialplan, Asterisk insisted on transcoding the audio channel, even 
though it shouldn't have.  As I didn't have any G.729 channel 
licenses on that machine, that was obviously not optimal.  In any 
case, I wanted to push a lot of channels through the system and not 
be hamstrung by the processing power of the Asterisk server being the 
bottleneck.

Here is what I had configured for the general section, the Cisco PRI 
gateway, and the UA, respectively:

[general]
port = 5060
bindaddr = 0.0.0.0
context = default

[cisco1]
type=friend
host=10.10.22.18
context=from-cisco1
canreinvite=yes
disallow=all
allow=g729

[3013534299]
type=friend
host=dynamic
nat=1
secret=somesecretpassword
canreinvite=no
context=from-clients
disallow=all
allow=g729

I had added/subtracted various allow/disallow parameters in each SIP 
peer to no avail.  After some halfhearted searching through the 
archives, I didn't come up with anything that seemed to solve the 
problem, though I did find some people asking the same question. 
Searching on "passthrough" gave no useful results, and searching on 
"G.729" or "g729" led to too many results, so I was forced to ask for 
help.  :-)  The folks at Digium suggested the following:

Add to the [general] section in sip.conf the following:

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

Without this block of permissions, apparently Asterisk will not pass 
audio through itself without trying to transcode.  Why this is not 
implicitly understood by the configuration options under each SIP 
peer, I don't know, but when I added those lines to the [general] 
section of sip.conf, the system started to pass through the G.729 
media streams without trying to perform codec translation.  Now it 
works!

Next up: testing the number of RTP streams an Asterisk box can handle 
without transcoding...

JT







More information about the asterisk-users mailing list