Trunk not registered

Hi, all.
I have two asterisk sever:

  1. old Asterisk 1.8.11-cert7 with white ip
  2. new Asterisk 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 Asterisk don’t send register information to provider.

Why is this happening?

# cat /etc/asterisk/sip_general_custom.conf ..... externip= localnet= localnet=

Peer details is

username=4959677745 secret=secret fromuser=4959677745 fromdomain= type=friend permit= insecure=port,invite host= disallow=all deny= 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.