[Solved] Sip Error

I have set up a menu for an incomming did and I am getting an error with it. The thing I don’t get is if I call it from within the system, it works perfectly, I just get the issue when I try to call in externally. First my extension.conf and then the error:


[inbound]
exten => 18638770128,1,Goto(mainmenu,s,1)

[mainmenu]
exten => s,1,Answer()
exten => s,n,WaitExten()

exten => 999,1,wait(2)
exten => 999,n,Playback(/var/spool/asterisk/voicemail/default/123/unavail)
exten => 999,n,Goto(mainmenu,s,1)

exten => 888,1,wait(2)
exten => 888,n,Playback(/var/spool/asterisk/voicemail/default/456/unavail)
exten => 888,n,Goto(mainmenu,s,1)


the error from cli when I call in:


== Using SIP RTP CoS mark 5
– Executing [18638770128@inbound:1] Goto(“SIP/flowroute-00000054”, “mainmenu,s,1”) in new stack
– Goto (mainmenu,s,1)
– Executing [s@mainmenu:1] Answer(“SIP/flowroute-00000054”, “”) in new stack
– Executing [s@mainmenu:2] WaitExten(“SIP/flowroute-00000054”, “”) in new stack
[May 15 15:43:57] WARNING[29327]: pbx.c:10004 pbx_builtin_waitexten: Timeout but no rule ‘t’ or ‘e’ in context ‘mainmenu’
== Spawn extension (mainmenu, s, 2) exited non-zero on ‘SIP/flowroute-00000054’


Not sure what the deal is.

DTMF not being recognized, e.g. wrong dtmfmode setting.

My DTMF info was given to me by my sip provider Flowroute. It is currently set to “dtmfmode=rfc2833”. What should this be?

*edit: I also just finished changing it to auto and inband and got the same error. I’m also calling from a cellphone if it matters.

*another edit: I setup a simple playback for when I call in on the external phone number and I could’t hear a thing when I called in. It looks like everything went great in the CLI (no error), I just didn’t get any audio. I can hear it fine when I call from within the system. Not sure if the two issues are related. It looks like for whatever reason there is some communication gap, not getting the ext. input from my phone and not getting audio.

After reading what I could find, could this be an iptables or NAT issue (not really sure what NAT is though)

Here is my sip.conf if it helps


[general]
port-5060
bindaddr=0.0.0.0
allow=ulaw
allow=g729

register => XXXXXXXXXXXXX@sip.flowroute.com

Add the following near the bottom of sip.conf
[flowroute] ;keep this lowercase, do not change format
type=friend
secret=XXXXXXXXXXXX
username=XXXXXXXXX
host=sip.flowroute.com
dtmfmode=rfc2833
context=inbound ;change to ‘ext-did’ or ‘from-trunk’ for asterisk@home
canreinvite=no
allow=ulaw
allow=g729
insecure=port,invite
fromdomain=sip.flowroute.com

After more testing/reading this is where I’m at. I can call out of my system on my outbound and connect with my cellphone and talk and get audio both ways, works great. It appears my problem is just coming into the system. When I route my did to an extension and call the did from my cell, I can answer at the extension, but I get no audio either way. And the same thing when I route my did to a recording, no audio. And also, when I route it to a WaitExten(), when I enter a valid extension, nothing happens, it eventually times out.

iptables is stopped.

I am completely stuck on this, I can’t find anything useful from google.

Any help is greatly appreciated!!

Thanks!

Firewall or NAT problem. It appears that your RTP is being misrouted or blocked by the firewall.

Thanks for the reply, I checked my rtp.conf and it has:
[general]
rtpstart=10000
rtpend=20000

Do I need to make a change to this file?

Insufficient information.

The fact that you get both way audio on outgoing calls suggests that there is not a lot wrong, but possibly that the firewall is trying to dynamically open ports, but fails to identify the ones to open from the incoming calls.

It doesn’t matter what your port range is, as long as it isn’t too small, and everything that needs to agree on it agrees on the same range or a larger one that includes it.

If you have NAT, you will either have to tell the NAT device to forward the whole range to your Asterisk server, or the NAT device will have to correctly deduce what needs forwarding.