When authentication times out that is one thing, but when it just fails like below Asterisk by default will not re-register until you the admin reload the sip or asterisk server:
voipserver*CLI> sip show registry
Host dnsmgr Username Refresh State Reg.Time
remote.voipservice.com:5060 N 151113 105 No Authentication Sat, 25 Apr 2020 11:20:08
1 SIP registrations.
Now reload and it will re-register
voipserver*CLI> sip reload
voipserver*CLI> sip show registry
Host dnsmgr Username Refresh State Reg.Time
remote.voipservice.com:5060 N 151113 105 Registered Sat, 25 Apr 2020 12:22:09
1 SIP registrations.
How do we fix this so it retries when authentication fails?
under /etc/asterisk/sip.conf where you have your trunk peer add this:
register_retry_403=yes
Then restart asterisk or reload it and the above setting should sort it out and make Asterisk keep retrying
Note that the setting registerattempts=0 (which is unlimited retries) does not fix the problem shown above, but only register_retry_403=yes fixes it.
asterisk, retry, authentication, failswhen, fails, default, register, admin, reload, sip, server, voipserver, cli, registry, dnsmgr, username, refresh, reg, voipservice, apr, registrations, registered, retries, etc, conf, peer, register_retry_, restart, retrying, registerattempts, unlimited, fixes,