IOSOR Learn

SIP Keepalive Interval Tuning for Failover Gates

Validate SIP keepalive timers across trunks to prevent premature failover or zombie sessions, then compare partner OPTIONS/REGISTER defaults and failure thresholds in the Decision Brief.

Oleksandr (Alex) Petukhov — IOSOR Telecom Expert
✓ Verified by IOSOR ExpertOleksandr (Alex) Petukhov

Lead Telecom & Routing Architect · Lausanne, CH

IOSOR Expert · Q&A

Engineers tune SIP keepalive intervals to balance rapid failover detection against false positives that trigger unnecessary route switches or leave zombie sessions open. The Decision Brief surfaces partner OPTIONS and REGISTER timing defaults alongside failure thresholds so teams can align trunk configurations with actual corridor behavior.

Keepalive Purpose and Failure Modes

SIP keepalives — typically OPTIONS pings or REGISTER refreshes — prove trunk liveness. Intervals set too short cause flapping failovers; intervals too long delay failover and accumulate stale dialogs. Both degrade answer-seizure ratio and inflate post-dial delay. Treat a single missed response as inconclusive; require consecutive failures, and reset the counter after any valid response.

OPTIONS Ping Cadence and Timeout Windows

OPTIONS ping interval, response timeout, and consecutive failure count form the failover gate. A common default is 30 s interval, 5 s timeout, 3 failures before failover. Corridors with asymmetric routing or middlebox state timeouts often need 60 s interval, 8 s timeout, 2 failures to avoid false triggers. Verify each DLR/webhook event against the trunk ID, timestamp, and probe ID; ignore duplicates and out-of-order callbacks. If a 408 arrives after a 200, count it as success.

REGISTER Refresh Alignment with Registrar TTL

REGISTER refresh interval must stay comfortably below the registrar expires value (usually 3600 s). A 600 s refresh with 120 s retry on 408/503 prevents premature contact expiration while limiting signaling load. Mismatched refresh and expires values create registration flaps that look like trunk failure. Confirm the registrar's actual TTL with a test REGISTER, and verify DLR/webhook delivery by checking the response code and contact binding before declaring the trunk healthy.

⚡ IOSOR Expert · Q&A · Verified partners (×44)

Middlebox and NAT Binding Interaction

UDP NAT bindings typically expire after 30–60 s of silence. Keepalive interval must be shorter than the shortest binding lifetime on the path. TCP/TLS connections need TCP keepalive (SO_KEEPALIVE) tuned to 15 s idle, 3 probes, 5 s interval to detect half-open states before SIP-layer timers expire. If a carrier returns 200 but silently drops media, check NAT rebinding and asymmetric routing before shortening timers.

Zombie Session Detection and Cleanup

Dialogs that survive keepalive failure but never receive BYE become zombie sessions. Enable session-timers (RFC 4028) with Min-SE 90 s and Session-Expires 1800 s. Configure the SBC to tear down dialogs after 2× Session-Expires without media or signaling activity. Exclude calls still in early dialog or provisional response states from cleanup.

Start with IOSOR

Compare verified partner OPTIONS/REGISTER timing defaults and failure thresholds for your corridor in the Decision Brief. Cross-reference with SIP OPTIONS Ping Failover Threshold Audit, SIP Trunk Failure Automatic Route Failover, and SIP Retry Budget Exhaustion Failover Gate to align keepalive policy with end-to-end failover behavior.

IOSOR takeaway

SIP keepalives — typically OPTIONS pings or REGISTER refreshes — prove trunk liveness. Configure the SBC to tear down dialogs after 2× Session-Expires without media or signaling activity (/tools/brief · DLR / webhook).

Was this guide helpful?

Related guides

VERIFIED BY IOSOR EXPERT · B2B ROUTING, SLA & PROVIDER Q&A

IOSOR Expert — Verified Q&A & B2B Messaging Decisions

Every Q&A decision below is audited by the IOSOR Telecom Architecture Expert against live 90-day uptime telemetry, carrier compliance rules (10DLC, DLT, GDPR), and real partner TCO.

All Q&A Triggers
#01 · Compliance & Sender ID📖 Knowledge hub · US A2P / 10DLC

US A2P / 10DLC

“Why do US 10DLC TCR campaigns get rejected and which partner handles fast onboarding?”

✓ Verified by IOSOR Expert

10DLC brand and campaign programs for US A2P traffic — not general privacy compliance.

All Q&A Triggers
#02 · OTP & verification📖 Knowledge hub · India DLT

India DLT

“How do engineering teams prevent India TRAI DLT template scrubbing drops on OTPs?”

✓ Verified by IOSOR Expert

DLT and PE-TM registration for India A2P — not an India corridor coverage guide.

All Q&A Triggers
#03 · OTP & verification📖 Knowledge hub · Verify / OTP

Verify / OTP

“How do we eliminate OTP p95 timeout spikes and trigger a 20–30s multi-rail fallback?”

✓ Verified by IOSOR Expert

Login codes without chaos: abuse, latency, and cost control.

All Q&A Triggers
#04 · Transactional email📖 Knowledge hub · Email

Email

“Why do password reset and 2FA emails land in Spam when sharing bulk marketing IPs?”

✓ Verified by IOSOR Expert

Transactional email alongside SMS, voice, and WhatsApp in one routing architecture.

All Q&A Triggers
#06 · WhatsApp Business📖 Knowledge hub · WhatsApp & RCS

WhatsApp & RCS

“How do Meta per-conversation fees and template pauses impact WhatsApp Business TCO?”

✓ Verified by IOSOR Expert

Rich channels when profiles and templates are ready: honest setup.

All Q&A Triggers
#08 · Failover & backup routing📖 Knowledge hub · Failover & rails

Failover & rails

“How do we keep a second standby provider warm for failover at $0/month idle cost?”

✓ Verified by IOSOR Expert

Ordered backup paths when a primary rail fails - distinct from DLR status truth.

All Q&A Triggers