Asterisk resilience and recovery design
A recoverable configuration, a restarted service and a surviving active call are different outcomes. Define which outcome the business needs before choosing a second server, shared storage or a routing change.
Source-reviewed, 20 October 2026. Prepared from the cited documentation. No failover or recovery topology has been independently tested by Phone Guides. Scope: recovery planning, not a claim of supported clustering or uninterrupted calls.
State the recovery target
Write the acceptable service interruption and acceptable age of recovered data for each function. Separate new incoming calls, new outbound calls, voicemail, recordings, agent state and active conversations. A single label such as highly available hides those different responsibilities.
The official deployment documentation provides upstream deployment subjects. Use the installed distribution and infrastructure vendor's exact documentation for any cluster, replication or failover mechanism; a general Asterisk reference cannot certify that arrangement.
Map dependencies and owners
| Dependency | Recovery question |
|---|---|
| Carrier routing | How does the carrier select a reachable destination? |
| Phone registrations | How do clients discover and authenticate to a replacement? |
| Configuration/database | Which copy is authoritative after interruption? |
| Media and call state | What happens to existing channels and bridges? |
| Message/recording storage | Which files are complete, replicated and recoverable? |
| Network/name service | Which addresses, routes and names change? |
| Application integrations | How are duplicate work and abandoned calls reconciled? |
State who is permitted to activate a replacement and how the old system is prevented from resuming conflicting work. Two machines accessing the same files does not establish safe simultaneous ownership.
Keep backups independent of replication
Replication can propagate a deletion, corruption or mistaken configuration. Preserve a recovery copy with a known date, access policy and restoration procedure. Include source configuration, secrets through their approved backup path, database schemas/data, prompts and any required business records.
Use backup and restore for the inventory and recovery checks. Record software/package versions as well as data. A database restored into an incompatible schema can fail even when its backup file is readable.
Recover registrations and new routing deliberately
Check how endpoints and carriers behave when the original address stops responding. Record retry and registration behaviour from the exact product/service documentation rather than assuming that a DNS change updates every established connection immediately.
Keep route permissions on the replacement consistent with the intended system. Recovery should not introduce a broad outbound context or remove certificate verification merely to obtain a successful call.
Separate ARI application recovery from PBX call survival
On Asterisk 22, outbound ARI WebSocket connections are available from 22.5.0. A persistent connection can reconnect to an external application server; a per-call connection starts for the matching Stasis() call and, after its configured reconnect attempts fail, returns control to the dialplan with STASISSTATUS=FAILED. The Asterisk outbound-WebSocket guide describes DNS round-robin or a WebSocket-aware load balancer for distributing connection attempts across application servers. Check the installed patch and exact ari.conf/websocket_client.conf options before using the pattern.
StasisBroadcast() is available from Asterisk 22.7.0. Its optional res_stasis_broadcast and app_stasis_broadcast modules send a channel to connected ARI applications; the first successful claim receives Stasis control. If no app claims within the configured timeout, execution returns to the dialplan for fallback. See the versioned Asterisk 22 application reference and ARI configuration reference.
These features can improve ARI application connection recovery or distribute new calls among application instances on one Asterisk system. They do not replicate an active channel, bridge, RTP stream or provider session to a second PBX when the Asterisk node fails. Make the FAILED and timeout routes explicit, and ensure competing applications do not perform irreversible work before one has claimed the channel. Asterisk-node failover still needs its own carrier/phone routing, state, data and recovery design.
Define a reversible recovery sequence
List the trigger, decision owner, isolation step, restoration/start step, new-call checks and return procedure. Preserve evidence of what ran on each system. After an uncertain application request, reconcile its result before repeating it; see ARI lifecycle handling.
Reader checks
When you later exercise the design, record failure time, detection time, first successful new call, data recovered and any lost active calls. Include a database outage and a network partition if those failures are in scope. Describe results for that exact topology. Until exercised, publish the design as a plan and keep recovery-time claims unverified.
Return to Asterisk documentation.