Once I installed the Zoiper application on the iPhone to connect to the telephony server and found an error:
Registration failed due to STUN server (DNS resolving or connection) error (59)
At first I thought the problem was with DNS and indicated the IP address instead of the domain, but the error repeated, sometimes the SIP registration was successful, but for a very long time.
To solve this problem, I disabled STUN, right in the SIP number settings, by opening “Network settings” below and unchecking “Enable STUN”.
After that, the SIP registration was successful and instant.
See also my article:
Installing Asterisk on Ubuntu