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).
| Trunk | Server | Priority |
|---|---|---|
| didhub-primary | us-east.didhub.io | 1 |
| didhub-secondary | us-west.didhub.io | 2 |
| didhub-tertiary | eu-west.didhub.io | 3 |
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
- Place a 30-second test call.
- Mid-call, block
us-east.didhub.ioat your firewall (simulating the PoP going down). - Place a second call — should connect via
us-west.didhub.iowithin 5-10 seconds. - Unblock and re-test.
Ready to get a number?
Pick a DID in 130+ countries from $1.99/month. Activates instantly on most numbers.