I’m using asterisk 13.11.2/PJSIP on a consumer DSL line that gets disconnected from the ISP’s side every 24 hours. When that happens, a number of things occur:
- My IP address changes
- DNS may return a different IP address for my ITSP’s SIP server via SRV record.
- All outbound registrations need to be renewed, otherwise I get a ‘401 unauthorized’ response from their SIP server when trying to place an outbound call prior to the corresponding registration being renewed.
Performing a ‘module reload res_pjsip.so’ seems to accomplish the task of updating the changed IP addresses, when I have the transport configured with ‘allow_reload = yes’. But I could not find a way to tell asterisk to force a renew of all outbound registrations, other than performing a full restart of asterisk. There is the ‘pjsip send register’ command, but unfortunately it does not allow to specify something like ‘all’, so I would need to do this for each outbound registration separately. Is there another way to force an immediate refresh of all configured outbound registrations?