Trunk not registered

Hi, all.
I have two asterisk sever:

  1. old Asterisk 1.8.11-cert7 with white ip
  2. new Asterisk 1.8.10.1~dfsg-1ubuntu1 behind DMZ
    They are all managed freepbx 2.11

I made a backup settings on old sever and restored it on new.
It work well, but one trunk to voip provider don’t register.
As I see in http://pastebin.com/gakazXZq Asterisk don’t send register information to provider.

Why is this happening?

# cat /etc/asterisk/sip_general_custom.conf ..... externip=212.193.175.254 localnet=192.168.0.0/255.255.0.0 localnet=10.0.0.0/255.0.0.0

Peer details is

username=4959677745 secret=secret fromuser=4959677745 fromdomain=83.102.205.31 type=friend permit=83.102.205.31/255.255.255.255 insecure=port,invite host=83.102.205.31 disallow=all deny=0.0.0.0/0.0.0.0 context=from-trunk allow=alaw&ulaw nat=yes

Register string same, as on the old server

4959677745:[email protected]/4959677745

I tried to change type, host, nat, externip option but all the same register information don’t send to provider.

Not sure if asterisk is sensitive of the positioning of statements, but looking at your peer details, it looks like you permit an IP, then deny everything. Try the same config, but with the deny before the allow.