From 969fc7c21dc7fa85dcc516aedf8e816ee8bc8bd6 Mon Sep 17 00:00:00 2001 From: Stonewall Jackson Date: Mon, 6 Feb 2023 20:31:20 -0500 Subject: set max_retries to UINT32_MAX for asterisk registrations After a brief internet outage, I noticed that asterisk had given up trying to reconnect to my upstream SIP server (looks like the default value of max_retries is 10). Although the asterisk "registration" object was disconnected, the "endpoint" object still reported being up, so the check_asterisk_endpoints nagios plugin did not alert me to the problem. This commit sets max_retries to UNIT32_MAX for asterisk registrations by default. It also adds a new nagios plugin, check_asterisk_registrations. Unfortunately, the ARI does not expose registrations via the REST API, so I had to write a hacky bash script to parse the asterisk CLI output. --- .../templates/etc/asterisk/pjsip_wizard.conf.j2 | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'roles/asterisk/templates') diff --git a/roles/asterisk/templates/etc/asterisk/pjsip_wizard.conf.j2 b/roles/asterisk/templates/etc/asterisk/pjsip_wizard.conf.j2 index 67a6574..4a6d800 100644 --- a/roles/asterisk/templates/etc/asterisk/pjsip_wizard.conf.j2 +++ b/roles/asterisk/templates/etc/asterisk/pjsip_wizard.conf.j2 @@ -3,15 +3,17 @@ ;;;;;;;;;;; [trunk-defaults](!) -type = wizard -sends_auth = yes -sends_registrations = yes -endpoint/rtp_symmetric = yes -endpoint/rewrite_contact = yes -endpoint/send_rpid = yes -endpoint/from_domain = {{ asterisk_from_domain }} -endpoint/allow = !all,ulaw -aor/qualify_frequency = 30 +type = wizard +sends_auth = yes +sends_registrations = yes +endpoint/rtp_symmetric = yes +endpoint/rewrite_contact = yes +endpoint/send_rpid = yes +endpoint/from_domain = {{ asterisk_from_domain }} +endpoint/allow = !all,ulaw +registration/max_retries = 4294967295 +registration/auth_rejection_permanent = no +aor/qualify_frequency = 30 {% for trunk in asterisk_sip_trunks %} [{{ trunk.name }}](trunk-defaults) -- cgit