In FreePBX there is the NAT setting for each extension, but also global under Asterisk SIP Settings. What are these two attitudes to each other? In the trunk, NAT can be defined also. Can NAT be deactivated in the global settings and enabled in the trunk?
My FreePBX is behind a router and thus behind NAT. The phones are in the same network as the FreePBX and thus they do not need NAT. Therefore I assume NAT in the global setting should be true and on the extensions false.
But I was confused by the following comment from the sip.conf. He seems to say that if the global option NAT is turned on, it also has to be switched on for the extensions NAT and vice versa. Otherwise it could be a security problem.
IT IS IMPORTANT TO NOTE that if the nat setting in the general section differs from
; the nat setting in a peer definition, then the peer username will be discoverable
; by outside parties as Asterisk will respond to different ports for defined and
; undefined peers. For this reason it is recommended to ONLY DEFINE NAT SETTINGS IN THE
; GENERAL SECTION. Specifically, if nat=force_rport in one section and nat=no in the
; other, then valid peers with settings differing from those in the general section will
; be discoverable.