IOSOR Learn
Inbound MO Routing Rule Evaluation Order & Precedence
Defines the deterministic evaluation sequence for inbound routing rules across gateways, covering precedence logic, conflict resolution, and partner route verification via Decision Brief.
Lead Telecom & Routing Architect · Lausanne, CH
Inbound messages traverse a strict top-down rule chain where the first matching condition wins; gateway-specific weights, sender ID filters, and template gates are evaluated before cost metrics to prevent misrouting.
Rule Chain Architecture
Each gateway maintains an ordered rule list indexed by priority integer; lower integers evaluate first. Rules carry match criteria — sender pattern, keyword, short code, or E.164 prefix — and an action: route to partner, autoreply, or drop. The engine stops at the first satisfied rule; no fall-through occurs unless explicitly chained.
Precedence Hierarchy
- Hard blocks (STOP/opt-out lists) — absolute first. 2. Verified sender allowlists — bypass cost logic. 3. Template-matched campaigns — locked to pre-approved routes. 4. Keyword/short code exact matches. 5. E.164 prefix ranges. 6. Catch-all cost-optimized route. Gateway weights only apply inside tier 6; they never promote a lower-tier rule.
Conflict Detection & Resolution
When two rules share identical match criteria but different actions, the engine flags a configuration error at deploy time. Runtime conflicts from overlapping prefixes (e.g., +1415 vs +1) resolve to the longest prefix match. DLR receipts and webhook latency logs surface misroutes within 90 seconds for immediate rollback.
Gateway-Specific Evaluation Nuances
Provider A evaluates sender ID before keyword; Provider B reverses order. Normalize by pinning sender gates at tier 2 universally. Webhook timeout buffers (default 5 s) must exceed the slowest partner P99 latency; otherwise the engine treats silence as failure and drops to the next rule.
Observability & Audit Trail
Every evaluation emits a structured log: rule_id, match_tier, matched_criteria, selected_partner, latency_ms. Correlate with DLR webhook reconciliation to prove end-to-end correctness. Alert on rule_hit_count divergence >5 % from baseline.
Start with IOSOR
Compare verified partner routes for your corridor and channel using Decision Brief to lock evaluation order against live latency, delivery rate, and cost data. Checklist: 1) Export current rule chain per gateway. 2) Validate tier ordering against precedence hierarchy. 3) Run shadow traffic through /tools/brief comparison. 4) Promote winning route to tier 6 catch-all. 5) Enable DLR audit alerts. Related: Inbound MO Routing Rule Conflict Resolution, Inbound MO Routing Priority Cost Optimization, Inbound Payload Normalization Gateway Route Mapping.
IOSOR takeaway
Each gateway maintains an ordered rule list indexed by priority integer; lower integers evaluate first. Alert on rule_hit_count divergence >5 % from baseline (/tools/brief · DLR / webhook).
Was this guide helpful?
Related guides
- Inbound MO Route Failover: Verifying Drain Rate and Cutover Safety
Verify inbound MO failover by measuring drain rate, DLR finality alignment, and cutover safety before switching primary routes. Compare failover-ready partners via /tools/brief.
- Inbound MO Webhook Retry Storms: Backpressure Gates and Partner Route Comparison
Diagnose retry amplification, set backpressure gates, and compare verified inbound partner routes on retry semantics, DLR receipts, and failover before committing volume.
- Inbound Webhook Signature Rotation: Cutover Audit Checklist
Audit signature verification, replay windows, and rollback readiness before rotating inbound webhook secrets, then compare verified partner routes on cutover support.












