From e3f22e8e0b5dddbd484321f08e0e2facad0b46fe Mon Sep 17 00:00:00 2001 From: sorcier Date: Wed, 4 Nov 2026 12:53:01 +0100 Subject: [PATCH] =?UTF-8?q?Nettoyage=20radical:=20Rollback=20complet=20de?= =?UTF-8?q?=20check-sync=20et=20AstDB.=20Seul=20maximum=5Fexpiration/defau?= =?UTF-8?q?lt=5Fexpiration=20est=20conserv=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 8 -------- scripts/fix.sh | 8 -------- src/ConfigGenerator.php | 11 ----------- src/SystemChecker.php | 15 --------------- 4 files changed, 42 deletions(-) diff --git a/install.sh b/install.sh index ddead27..11aa02e 100755 --- a/install.sh +++ b/install.sh @@ -285,8 +285,6 @@ chmod 0640 /etc/asterisk/keys/* 2>/dev/null || true # Inclusions custom dans Asterisk & initialisation des fichiers cibles touch /etc/asterisk/pjsip.conf \ /etc/asterisk/pjsip.custom.conf \ - /etc/asterisk/pjsip_notify.conf \ - /etc/asterisk/pjsip_notify.custom.conf \ /etc/asterisk/extensions.conf \ /etc/asterisk/extensions.custom.conf \ /etc/asterisk/musiconhold.conf \ @@ -310,12 +308,6 @@ fi if ! grep -q 'pjsip.custom.conf' /etc/asterisk/pjsip.conf 2>/dev/null; then printf '\n#tryinclude "pjsip.custom.conf"\n' >> /etc/asterisk/pjsip.conf fi -if ! grep -q 'pjsip_notify.custom.conf' /etc/asterisk/pjsip_notify.conf 2>/dev/null; then - printf '\n#tryinclude "pjsip_notify.custom.conf"\n' >> /etc/asterisk/pjsip_notify.conf -fi -if [ ! -s /etc/asterisk/pjsip_notify.custom.conf ]; then - printf '[check-sync]\nEvent=>check-sync\\;reboot=false\n\n[resync]\nEvent=>check-sync\\;reboot=false\n' > /etc/asterisk/pjsip_notify.custom.conf -fi if ! grep -q 'extensions.custom.conf' /etc/asterisk/extensions.conf 2>/dev/null; then printf '\n#tryinclude "extensions.custom.conf"\n' >> /etc/asterisk/extensions.conf fi diff --git a/scripts/fix.sh b/scripts/fix.sh index 6e1a870..0e1a3dd 100755 --- a/scripts/fix.sh +++ b/scripts/fix.sh @@ -63,8 +63,6 @@ chmod 2775 /var/www/nexus-pbx/storage /var/www/nexus-pbx/storage/backups /var/ww touch /etc/asterisk/pjsip.conf \ /etc/asterisk/pjsip.custom.conf \ - /etc/asterisk/pjsip_notify.conf \ - /etc/asterisk/pjsip_notify.custom.conf \ /etc/asterisk/extensions.conf \ /etc/asterisk/extensions.custom.conf \ /etc/asterisk/musiconhold.conf \ @@ -88,12 +86,6 @@ fi if ! grep -q 'pjsip.custom.conf' /etc/asterisk/pjsip.conf 2>/dev/null; then printf '\n#tryinclude "pjsip.custom.conf"\n' >> /etc/asterisk/pjsip.conf fi -if ! grep -q 'pjsip_notify.custom.conf' /etc/asterisk/pjsip_notify.conf 2>/dev/null; then - printf '\n#tryinclude "pjsip_notify.custom.conf"\n' >> /etc/asterisk/pjsip_notify.conf -fi -if [ ! -s /etc/asterisk/pjsip_notify.custom.conf ]; then - printf '[check-sync]\nEvent=>check-sync\\;reboot=false\n\n[resync]\nEvent=>check-sync\\;reboot=false\n' > /etc/asterisk/pjsip_notify.custom.conf -fi if ! grep -q 'extensions.custom.conf' /etc/asterisk/extensions.conf 2>/dev/null; then printf '\n#tryinclude "extensions.custom.conf"\n' >> /etc/asterisk/extensions.conf fi diff --git a/src/ConfigGenerator.php b/src/ConfigGenerator.php index ab95097..055f8e2 100644 --- a/src/ConfigGenerator.php +++ b/src/ConfigGenerator.php @@ -178,17 +178,6 @@ class ConfigGenerator $lines[] = "allow_reload = no"; $lines[] = ""; - $lines[] = "; --- CONFIGURATION GLOBALE & POINT DE SORTIE PAR DÉFAUT (NOTIFY / RESYNC) ---"; - $lines[] = "[global]"; - $lines[] = "type = global"; - $lines[] = "default_outbound_endpoint = default_outbound_endpoint"; - $lines[] = ""; - $lines[] = "[default_outbound_endpoint]"; - $lines[] = "type = endpoint"; - $lines[] = "context = from-internal"; - $lines[] = "transport = transport-udp"; - $lines[] = ""; - // 3. Extensions (Postes téléphoniques hybrides UDP vs TLS+SRTP) $lines[] = "; ==========================================================================="; $lines[] = "; POSTES TÉLÉPHONIQUES (EXTENSIONS)"; diff --git a/src/SystemChecker.php b/src/SystemChecker.php index 134a2d0..2f6f2c1 100644 --- a/src/SystemChecker.php +++ b/src/SystemChecker.php @@ -174,21 +174,6 @@ class SystemChecker } } - $notifyConf = '/etc/asterisk/pjsip_notify.conf'; - if (is_file($notifyConf) && is_writable($notifyConf)) { - $content = (string)file_get_contents($notifyConf); - if (!str_contains($content, 'pjsip_notify.custom.conf')) { - file_put_contents($notifyConf, rtrim($content) . "\n\n#tryinclude \"pjsip_notify.custom.conf\"\n"); - } - } - $customNotify = '/etc/asterisk/pjsip_notify.custom.conf'; - if (!file_exists($customNotify)) { - @file_put_contents($customNotify, "[check-sync]\nEvent=>check-sync\\;reboot=false\n\n[resync]\nEvent=>check-sync\\;reboot=false\n"); - @chown($customNotify, 'asterisk'); - @chgrp($customNotify, 'asterisk'); - @chmod($customNotify, 0664); - } - $extConf = '/etc/asterisk/extensions.conf'; if (is_file($extConf) && is_writable($extConf)) { $content = (string)file_get_contents($extConf);