Set up SIP failover across DIDHub PoPs
High-availability VoIP needs a primary and secondary SIP trunk. DIDHub publishes 23 geographically separated PoPs across 8 regions (NOAM, EURO, MENA, INDIA, APAC, ANZAC, LATAM, AFRICA) plus 200+ Global Edge anycast endpoints 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.
More tutorials
3CX SIP Trunk Setup with DIDHub
How to add a DIDHub SIP trunk in 3CX v18 / v20 using the generic SIP trunk template. DID inbound rule, outbound rule, and codec order includ
Asterisk pjsip Trunk to DIDHub
Minimal copy-pasteable pjsip.conf and extensions.conf for an Asterisk 18+ trunk registered to DIDHub with inbound + outbound routing.
Connect Vapi BYOC SIP Trunk to a DIDHub Phone Number
Step-by-step tutorial for Vapi BYOC: create a DIDHub SIP trunk, register it in Vapi, import a DID, and test inbound + outbound. Cuts Vapi te
FreePBX pjsip SIP Trunk Setup with DIDHub
Add a DIDHub SIP trunk in FreePBX using pjsip: trunk credentials, outbound route, inbound route, registration verification, and troubleshoot
Ready to get a number?
Pick a DID in 130+ countries from $1.99/month. Activates instantly on most numbers.