Quality Routing & Carrier SLA Engine
Table of Contents
Section titled βTable of Contentsβ- Overview & Architecture
- Business & Operational Significance
- π― User Roles & Key Capabilities
- Visual Interface & Form Layout
- Field & Configuration Reference
- Real-Time Telephony Quality Metrics (ASR, ACD, MOS)
- Automated Degradation & Autonomous Rerouting
- Security Best Practices & Operational Hardening
- Troubleshooting & Verification
- Glossary
1. Overview & Architecture
Section titled β1. Overview & ArchitectureβIn Ring2All SBC, the Quality Routing module (public.carrier_quality_policies and real-time CDR aggregation) introduces intelligent, automated quality-of-service closed-loop control to carrier routing decisions.
While traditional Least Cost Routing (LCR) selects routes based solely on static tariff rates, Ring2All SBC continuously aggregates live telephony telemetryβincluding Answer-Seizure Ratio (ASR), Average Call Duration (ACD), and RTPEngine Mean Opinion Score (MOS). If an upstream carrier experiences fiber cuts, transcoding latency, or packet loss degradation below defined SLA thresholds, the system autonomously penalizes the route and shifts traffic to higher-performing secondary routes.
βββββββββββββββββββββββββββββββββββββββββββ β Inbound Call Traffic β β (Continuous Real-Time Telemetry) β ββββββββββββββββββββββ¬βββββββββββββββββββββ β βΌ βββββββββββββββββββββββββββββββββββββββββββ β RTPEngine & Kamailio CDR Engine β β β’ Packet Loss β’ Jitter β’ Round-Trip β β β’ SIP 200 OK vs 5xx Failure Codes β ββββββββββββββββββββββ¬βββββββββββββββββββββ β βΌ βββββββββββββββββββββββββββββββββββββββββββ β Quality Routing Engine (Every 15m) β β Sliding Evaluation Window Calculation β ββββββββββββββββββββββ¬βββββββββββββββββββββ β Quality Score Verification vs Configured Policy β βββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββ β ASR >= 40% & MOS >= 4.0 β ASR < 40% OR Packet Loss > 5% βΌ βΌβββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ Optimal Status β β Degraded Status ββ β’ Keep Carrier in Pool β β β’ Trigger NOC Alert ββ β’ Normal Weight Routing β β β’ Autonomous Reroute ββ β’ Record SLA Compliance β β β’ Auto-Recovery Cooldown ββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββ2. Business & Operational Significance
Section titled β2. Business & Operational Significanceβ- Guaranteed Call Completion: Protects contact centers, enterprise sales floors, and emergency lines from silent call drops, fast-busy tones, and robotic audio caused by carrier packet degradation.
- Autonomous SLA Enforcement: Automatically detects carrier route degradation without requiring human NOC engineers to monitor dashboards 24/7 or manually modify routing tables.
- Balanced Quality vs. Cost: Ensures telecom operators never sacrifice audio fidelity for pennies of margin; when low-cost routes degrade, traffic seamlessly ascends to premium carriers until quality restores.
- Objective Vendor Scorecards: Generates irrefutable statistical data for carrier SLA dispute resolution, vendor billing credit negotiations, and quarterly vendor reviews.
3. π― User Roles & Key Capabilities
Section titled β3. π― User Roles & Key Capabilitiesβ| Role | Primary Use Case | Key Capabilities |
|---|---|---|
| SBC Administrator | Carrier Policy Configuration | Establish global quality thresholds; define evaluation time windows; configure automatic failover actions; set cooldown recovery timers. |
| NOC Voice Engineer | Live Quality Inspection | Monitor real-time ASR, ACD, MOS, and jitter metrics; manually trigger immediate route re-evaluation; inspect degraded gateways. |
| Telecom Procurement Lead | Carrier Performance Auditing | Review historical carrier quality metrics across 15m, 1h, 24h, and 7d windows to assess vendor SLA compliance. |
4. Visual Interface & Form Layout
Section titled β4. Visual Interface & Form LayoutβQuality Routing Live Telemetry Dashboard
Section titled βQuality Routing Live Telemetry DashboardβThe dashboard displays global telephony KPIs (Global ASR, Global ACD, Active Gateways, Degraded Count) and an interactive data grid tracking each wholesale carrierβs real-time quality scores.

Carrier Health & Quality Policy Form
Section titled βCarrier Health & Quality Policy FormβThe policy view allows administrators to configure automated threshold metrics, sampling parameters, and autonomous failover actions.

5. Field & Configuration Reference
Section titled β5. Field & Configuration ReferenceβSection 1: Quality Thresholds & Sampling
Section titled βSection 1: Quality Thresholds & Samplingβ| Field | Type | Options / Constraints | Description |
|---|---|---|---|
| Policy Name * | Text | Max 100 characters | Name of the active SLA policy (e.g., Standard Carrier Quality SLA). |
| Enable Real-Time Health Engine | Toggle | Boolean (Yes / No) |
Activates continuous background evaluation of carrier performance metrics. |
| Minimum ASR (%) * | Number | 1.0 to 100.0 (Default 40.0%) |
Answer-Seizure Ratio floor. Carriers dropping below this percentage are flagged as degraded. |
| Minimum ACD (Seconds) * | Number | 1 to 600 (Default 30s) |
Average Call Duration floor. Drastic drops in ACD typically indicate dead air or immediate customer hang-ups. |
| Minimum Call Sample Size * | Number | 5 to 500 (Default 10) |
Minimum call attempts required within the time window before taking automated failover actions. |
| Evaluation Window * | Dropdown | 5m, 15m, 30m, 1h |
The rolling time window over which CDR metrics are computed. |
Section 2: Automated Failover & Recovery
Section titled βSection 2: Automated Failover & Recoveryβ| Field | Type | Options / Constraints | Description |
|---|---|---|---|
| Automated Action on Degradation * | Dropdown | alert_only, alert_and_reroute, disable_gateway |
Action triggered when a carrier breaches quality thresholds. |
| Auto-Recovery Cooldown * | Number | 5 to 120 minutes (Default 15m) |
Time period the SBC waits before testing a degraded carrier with probe traffic to verify recovery. |
| Admin Notifications | Toggle | Boolean (Yes / No) |
Dispatches instant alerts via email and the platform notification center upon route degradation. |
6. Real-Time Telephony Quality Metrics (ASR, ACD, MOS)
Section titled β6. Real-Time Telephony Quality Metrics (ASR, ACD, MOS)βRing2All SBC calculates telephony health based on industry standards:
1. Answer-Seizure Ratio (ASR)
Section titled β1. Answer-Seizure Ratio (ASR)β$$\text{ASR} = \left( \frac{\text{Answered Calls (SIP 200 OK)}}{\text{Total Call Attempts}} \right) \times 100$$
- Optimal: $ASR \ge 65%$
- Acceptable: $40% \le ASR < 65%$
- Degraded / Faulty: $ASR < 40%$ (indicates carrier network congestion or signaling disconnects).
2. Average Call Duration (ACD)
Section titled β2. Average Call Duration (ACD)β$$\text{ACD} = \frac{\sum \text{Duration of Answered Calls}}{\text{Count of Answered Calls}}$$
- Short ACD (< 15s) often indicates audio path failure (one-way audio, dead air, or ring-no-answer loops).
3. Mean Opinion Score (MOS)
Section titled β3. Mean Opinion Score (MOS)βCalculated via RTPEngine from real-time RTP jitter buffer statistics and packet loss telemetry:
- 4.3 - 4.5: Pristine, studio-grade audio (G.711 / G.722 HD).
- 4.0 - 4.2: Standard toll-quality telephony.
- < 3.5: Noticeable clipping, robotic voice, or significant delay.
7. Automated Degradation & Autonomous Rerouting
Section titled β7. Automated Degradation & Autonomous ReroutingβWhen Automated Action on Degradation is set to alert_and_reroute:
- Detection: The background worker detects that Carrier X fell to $28%$ ASR across 50 call attempts over the last 15 minutes.
- Autonomous Demotion:
The engine dynamically lowers the carrierβs priority in Kamailioβs
droutingtables via RPC:Terminal window kamcmd drouting.carrierDemote carrier_id=1 reason="ASR fell below 40% threshold" - Rerouting: Subsequent calls automatically bypass Carrier X and route through Carrier Y.
- Probing & Restoration: After the Auto-Recovery Cooldown expires (e.g., 15 minutes), the SBC allows a low-volume canary sample of calls (5%) through Carrier X. If the sample demonstrates healthy ASR ($> 50%$), Carrier X is fully restored.
8. Security Best Practices & Operational Hardening
Section titled β8. Security Best Practices & Operational Hardeningβ- Prevent Flapping with Sample Size Guards: Never set Minimum Call Sample Size below 10. In low-traffic hours, 2 consecutive unanswered calls could trigger false-positive degradation alerts.
- Tune for Destination Types: DIDs terminating to call center IVRs naturally have higher ASR and longer ACD than outbound predictive dialer campaigns. Calibrate policies appropriately.
- Integrate with Notification Webhooks: Configure administrative email alerts to notify the upstream carrierβs NOC immediately when degradation is detected to accelerate vendor ticket resolution.
9. Troubleshooting & Verification
Section titled β9. Troubleshooting & Verificationβ| Symptom / Issue | Potential Root Cause | Recommended Verification & Resolution |
|---|---|---|
| Dashboard displays βNo carrier metrics recordedβ | No calls traversed the SBC in the selected time window, or CDR table timestamps are out of sync. | Verify system clock synchronization via NTP (chronyc tracking) and ensure CDR accounting is active in Reports > Call Detail Records. |
| Carrier incorrectly marked Degraded during off-peak hours | Sample size too small ($N < 5$). | Increase the Minimum Call Sample Size in the policy form to at least 25 attempts. |
| Autonomous reroute did not occur despite low ASR | Policy action set to alert_only. |
Change Automated Action on Degradation to alert_and_reroute and save changes. |
10. Glossary
Section titled β10. Glossaryβ- ASR (Answer-Seizure Ratio): Primary telecom metric measuring the percentage of initiated calls successfully answered by the callee.
- ACD (Average Call Duration): The average length of answered telephone conversations across a given time frame.
- MOS (Mean Opinion Score): Subjective or algorithmically derived measurement of the perceived audio quality of a voice call (ranging from 1.0 to 5.0).
- Flapping: Rapid, repeated state transitions between healthy and degraded caused by overly sensitive monitoring thresholds.

