Can't register SIP phone to Asterisk server (under NAT)

Hi!

I try to register a SIP phone (softphone Zoiper) to a remote Asterisk server. I have read many articles about the subject, but I can’t make it work (the phones are always marked as “Not registered” in Zoiper, in the local network I can register the phones successfully)… I really would appreciate some help!!!

I added the following code the file sip.conf under the section [general]:

externip=123.123.123.123 ; of course I have put the right IP address ; I also tried [i]externaddr[/i] instead localnet=192.168.1.0/255.255.255.0 nat=yes qualify=yes

In the file rtp.conf :

rtpstart=10002 rtpend=19999

In the configuration of my router, I tried every possible thing:
Firewall
Minimum Security
Inbound Policy: Accept.
Outbound Policy: Accept.
----
DMZ Host IP Address: 192.168.1.11 (my local IP address)
----
Port Triggering
Protocol Outgoing Trigger Ports Incoming Ports to Open
Asterisk(1) UDP 5060 -> 5060 UDP 5060 -> 5060
Asterisk(2) UDP 10001-20000 -> 10001-20000 UDP 10001-20000 -> 10001-20000
Asterisk(3) UDP 4569 -> 4569 UDP 4569 -> 4569
----
LAN servers
Name | Activated | Protocol | Public start port | Public end port | LAN start port | Local IP Address
Asterisk(1) Yes UDP 5060 5060 5060 192.168.1.11
Asterisk(2) Yes UDP 10001 20000 10001 192.168.1.11
Asterisk(3) Yes UDP 4569 4569 4569 192.168.1.11
----
Telephone (some service of my ISP, not sure I had to tweak this but added my asterisk server just to try)
Gateway configuration
Interface : eth1.20
SIP domain (leave blank to use default) : 192.168.1.11
Port : 5060
Transport : UDP
Proxy Server
Proxy address : 192.168.1.11
Port : 5060
Transport : UDP
Registrar / SIP domain
Registrar address : 192.168.1.11
Port : 5060
Transport : UDP

PS:
I have 10.7.1 version of Asterisk, running on Ubuntu 12.04.1 LTS
Ubuntu has no firewall installed, I can access it through Teamviewer and Vino (desktop sharing), so the machine is definitely accessible.
My ISP is Belgaom (belgian)
Registering phones locally work

Here is the whole sip.conf file:

[code][general]
context=unauthenticated
allowguest=no
srvlookup=yes
udpbindaddr=0.0.0.0
tcpenable=no
externaddr=109.126.133.64
; fromdomain=my-host.no-ip.org
; externhost=my-host.no-ip.org
; externrefresh=120
localnet=192.168.1.0/255.255.255.0
nat=yes
qualify=yes

office-phone
type=friend
context=LocalSets
host=dynamic
secret=mypwd
dtmfmode=auto
disallow=all
allow=ulaw
allow=alaw
nat=yes

laptop-asus-f3sc[/code]

What is the Asterisk CLI output when you are trying to register your softphone to it? Make sure the verbosity is atleast 3.

Also do a “sip set debug on” and copy/paste the output here?

[quote=“dejanst”]What is the Asterisk CLI output when you are trying to register your softphone to it? Make sure the verbosity is atleast 3.
Also do a “sip set debug on” and copy/paste the output here?[/quote]
There is no output at all when I try to register the phone, verbose is set to 3, and sip debug is on…
I also tried a “sudo ngrep -d eth0 port 5060”, I don’t see any log coming on the console when I try to register the phone. I tried to open everything that’s possible on the router… any idea what I can still try?

Seems a problem with the portforwarding.
Can you try if the server is reachable through ssh? (enable sshd and portforward port 22 tcp)

I don’t think that Belgacom blocks port 5060 but I’m not sure.

I tried with a custom port 5064, and now it’s working!

Now the next problem is that I cannot send input from dialpad (locally it works though).
So I mean that my IVR asks which language the user wants to use, 1 for French, 2 for Dutch, etc.
It’s a simple Read()
I checked logs with “asterisk -rvvvvv”, but I can’t see anything interesing:


– <SIP/laptop-mett-asus-f3sc-00000005> Playing ‘select-language.slin’ (language ‘en’)
– User disconnected