Skip to content

SIP Failover and Redundancy

How automatic failover works, dual signaling IPs, route priority, failover triggers, and DNS practices.

6 min readAIVO Connect

How Automatic Failover Works

AIVO Connect is built for high availability. Every SIP connection has access to multiple signaling endpoints across geographically distributed data centers. If one endpoint becomes unavailable, your PBX automatically routes to the next available endpoint.

The Failover Process

  1. Your PBX sends a SIP request to the primary endpoint.
  2. If the primary does not respond or returns an error, the PBX retries on the secondary endpoint.
  3. The secondary endpoint handles the call using the same configuration and credentials.
  4. Once the primary recovers, new calls resume on the primary. Active calls on the secondary continue uninterrupted.

Primary and Secondary SIP Endpoints

Each region provides two independent signaling endpoints (primary and secondary IPs):

RegionFQDNPrimary IPSecondary IP
USsip.aivo.bz192.76.120.1064.16.250.10
Europesip-eu.aivo.bz185.246.41.140185.246.41.141
Australiasip-au.aivo.bz103.115.244.145103.115.244.146
Canadasip-ca.aivo.bz192.76.120.3164.16.250.13

The primary and secondary run in separate data centers. A data center outage only affects one endpoint, and your traffic fails over to the other.

See SIP Network Information for the full list of transport protocols, firewall subnets, and codec details.

Route Priority Configuration

Configure your PBX with multiple SIP routes in priority order:

Example: US Business with European Backup

PriorityEndpointUse Case
1 (highest)sip.aivo.bzPrimary - nearest region
2sip-eu.aivo.bzFailover - different continent
3sip-ca.aivo.bzDisaster recovery - alternate region

In FreePBX

Add multiple trunk entries with different SIP servers, then list them in order in your Outbound Route's Trunk Sequence.

In 3CX

Edit the SIP Trunk and add multiple registrar/outbound proxy entries. 3CX will try them in order.

DNS SRV Record-Based Failover

SRV records let your PBX discover and prioritize SIP endpoints automatically, without hardcoding IP addresses. When configured correctly, your PBX queries DNS and receives an ordered list of endpoints ranked by priority and weight.

SRV Record Format

_sip._udp.yourdomain.com  IN  SRV  10  10  5060  sip.aivo.bz
_sip._udp.yourdomain.com  IN  SRV  20  10  5060  sip-eu.aivo.bz
_sip._tcp.yourdomain.com  IN  SRV  10  10  5060  sip.aivo.bz
_sip._tcp.yourdomain.com  IN  SRV  20  10  5060  sip-eu.aivo.bz
_sip._tls.yourdomain.com  IN  SRV  10  10  5061  sip.aivo.bz
_sip._tls.yourdomain.com  IN  SRV  20  10  5061  sip-eu.aivo.bz

The lower priority value (10) is tried first. If that endpoint is unreachable, the PBX automatically fails over to the higher priority value (20). The weight field (10) allows load balancing between endpoints at the same priority level.

NAPTR Records

AIVO Connect FQDNs also support NAPTR records, which let your PBX auto-discover the available transport protocols (UDP, TCP, TLS) for each endpoint.

TTL Settings

  • Set DNS TTL to 300 seconds (5 minutes) for SIP records.
  • Lower TTLs mean faster failover but more DNS queries.
  • Higher TTLs reduce DNS load but delay failover.

Avoid Caching Issues

  • Do not hardcode IP addresses in your PBX. Always use hostnames.
  • If your PBX caches DNS, set the cache TTL to match or be lower than the DNS TTL.
  • Periodically verify your PBX resolves the correct IPs (dig sip.aivo.bz or nslookup sip.aivo.bz).

Automatic Re-Registration on Connection Loss

When your PBX loses connectivity to the active SIP endpoint, AIVO Connect supports automatic re-registration to restore service:

How Re-Registration Works

  1. Your PBX detects that the current registration has failed (no response to REGISTER refresh, or a transport error).
  2. The PBX immediately attempts to re-register with the same endpoint.
  3. If the endpoint is still unreachable after the configured retry count, the PBX fails over to the secondary endpoint and registers there.
  4. Once the primary endpoint recovers, your PBX can re-register back to it on the next registration refresh cycle.

Recommended Settings

  • Registration Expiry: 300-600 seconds (5-10 minutes). The PBX sends a REGISTER refresh before expiry.
  • Re-Registration Retry Interval: 30-60 seconds. How often to retry if registration fails.
  • Max Registration Retries: 3-5 attempts before failing over to the secondary.

Tip: Avoid setting the registration expiry too low (under 120 seconds) as it increases signaling load. Setting it too high (over 1800 seconds) delays detection of connection loss.

Keep-Alive and OPTIONS Ping Intervals

SIP keep-alive mechanisms ensure your PBX detects endpoint failures quickly, even when no active calls are in progress.

SIP OPTIONS Pings

Your PBX should send periodic SIP OPTIONS requests to the registered endpoint. If the endpoint does not respond, the PBX knows the connection is down and can trigger re-registration or failover.

  • Recommended OPTIONS ping interval: 30 seconds.
  • Failure threshold: 3 consecutive unanswered OPTIONS before declaring the endpoint down.
  • Response timeout: 5 seconds per OPTIONS request.

NAT Keep-Alives

If your PBX is behind a NAT firewall, send UDP keep-alive packets to maintain the NAT binding:

  • Keep-alive interval: 15-30 seconds (must be shorter than your NAT timeout).
  • Method: Most PBX systems support CRLF keep-alives or SIP OPTIONS for this purpose.

Transport-Level Keep-Alives

  • TCP/TLS: Enable TCP keep-alive on the transport connection. Recommended interval: 30 seconds.
  • WebSocket (WSS): WebSocket ping/pong frames are handled automatically at the protocol level.

What Triggers Failover

Your PBX should failover when it receives these SIP response codes:

CodeMeaningAction
408Request TimeoutPrimary is not responding. Retry on secondary.
480Temporarily UnavailableEndpoint is overloaded or in maintenance. Try next.
503Service UnavailableEndpoint is down. Fail over immediately.
504Server TimeoutGateway did not respond in time. Try next.

Timeout Settings

Configure your PBX to fail over quickly:

  • SIP INVITE Timeout: 4-6 seconds (how long to wait for a response before trying the next server).
  • Registration Timeout: 30 seconds (how long to wait before declaring registration failed).
  • Retry Interval: 30-60 seconds (how often to retry the primary after failover).

Tip: Do not set the INVITE Timeout too low (under 3 seconds) as network jitter could cause false failovers.

Monitoring

AIVO Connect provides real-time status on the dashboard:

  • Connection status - Shows whether your PBX is registered.
  • Endpoint health - Green/yellow/red indicators for each signaling endpoint.
  • Failover events - Log of when failovers occurred and why.

You can also set up webhook alerts for failover events. See API Keys and Developer Access for webhook configuration.

Was this article helpful?