Phones Cant Register Error Code 403

HI
I Cant Register on Asterisk server (10.1.1.3) from internet.
I get 403 Forbidden
Though i can register on local lan

i have forwarded ankycooper.com to my router (dynamic DNS It works well)
now on the router (10.1.1.1) i have fwd port 5060, 10000-20000 (TCP & UDP) to 10.1.1.3

My sip.conf is as follows

[general]
context=default         ; Default context for incoming calls
allowoverlap=no         ; Disable overlap dialing support. (Default is yes)
bindport=5060           ; UDP Port to bind to (SIP standard port is 5060)
                                 ; bindport is the local UDP port that Asterisk will
                                 ; listen on
bindaddr=0.0.0.0        ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes           ; Enable DNS SRV lookups on outbound calls
                                 ; Note: Asterisk only uses the first host
                                  ; in SRV records
                                  ; Disabling DNS SRV lookups disables the
                                 ; ability to place SIP calls based on domain
                                    ; names to some other SIP users on the Internet
canreinvite=no
dtmfmode = rfc2833
externip =ankycooper.com
externhost=ankycooper.com
fromdomain=ankycooper.com
externrefresh = 5
localnet =10.1.1.0/255.255.255.0
qualify=yes

Also every user has nat=yes and qualify=yes

Please Help

Hi

When you say from the internet do you mean a device with a real public adress or behind nat?

Ian

That device is also behind a nat
tries to register on ankycooper.com

Can Anyone Help me Plz

Hi

So we are double natting. If you want to do this you realy need to have a real external IP on the asterisk server.

Ian

I thought you needed an IP for externip, not a URL?
if you have a site created through dydns.org to do the dns forwarding then it should work, I do that with my system. Do you have the options for the extensions in sip.conf, nat=yes?

Hi

HAve a look at fridu.org/content/view/29/55/ may go someway to solving the problem

Ian

Exact the same problem.

Using: Asterisk 1.4.21.2

Inside the LAN -> No problems
From outside -> auth denied

Client: Behind NAT, but according to STUN there should be no problems (I am able to connect to other SIP providers)

Server: Behind NAT, but I forwarded udp 5060, 10000-2000 to the servers IP

sip.conf
pastebin.ca/1240139

Extensions:
nat = yes

On an asterisk of my friend (exact same setup) it works, he is using the 1.4.18.1 version (I tried his sip.conf, but it did not work for me)

I know it works, because there was one version (I tried 1.6, 1.6.1) which worked :smiley:

And ports are being forwarded correctly, as I can see the register attempt on servers sideā€¦