PBX
PBX — High Availability (HA) Setup and Failover
Overview
The SipLive PBX supports active/passive high availability with two nodes (ha1 and ha2). If the primary node fails, the secondary takes over the service IP within seconds, maintaining uninterrupted phone service.
Architecture
- Active node (ha1) — Handles all calls and web traffic.
- Passive node (ha2) — Stays in standby, continuously synchronized.
- Service VIP — A virtual IP that floats between nodes. SIP clients and carriers always use this IP.
- Database replication — MariaDB is replicated between nodes; PJSIP config is always current on both.
- Filesystem sync — Voicemail, recordings, and config files replicated via DRBD or rsync.
Failover Process
- Cluster monitoring (Corosync/Pacemaker or keepalived) detects ha1 is unreachable.
- ha2 promotes itself to active.
- The service VIP is brought up on ha2's NIC.
- Asterisk starts on ha2.
- SIP carriers detect the change via OPTIONS polling or re-registration and resume sending calls.
Note: Active calls at the moment of failover are dropped — this is expected in active/passive HA.
Health Checks
Monitor HA health in System → HA Status:
- Sync status — Both nodes should show "in-sync".
- Active node — Confirms which node holds the VIP.
- Replication lag — Should be near zero. Lag > 5 seconds indicates a network or I/O issue.
Planned Switchover
- Confirm ha2 is fully in-sync.
- Run
crm resource move pbx-vip ha2or equivalent keepalived command. - Verify VIP is live on ha2:
ip addr show. - After maintenance, move VIP back to ha1 and verify sync resumes.
Testing HA (Quarterly)
- Place a test call on ha1 to confirm service.
- Simulate ha1 failure:
systemctl stop corosync. - Confirm ha2 takes over within 30 seconds.
- Restore ha1 and verify it rejoins as passive without disrupting active calls.