Weird Incoming call iissue - g729

First my setup-
[ul]
[li]My voip ISP is Telasip[/li]
[li]Asterisk Server is a 3Ghz P4 with 512MB ram[/li]
[li]I am running a fresh install of Asterisk@Home 2.5[/li]
[li]My Internet connection is 3Mb up, 512kb down[/li]
[li]My desktop phones are softphones, Eyebeam to be exact. I have the codec set to g729, gsm and g711 in the options for the softphone.[/li][/ul]

My Goal
I would like all of my traffic over my trunk, incoming and outgoing, to use my g729 codec. I am not sure if this is unrealistic. But its my goal. I would like to keep bandwidth down.

My issue
I installed the Digium g729a codec and I am having issues when I set the options in my outgoing trunk settings (under peer details) to “disallow=all” and “allow=g729&gsm”. Any incoming calls register like this in the CLI. They never receive the playback from my aa_1 file that the digital receptionist uses.

  -- Executing Goto("SIP/cpippin-e2bf", "s|1") in new stack
    -- Goto (from-pstn,s,1)
    -- Executing GotoIf("SIP/cpippin-e2bf", "0?from-pstn-reghours|s|1:") in new stack
    -- Executing GotoIf("SIP/cpippin-e2bf", "0?from-pstn-afthours|s|1:") in new stack
    -- Executing GotoIfTime("SIP/cpippin-e2bf", "8:00-17:00|mon-fri|*|*?from-pstn-reghours|s|1:") in new stack
    -- Executing Goto("SIP/cpippin-e2bf", "from-pstn-afthours|s|1") in new stack
    -- Goto (from-pstn-afthours,s,1)
    -- Executing Ringing("SIP/cpippin-e2bf", "") in new stack
    -- Executing Answer("SIP/cpippin-e2bf", "") in new stack
    -- Executing Wait("SIP/cpippin-e2bf", "1") in new stack
  == Spawn extension (from-pstn-afthours, s, 3) exited non-zero on 'SIP/cpippin-e2bf'
    -- Executing Hangup("SIP/cpippin-e2bf", "") in new stack

I can place calls out and I do see that I am using the g729 codec as my bandwidth, which is only around 30Kbps.
However if I change the allow statement to “allow=g729&gsm&ulaw”, to correct the issue above, I will get a proper connection which gives me my voice message from the digital receptionist. Watching my bandwidth though I see that I am obviously not using G729 as its is around 80-90Kbps. That is the bandwidth usage when I am using ulaw encoding.

My question is, is adding the allow and disallow statements in these areas is the correct way to force my trunk to only use these codecs across the trunk the proper configuration. If not, can you enlighten me as to what is the proper configuration.

Also - If I remove the digital receptionist from the picture and direct incoming calls to an extension, in this case it would be 1000. I receive the call but when I go on hook to answer the call the call immediately is hung up.

Below are some of my config settings.

My Peer details for my Telasip trunk:

allow=g729&gsm
disallow=all
dtmfmode=rfc2833
fromdomain=gw4.telasip.com
fromuser=myusername
host=gw4.telasip.com
insecure=very
secret=mypassword
type=peer
username=myusername

My User details for my Telasip trunk:

allow=g729&gsm
context=telasip-in
disallow=all
host=gw4.telasip.com
insecure=very
qualify=yes
secret=mypassword
type=peer
username=myusername

My “from-pstn-reghours” settings:

[from-pstn-reghours]
;exten => s,1,GotoIf($[${FAX_RX} = disabled]?from-pstn-reghours-nofax,s,1:2)	; if fax detection is disabled, then jump to from-pstn-nofax - else continue
exten => s,1,Ringing                                      
exten => s,2,Answer	
exten => s,3,Wait(1)
exten => s,4,SetVar(intype=${INCOMING})
exten => s,5,Cut(intype=intype,-,1) 
exten => s,6,GotoIf($[${intype} = EXT]?7:9)		; If INCOMING starts with EXT, then assume its an extension
exten => s,7,Wait(3) 							;wait 3 more second to make sure this isn't a fax before dialing someone
exten => s,8,Goto(ext-local,${INCOMING:4},1)
exten => s,9,GotoIf($[${intype} = GRP]?10:12) 	; If INCOMING starts with GRP, then assume its a ring group
exten => s,10,Wait(3)
exten => s,11,Goto(ext-group,${INCOMING:4},1)
exten => s,12,GotoIf($[${intype} = QUE]?13:15)
exten => s,13,Wait(3)
exten => s,14,Goto(ext-queues,${INCOMING:4},1)
exten => s,15,Goto(${INCOMING},s,1) 			; not EXT or GR1 - it's an auto attendant
;exten => fax,1,Goto(ext-fax,in_fax,1)
exten => h,1,Hangup

my “from-pstn-afterhours” settings:

[from-pstn-afthours]
;exten => s,1,GotoIf($[${FAX_RX} = disabled]?from-pstn-afthours-nofax,s,1:2)	; if fax detection is disabled, then jump to from-pstn-nofax - else continue
exten => s,1,Ringing                                      
exten => s,2,Answer	
exten => s,3,Wait(1)
exten => s,4,SetVar(intype=${AFTER_INCOMING})
exten => s,5,Cut(intype=intype,-,1) 
exten => s,6,GotoIf($[${intype} = EXT]?7:9)		; If INCOMING starts with EXT, then assume its an extension
exten => s,7,Wait(3) 							;wait 3 more second to make sure this isn't a fax before dialing someone
exten => s,8,Goto(ext-local,${AFTER_INCOMING:4},1)
exten => s,9,GotoIf($[${intype} = GRP]?10:12) 	; If INCOMING starts with GRP, then assume its a ring group
exten => s,10,Wait(3)
exten => s,11,Goto(ext-group,${AFTER_INCOMING:4},1)
exten => s,12,GotoIf($[${intype} = QUE]?13:15)
exten => s,13,Wait(3)
exten => s,14,Goto(ext-queues,${AFTER_INCOMING:4},1)
exten => s,15,Goto(${AFTER_INCOMING},s,1) 			; not EXT or GR1 - it's an auto attendant
;exten => fax,1,Goto(ext-fax,in_fax,1)
exten => h,1,Hangup

My “sip.conf” settings:

; Note: If your SIP devices are behind a NAT and your Asterisk
;  server isn't, try adding "nat=1" to each peer definition to
;  solve translation problems.

[general]
port = 5060           ; Port to bind to (SIP is 5060)
bindaddr = 0.0.0.0    ; Address to bind to (all addresses on machine)
disallow=all
allow=g729
allow=ulaw
allow=alaw
allow=gsm
;context = from-sip-external ; Send unknown SIP callers to this context
context = from-pstn ;
callerid = mydidnumber

externip=my.external.ip.address
localnet=192.168.1.0/255.255.255.0
nat=yes

progressinband=yes

#include sip_nat.conf
#include sip_custom.conf
#include sip_additional.conf

Thank you in advance for any and all help.

change: allow=g729&gsm to:

allow=g729
allow=gsm

I did that…

I originally typed:

disallow=all
allow=g729
allow=gsm

Once you click update and than apply in Amp it changes the settings to be “allow=g729&gsm”.

Hi

I don’t know with AMP but in plain Asterisk the order of codec in the user section doesn’t matter. So you have g729 , gsm, and ulaw. Why it select ULAW is next question to ask. You may want to look on your Eyebeam codec order of preference. If there’s no problem, try the SIP log of your AMP and Eyebeam so you can tell why it keeps on using ULAW.

I have told Eyebeam to only use g729 and the issue remains.

This one really has many stumped.

are you sure the codec is installed ?

at the CLI type show translation … do you get translation times under g729 ?

Yes…

And when I do a show g729 I see that I have 2 licenses.

what happens if you only allow g729 ? is there anything in the log about non-negotation of codec ?

i installed 20 digium licences yesterday, and aside from restarting the system setup for g729 but before i had actually installed them and getting dead air, everything worked as expected.

only difference is that i was only using hard phones. your sip.conf and trunk settings don’t look too dissimilar to mine so it looks like an eyebeam problem ??

I agree… however my biggest issue is not the Eyebeam softphones.

My issue is that when I set all to only use G729, any incoming calls just ring and ring. And the output at the CLI is the error I listed first. Basically my digitial receptionist does not play the aa_1 file.

The output shows and immediate hangup.

ok, it’s not an issue with the actual codec file then is it ? it’s the right one for your platform and has the right permissions ?

Well the PC’s processor is the CeleronD 3.06Ghz. It basically the original P4. So… I downloaded the P4 file. I can get outbound to work using G729. Its just inbound that seems to have the issues.

So… I am by no means a guru on this but it outbound works is it safe to say I have the proper file and permissions?.