IOSOR Learn
SIP REFER NOTIFY Subscription State Recovery Audit
Validate SUBSCRIBE/NOTIFY state machine recovery after network partitions or peer restarts to prevent stuck dialogs and ghost subscriptions before routing production traffic through carrier SIP trunks.
Lead Telecom & Routing Architect · Lausanne, CH
Operations teams must verify that SUBSCRIBE/NOTIFY dialogs recover cleanly after network partitions or peer restarts to eliminate stuck dialogs and ghost subscriptions before production traffic routes through carrier SIP trunks.
Subscription State Machine Baseline
Establish the expected state transitions for each event package (refer, presence, dialog) under RFC 6665. Document initial SUBSCRIBE, 200 OK with Expires, NOTIFY with Subscription-State: active, and refresh behavior. Capture the state machine in a test harness so deviations are measurable.
Partition Simulation & Recovery Observation
Inject controlled network partitions between the subscriber and notifier using traffic shaping or firewall rules. Observe whether NOTIFY retransmissions respect SIP timers (T1, T2, Timer F) and whether the subscription transitions to terminated with reason "timeout" or recovers to active when connectivity restores. Log every state change with timestamps.
Peer Restart & Dialog Orphaning
Restart the notifier peer while active subscriptions exist. Verify that the subscriber receives NOTIFY with Subscription-State: terminated;reason=deactivated or that the subscriber re-SUBSCRIBEs automatically. Check for orphaned dialogs where the subscriber believes the subscription is active but the notifier has no state. Measure recovery latency.
Expires & Refresh Race Conditions
Force Expires values near zero and trigger simultaneous refresh SUBSCRIBEs from both ends. Confirm that the notifier processes only one refresh per dialog and returns 481 Call/Transaction Does Not Exist for stale refreshes. Validate that Subscription-State expires values decrement correctly and that no ghost subscriptions persist after explicit unsubscribe.
Event Package Interop Matrix
Test REFER, presence, and dialog event packages across the carrier trunk interop matrix. Record each package's Subscription-State handling, NOTIFY body format, and error codes (489 Bad Event, 412 Conditional Request Failed). Flag packages that deviate from RFC 3515, RFC 3856, or RFC 4235. Document carrier-specific quirks.
Start with IOSOR
Compare verified partner routes for your SIP trunk corridor using the IOSOR route comparison to ensure subscription recovery SLAs match operational requirements. Run the checklist: partition recovery < 2s, restart orphan rate < 0.1%, refresh race zero defects, interop matrix green. Cross-reference: SIP REFER NOTIFY Subscription Refresh Reliability Audit, SIP REFER NOTIFY Event State Machine Audit, SIP Subscription State Event Package Audit.
IOSOR takeaway
Establish the expected state transitions for each event package (refer, presence, dialog) under RFC 6665. Document carrier-specific quirks (/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.












