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.
Lead Telecom & Routing Architect · Lausanne, CH
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.
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
- SIP Registration Expiry Recovery: Failover Gate for Route Selection
Verify how each SIP route handles registration expiry, re-registration storms, and failover to a secondary registrar without dropping active dialogs before you commit traffic.
- SIP Route Cost-Band Verification Before Partner Comparison
Verify quoted SIP termination cost bands against real per-minute, per-DID, and per-channel economics before you commit to a partner route comparison.
- SIP OPTIONS Ping Liveness: Separating False Positives From Real Failover
Decide if your SIP OPTIONS keepalive signal is trustworthy for failover or masking dead routes as healthy. Verify response-code handling and partner readiness.












