On a recent FreePBX, you can use a domain name in Asterisk SIP Settings → External Address. According to
it was implemented in 2018.