SIP2.0 UNATHORIZED - Extension won't register!

Hello everyone!
I am in a very wierd situation:
Asterisk 1.8 on Debian Squeeze Box + Freepbx 2.10
Here is some other useful information

Asterisk PBX is located in building A , on local subnet 1.X behind nat.
Phones are located in building B, on local subnet 2.x , also behind nat( so phones are remote extensions).
The phones are registering to the public IP of site A. The router than forwards packets to the asterisk box.

Everything was working until the pbx was accidentally restarted today…

On of the phones in building B is a grandstream gxp 2400 with 3 accounts. Their configuration is the following

[1000]
deny=0.0.0.0/0.0.0.0
secret=xxxxxx
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
trustrpid=yes
sendrpid=no
type=friend
nat=yes
port=5060
qualify=3000
qualifyfreq=60
transport=udp
encryption=no
callgroup=
pickupgroup=
dial=SIP/1000
mailbox=1000@device
permit=0.0.0.0/0.0.0.0
callerid=TONY - Lab Line 1 <1000>
callcounter=yes
faxdetect=no
cc_monitor_policy=generic

[3000]
deny=0.0.0.0/0.0.0.0
secret=xxxxxxx
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
trustrpid=yes
sendrpid=no
type=friend
nat=yes
port=5060
qualify=3000
qualifyfreq=60
transport=udp
encryption=no
callgroup=
pickupgroup=
dial=SIP/3000
mailbox=3000@device


[9000]
deny=0.0.0.0/0.0.0.0
secret=xxxxxxxxxxx
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
trustrpid=yes
sendrpid=no
type=friend
nat=yes
port=5060
qualify=3000
qualifyfreq=60
transport=udp
encryption=no
callgroup=
pickupgroup=
dial=SIP/9000
mailbox=9000@device

`
The thing is that only extensions 1000 and 3000 register. On extension 9000 i get the following

<--- SIP read from UDP:95.254.61.248:5064 --->
REGISTER sip:95.231.94.6 SIP/2.0
Via: SIP/2.0/UDP 192.168.2.190:5064;branch=z9hG4bK1465057793;rport
From: <sip:[email protected]>;tag=1463926135
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 2084 REGISTER
Contact: <sip:[email protected]:5064>;reg-id=3;+sip.instance="<urn:uuid:00000000-0000-1000-8000-000B8251202A>"
X-Grandstream-PBX: true
Max-Forwards: 70
User-Agent: Grandstream GXP2100 1.0.5.23
Supported: path
Expires: 3600
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

<------------->
--- (14 headers 0 lines) ---
Sending to 95.254.61.248:5064 (NAT)

<--- Transmitting (NAT) to 95.254.61.248:5064 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.2.190:5064;branch=z9hG4bK1465057793;received=95.254.61.248;rport=5064
From: <sip:[email protected]>;tag=1463926135
To: <sip:[email protected]>;tag=as3e9e9bb9
Call-ID: [email protected]
CSeq: 2084 REGISTER
Server: FPBX-2.10.1(1.8.21.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer

The extensions have pretty much identical configurations, so what do you think is the cause of this problem?
Thank you for your kind support and help!

Your Contact address does not match your from address - are you trying to configure this phone for the wild - off-network? It looks to me like your firewall is getting in the way of a phone on the LAN trying to register to the WAN interface and loop back.

Have you set up the local LAN field in FreePBX to accomodate the 192.168.2.x subnet as local?

I forgot to mention some details

PBX is on site A on subnet 1.X
Phones are on site B (so remote extension) on subnet 2.X

Ok - but are these VPN’d subnets - in other words, is there a direct route between subnet a and subnet b - put another way, can a host at 192.168.2.x talk directly to a machine on 192.168.3.x without going through an outside address and being translated?

Both sites are natted
Sorry for not having it included!
Anyways I have updated the post so that the scenario is clearer!
Thank you