I’m registering to my ITSP (Callcentric) using Asterisk 13.18 and PJSIP. Sometimes my ISP goes down at night and eventually, Asterisk will stop sending register request.
The default max_retries=10 and retry_interval=60 in my outbound registration config file, so after 10 minutes asterisk do not try to register anymore and when my internet connection is back my trunk is down.
If I set the max_retries=0 will asterisk retry forever to register?
Unfortunately, max_retries=0 is not working, Asterisk will stop trying to register.
The only way I have found to register after a network downtime is by monitoring the network with Monit and then start a script to force an outbound registration once the network is back. Tested and working.
My Monit file:
#check host google.com with address google.com
if failed icmp type echo
count 3 with timeout 5 seconds
4 times within 10 cycles
then alert
ELSE IF succeeded THEN EXEC "/home/register_callcentric.sh"
alert myemail@gmail.com
I’m trying :
registration/auth_rejection_permanent = no
I think setting max_retries = 0 causes retries unless there’s a reject from the server. For some reason, callcentric rejects registration authorization every once in a while. Setting auth_rejection_permanent has been working for me for 3 days. We’ll see if it lasts.