| Asterisk Support Forum Technical support, how-to guides, troubleshooting, and general assistance, from beginner to seasoned pro, this is where to discuss Asterisk, the most powerful open source PBX. |  | 
February 21st, 2006, 01:18 AM
| | Junior Member | | Join Date: Feb 2006 Location: Surprise, Arizona
Posts: 8
| | Weird Incoming Call issue - g729 First my setup- - My voip ISP is Telasip
- Asterisk Server is a 3Ghz P4 with 512MB ram
- I am running a fresh install of Asterisk@Home 2.5
- My Internet connection is 3Mb dn, 512kb up
- 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.
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. Code: -- 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: Code: 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: Code: 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: Code: [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: Code: [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: Code: ; 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. | 
February 27th, 2006, 11:07 PM
| | Senior Member | | Join Date: Dec 2004
Posts: 192
| | RE: Weird Incoming Call issue - g729 I think you meant you have 3MB down and 512k Up ;-) But anyway, I asked Digium (and you can too, since you bought the g729 codec) about what you're asking here. Don't forget, that g729 will only allow one "conversation" that's using the codec for one call. If you get a call waiting, or you get another call in, it won't "fail-over" to the non g729, well at least thats what they told me and from my tinkering, that's what I saw. It just will show silence, or it will give you congestion. What I've done was to purchase 4 licenses to use g729 for 4 total channels. I have two DIDs and so now I have enough for call waiting on each one of them. What I've also done was use another provider, because all my incoming calls are also routed to my cell phone (yup, yet another license so I wanted to change this so that all my licenss wern't used up with just one or two calls total) and myroommates calls are routed to his cell phone, I've used the second provider (and hence a second trunk) with no g729 compression (seems compression on a cell phone that the provider is already compressing sounds like crap) so, I have inbound to my * box (uses one g729), outbound to my cell (another provider, not using g729), if I also get call waiting, that will use up 2 licenses, if then my roommate gets a call (that's 3, plus his outbound call to his cell won't use one---but if he gets a call waiting at the same time, then I'll have used up all my incoming g729's (all four of them)... I hope this example of my setup can help, more than confuse you, because I know I didn't type it all out correctly. | 
February 28th, 2006, 03:54 AM
| | Junior Member | | Join Date: Feb 2006 Location: Surprise, Arizona
Posts: 8
| | Re: RE: Weird Incoming Call issue - g729 Quote: |
Originally Posted by isepic I think you meant you have 3MB down and 512k Up ;-) | Yes you are correct. Quote: |
Originally Posted by isepic I asked Digium (and you can too, since you bought the g729 codec) about what you're asking here. Don't forget, that g729 will only allow one "conversation" that's using the codec for one call. If you get a call waiting, or you get another call in, it won't "fail-over" to the non g729, well at least thats what they told me and from my tinkering, that's what I saw. It just will show silence, or it will give you congestion. | Ok.. I understand this. I would like to make all calls use G729 in and out. I would really rather not use ulaw or gsm to Telasip. Quote: |
Originally Posted by isepic What I've done was to purchase 4 licenses to use g729 for 4 total channels. I have two DIDs and so now I have enough for call waiting on each one of them. What I've also done was use another provider ....... I've used the second provider (and hence a second trunk) with no g729 compression ...... I hope this example of my setup can help, more than confuse you, because I know I didn't type it all out correctly. | I understand this as well. I have two licenses and I expect to be able to make/accept two simultaneous calls. No forwarding, no special setups. Just a softphone/sip phone receiving a call or calling out. My issues are:
1) If I set the system to only use g729. I can successfully make calls out. On both softphones, at the same time.
2) However I can not receive a call in at any time. If I disable the digital receptionist from answering the phone and set calls to goto an extension. In this case its my softphone, as soon as I answer with the softphone the call is hung up.
Something is not right in my extensions.conf of the logic of my incoming calls when related to g729. If do nothing else change the allow statement to ulaw (or remove the allow and disallow statements) from my trunk settings, all works again. | 
February 28th, 2006, 04:22 AM
| | Senior Member | | Join Date: Dec 2004
Posts: 192
| | RE: Re: RE: Weird Incoming Call issue - g729 I think its time you posted your log, one showing your call out, and one showing a test call coming in so we what's going on. What you have posted above is after the call is received. Would you please post more, from start to end each way.
Also, remove the &gsm part have only "allow=g729" and "disallow=all" so that you're using 100% g729
you can type "show g729" in the Asterisk CLI to see how many channels you're using.... type it several times during the outbound and inbound call setup sequence.
on my setup, if I put allow=gsm&ulaw and disallow=all it will ALWAYS connect with ulaw! If I put allow=g729 and don't have the "disallow=all" it will still connect at ulaw. So the logs you post up will be useful in showing what codec your system is using upon outgoing and incoming calls using telasip.
One thing to note, you may be using another license of g729 when the auto attendant is running, I don't know what you have for sound files, but anytime g729 is encoded/unencoded it uses up a license. So, if your soft phone is using g729, and I don't know, your sounds are encoded using it too I think it uses more licenses than you need to be. Especially if your incoming call isn't even being connected using g729 like you think it might be. | 
February 28th, 2006, 04:49 AM
| | Junior Member | | Join Date: Feb 2006 Location: Surprise, Arizona
Posts: 8
| | RE: Re: RE: Weird Incoming Call issue - g729 Thank you..
When you say logs are you speaking about the "/var/log/asterisk/full" file" ?
If so than here are the log files: Incoming call with g729 only Outbound call with g729 only Incoming call with Ulaw only
These log files are me performing a "amportal stop", deleting the current "full" and then restarting with a "amportal start". | 
March 1st, 2006, 12:49 AM
| | Senior Member | | Join Date: Dec 2004
Posts: 192
| | RE: Re: RE: Weird Incoming Call issue - g729 cwpippin,
I was hoping to see the logs with you issuing the command "show g729" several times during the test calls, and even once to voice mail.... entering that command should show you the gradual use of your g729 codecs in real time as you're using them up (if you are using them up that is).
This is an outgoing call from mine...
-- Executing Dial("SIP/200-5c42", "IAX2/NuFone/14087672676") in new stack
-- Called NuFone/14087672676
-- Call accepted by 66.225.202.72 (format ulaw)
-- Format for call is ulaw
-- IAX2/NuFone-1 is proceeding passing it to SIP/200-5c42
-- Hungup 'IAX2/NuFone-1'
As you can see it shows (ulaw) - if I change my trunk to (g729) and dissallow=all - it will then connect using g729.....
Here is what I cut and pasted from my putty session using sixtel and my g729...
-- Executing SetVar("SIP/200-bdcb", "OUTNUM=4087672676") in new stack
-- Executing Cut("SIP/200-bdcb", "custom=OUT_3|:|1") in new stack
-- Executing GotoIf("SIP/200-bdcb", "0?16") in new stack
-- Executing Dial("SIP/200-bdcb", "SIP/sixTel/4087672676") in new stack
-- Called sixTel/4087672676
-- SIP/sixTel-0d01 is making progress passing it to SIP/200-bdcb
== Parsing '/etc/asterisk/manager.conf': Found
== Parsing '/etc/asterisk/manager_custom.conf': Found
== Manager 'admin' logged on from 127.0.0.1
asterisk1*CLI> show g729
1/1 encoders/decoders of 4 licensed channels are currently in use
Here is using nufone (after I changed it from allow=g729&ulaw / dissallow=all to allow=g729 / disallow=all) ....
-- Executing SetVar("SIP/200-2727", "OUTNUM=14087672676") in new stack
-- Executing Cut("SIP/200-2727", "custom=OUT_4|:|1") in new stack
-- Executing GotoIf("SIP/200-2727", "0?16") in new stack
-- Executing Dial("SIP/200-2727", "IAX2/NuFone/14087672676") in new stack
-- Called NuFone/14087672676
-- Call accepted by 66.225.202.72 (format g729)
-- Format for call is g729
-- IAX2/NuFone-1 is proceeding passing it to SIP/200-2727
-- IAX2/NuFone-1 is making progress passing it to SIP/200-2727
-- IAX2/NuFone-1 answered SIP/200-2727
Now, if I change the codec on my phone to g729 (it is ulaw right now)... and do the same test....I get this..
2/2 encoders/decoders of 4 licensed channels are currently in use
So my point was, you may be using up your codes licenses... I know after I use them up, my calls are dropped, similar to yours. I just hope you have: allow=g729 and disallow=all in your trunk and type "show g729" while making a call progress and post up here similar to what I have above for further analysis. | 
March 1st, 2006, 08:57 AM
| | Member | | Join Date: Dec 2005
Posts: 39
| | Re: RE: Weird Incoming Call issue - g729 Quote: |
Originally Posted by isepic I think you meant you have 3MB down and 512k Up ;-) But anyway, I asked Digium (and you can too, since you bought the g729 codec) about what you're asking here. Don't forget, that g729 will only allow one "conversation" that's using the codec for one call. If you get a call waiting, or you get another call in, it won't "fail-over" to the non g729, well at least thats what they told me and from my tinkering, that's what I saw. It just will show silence, or it will give you congestion. What I've done was to purchase 4 licenses to use g729 for 4 total channels. I have two DIDs and so now I have enough for call waiting on each one of them. What I've also done was use another provider, because all my incoming calls are also routed to my cell phone (yup, yet another license so I wanted to change this so that all my licenss wern't used up with just one or two calls total) and myroommates calls are routed to his cell phone, I've used the second provider (and hence a second trunk) with no g729 compression (seems compression on a cell phone that the provider is already compressing sounds like crap) so, I have inbound to my * box (uses one g729), outbound to my cell (another provider, not using g729), if I also get call waiting, that will use up 2 licenses, if then my roommate gets a call (that's 3, plus his outbound call to his cell won't use one---but if he gets a call waiting at the same time, then I'll have used up all my incoming g729's (all four of them)... I hope this example of my setup can help, more than confuse you, because I know I didn't type it all out correctly. |
I know the Links for FREE g729 codec (No license for any SIP channel's
mail me langoo2006@yahoo.com | 
March 1st, 2006, 10:48 PM
| | Senior Member | | Join Date: Dec 2004
Posts: 192
| | RE: Re: RE: Weird Incoming Call issue - g729 langoo - interesting discussion on that here: http://www.voip-info.org/wiki-Asterisk+G.729+Licensing
Also cut from that is this Quote: |
"If your g729 C7960 calls someone, and the called party places the callee on hold with MOH, a total of *2* licenses will be necessary — 1 for the call and 1 for MOH; "
| So, yet another area that may be using up another channel or two of licenses. | 
March 6th, 2006, 08:10 AM
| | Junior Member | | Join Date: Feb 2006 Location: Surprise, Arizona
Posts: 8
| | Re: RE: Re: RE: Weird Incoming Call issue - g729 Quote: |
Originally Posted by isepic cwpippin,
I was hoping to see the logs with you issuing the command "show g729" several times during the test calls, and even once to voice mail.... entering that command should show you the gradual use of your g729 codecs in real time as you're using them up (if you are using them up that is).
So my point was, you may be using up your codes licenses... I know after I use them up, my calls are dropped, similar to yours. I just hope you have: allow=g729 and disallow=all in your trunk and type "show g729" while making a call progress and post up here similar to what I have above for further analysis. |
I will do so and post them up in the next couple of days. I have school tomorrow. Thanks again. |  | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | |