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.