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.

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

Lead Telecom & Routing Architect · Lausanne, CH

IOSOR Expert · Q&A

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.

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

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

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