Operations · High availability

Set up SIP failover across DIDHub PoPs

High-availability VoIP needs a primary and secondary SIP trunk. DIDHub publishes geographically separated PoPs (us-east, us-west, eu-west, ap-south) with consistent credentials. This tutorial wires up DNS SRV-based failover and active probing.

Option A: DNS SRV (simplest)

# DIDHub already publishes:
_sip._udp.sip.didhub.io.   3600 IN SRV 10 60 5060 us-east.didhub.io.
_sip._udp.sip.didhub.io.   3600 IN SRV 10 40 5060 us-west.didhub.io.
_sip._udp.sip.didhub.io.   3600 IN SRV 20 100 5060 eu-west.didhub.io.

Most modern PBXs (Asterisk pjsip 18+, FreeSWITCH 1.10+, Kamailio 5+) honor SRV records natively. Point your trunk at sip.didhub.io and failover happens automatically.

Option B: explicit primary + secondary trunks

Use this if your platform does not honor SRV (older 3CX, some hardware SBCs).

TrunkServerPriority
didhub-primaryus-east.didhub.io1
didhub-secondaryus-west.didhub.io2
didhub-tertiaryeu-west.didhub.io3

Configure outbound route → trunk sequence: primary, secondary, tertiary. On 503 / timeout, the next trunk is tried.

Option C: Kamailio dispatcher (high-volume)

See the Kamailio dispatcher tutorial or the OpenSIPS dispatcher tutorial — both give weighted load-balancing plus active SIP OPTIONS probing.

Active probing settings

# Asterisk pjsip AOR
qualify_frequency=30      # OPTIONS every 30s
qualify_timeout=5         # mark down if no response in 5s

# 3CX
# Trunk -> Options tab -> Re-register every 60s

# Kamailio dispatcher
modparam("dispatcher", "ds_ping_interval", 30)
modparam("dispatcher", "ds_probing_threshold", 3)

Real failover test

  1. Place a 30-second test call.
  2. Mid-call, block us-east.didhub.io at your firewall (simulating the PoP going down).
  3. Place a second call — should connect via us-west.didhub.io within 5-10 seconds.
  4. Unblock and re-test.
Inbound failover: handled automatically by DIDHub — we route inbound to whichever of your SIP endpoints is reachable based on DIDHub-side OPTIONS probes (configurable per trunk).

Ready to get a number?

Pick a DID in 130+ countries from $1.99/month. Activates instantly on most numbers.