I have a SIP with a Public IP trunk, had a lot of problems had to change the firewall brand and included on the sip.conf
nat=yes
externip=MyexternalPublicIP
localhost=MyasteriskServierIP
directmedia=no
fromdomain=sipproviderdomain
localnet=172.18.220.0/255.255.255.0
All this fixed the problem, but now have another issue I also have a VPN with a branch an Asterisk is answering with the PublicIP which is not available from the VPN local network, so what I need is for network to answer with the Public IP and and on the VPN domain with the private IP. I tried setting nat on the trunks but it does not work.