Please refer to the wiki Getting Around Blocked or Filtered VoIP Network.
Need detailed guide.
Address resolution: https://github.com/pjsip/pjproject/issues/1926
DNS SRV resolution: https://github.com/pjsip/pjproject/issues/1927
IP address change
Please see the wiki Handling IP Address Change. Note that the guide is written using PJSUA API as a reference.