Nettoyage radical: Rollback complet de check-sync et AstDB. Seul maximum_expiration/default_expiration est conservé

This commit is contained in:
sorcier committed 2026-11-04 12:53:01 +01:00
1 parent 40e36e0423
commit e3f22e8e0b
4 files changed
-42

No files matched your search

-8
View File
@@ -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
-8
View File
@@ -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
-11
View File
@@ -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)";
-15
View File
@@ -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);