Asterisk PJSIP: How to force using domain name instead of IP address for TO Header

I have a SIP message sent by asterisk like this:

Via: SIP/2.0/TLS;branch=z9hG4bKd289b07ce2750aeb2fed3a94db29373e
Via: SIP/2.0/UDP;rport;branch=z9hG4bKPj697b6f22-49f0-4c31-bfd3-c7be3e3a44b7
From: <>;tag=dee4bce6-1bfe-42fc-8664-06a9fbc9c3fc
To: <sip:DEST@>
Contact: <sip:DEST@;transport=TLS>
Call-ID: e5bc8004-0514-42d5-9391-470bf90d02fe

For FROM header, i use the field from_domain into ps_endpoints table, but for To header i cannot see where to fix using domain name instead of the IP address.

Thank’s in advance