Asterisk server is on a remote box on public IP, not behind a NAT, dedicated RackSpace server. Straight Asterisk v1.2.11 installation on Red Hat Linux Enterprise.
I dial up to my * using X-Lite v2 from my private PC which sits behind a wireless Linksys WRT54G router connected to cable modem on static IP. Using SIP.
All ports on the * server are open, no firewall(for now). I have my router set with ports 5060 and 8000-8005 open to my private IP. I have also tried with DMZ open.
Here’s the problem. If I connect the PC straight to the modem, everything dials ok and I get sound etc… But connected to the Router, the PC dials but there’s no sound.
I hear this is a NAT issue but I have configured everything accordingly with all the info I have read. Still no solution after 2 weeks. I’m hopeing someone else has experience with this problem and can help. Please.
I know what I’m doing, just ask me what info you need and I can provide. Possibly even supply you with access. I will pay for a solution.
Can you post the relevant portions of your sip.conf for us to see? When you define your x-lite extension in sip.conf, make sure that you have nat=yes and canreinvite=no. Also, have you watched the CLI to see what it is doing during a “successful” call vs an unsuccessful call? If so, can you post the output from that too?
Ok. Setting nat=yes makes X-Lite not dial in at all, no activity at the CLI. I have to set it to nat=no in order to see anything working. And remember, it does work connected straight to modem, without router. But with router, I have DMZ disabled and port 5060,8000-8005 open to my local private IP.
sip.conf
[general]
port=5060
context=demo
bindport=5060
bindaddr=xx.x.240.70
srvlookup=yes
externip = xx.xx.240.70
localnet=xx.xx.240.70/255.255.255.192
[042100]
type=friend
secret=ready
username=042100
host=dynamic
disallow=all
allow=ulaw
allow=alaw
allow=gsm
context=demo
nat=no
canreinvite=yes
dtmfmode=rfc2833
qualify=yes
CLI successful call(no sound):
– Executing Goto(“SIP/042100-0840c8b0”, “default|s|1”) in new stack
– Goto (default,s,1)
– Executing Wait(“SIP/042100-0840c8b0”, “1”) in new stack
– Executing Answer(“SIP/042100-0840c8b0”, “”) in new stack
– Executing Set(“SIP/042100-0840c8b0”, “TIMEOUT(digit)=5”) in new stack
– Digit timeout set to 5
– Executing Set(“SIP/042100-0840c8b0”, “TIMEOUT(response)=10”) in new stack
– Response timeout set to 10
– Executing BackGround(“SIP/042100-0840c8b0”, “demo-congrats”) in new stack
– Playing ‘demo-congrats’ (language ‘en’)
What else do you need?
Here is a look at my sip.conf that works, in the same situation as what you are in. It is in a dedicated space but I am using a firewall to keep everything out EXCEPT for the ones necessary for Asterisk to function properly.
I include a separate file to keep my account registration separate from my soft-phone extensions. I also use x-lite for my softphone. If you have your Asterisk server on a public IP, you do not need to have the ports routed at any remote location to connect. As long as it can be seen from the public side, you should be able to connect from anywhere.
<-- begin sip.conf
#include <external_extensions_file.conf>
[general]
context=default
bindport=5060
bindaddr=x.x.x.x (you can test with 0.0.0.0 to allow it to bind to any address)
srvlookup=yes
register =>
[authentication]
auth=
[sphone_account]
type = friend
authname =
secret =
host = <sphone_host>
username =
fromuser =
fromdomain = <sphone_host>
insecure = very
port = 5061
dtmfmode = rfc2833
context = default
canreinvite = no
disallow=all
allow=alaw
allow=ulaw
allow=gsm
end sip.conf -->
Here is one of my entries in the external sphone accounts file that I mentioned previously. This should give you some indication of how I have mine setup.
<-- begin sphone accounts.conf
[3389]
type=friend
port=5060
host=dynamic
context=incoming
qualify=no
callerid=
dtmfmode=rfc2833
nat=yes
secret=
disallow=all
allow=gsm
allow=ulaw
allow=alaw
mailbox=3389 (I have it tied to voicemail.conf)
end sphone accounts.conf -->
Hope this helps a bit. Let me know if you need more specific help. If you are still not getting any sound after doing this, you might need to check to be sure that your ztdummy module is loaded by typing “lsmod”. If it is not there, type “modprobe ztdummy” and then restart the asterisk service.
bindaddr should always be 0.0.0.0 . It tells * which IP of your machine to listen on, 0.0.0.0 is all of them.
OK here is what makes mine and many others work
once you have the router back in play.
Grab Express talk nch.com.au/talk/index.html I have found it just works when xlite is just flaky…
nat=yes
externip=[your static ip of the asterisk box]
localnet=[the lan IP Range your sip devices are on] /255.255.255.0
externrefresh=10
The ports are UDP not TCP and sip device would need a port of it’s own, look under settings network in Express talk…
externip should be the static IP of your NETWORK, not the box. (assuming nat that is). AKA, your router’s WAN IP. NOT the static IP on your local network, ie 192.168.
modprobe ztdummy
FATAL: Module ztdummy not found.
Can I install Zaptel ztdummy AFTER installing Asterisk? Or will I have to reinstall Asterisk afterwards?