feat(cluster): add voicemail & fail2ban sync and automatic failback re-sync reconciliation
This commit is contained in:
1 parent
54fc495fa7
commit
d1d42f75b5
5 files changed
+270
-1
No files matched your search
@@ -10,7 +10,14 @@ TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S')
|
||||
|
||||
echo "[$TIMESTAMP] [CLUSTER] >>> Transition vers l'état MASTER (VIP active) <<<" >> "$LOG_FILE"
|
||||
|
||||
# 0. Ouverture immédiate des ports SIP entrants sur le nouveau MASTER (levée d'isolation)
|
||||
# 0. Réconciliation préalable au Failback : si le pair était actif et a des modifications plus récentes,
|
||||
# récupérer sa réplication AVANT d'ouvrir les flux SIP et de servir le trafic !
|
||||
if [ -f "/var/www/nexus-pbx/scripts/nexus_cluster_sync.php" ]; then
|
||||
echo "[$TIMESTAMP] [CLUSTER] Vérification réconciliation failback avec le pair..." >> "$LOG_FILE"
|
||||
php /var/www/nexus-pbx/scripts/nexus_cluster_sync.php --failback-check >> "$LOG_FILE" 2>&1 || true
|
||||
fi
|
||||
|
||||
# 1. Ouverture immédiate des ports SIP entrants sur le nouveau MASTER (levée d'isolation)
|
||||
iptables -D INPUT -p udp -m multiport --dports 5060,5061 -j REJECT --reject-with icmp-port-unreachable 2>/dev/null || true
|
||||
iptables -D INPUT -p tcp -m multiport --dports 5060,5061 -j REJECT --reject-with tcp-reset 2>/dev/null || true
|
||||
|
||||
|
||||
Reference in new issue
Block a user