Please allow the user to create a custom PJSIP transport from FreePBX GUI, under Asterisk PJSIP settings, with custom port, external_media_address and external_signaling_address.
The transport must then be available for selection when creating a trunk from the GUI.
A transport different from the default one, with unique port and external signaling address is needed when e.g. having several trunks, each one going out a different WAN interface.
Igaetz has provided a solution using manual configuration of _custom.conf files in this thread: https://community.freepbx.org/t/custom-transport-in-pjsip-possible-from-gui/45812 but a GUI solution would be more elegant.