--- title: "Ring2All SBC - Dispatcher & Load Balancing Module Documentation" description: "Documentation for Dispatcher & Load Balancing" --- ## Table of Contents 1. [Module Overview (Technical)](#1-module-overview-technical) 2. [Module Overview (Commercial/Business)](#2-module-overview-commercialbusiness) 3. [Module Overview (End User/Administrator)](#3-module-overview-end-useradministrator) 4. [Configuration Sections](#4-configuration-sections) 5. [Settings Reference](#5-settings-reference) 6. [Common Scenarios & Examples](#6-common-scenarios--examples) 7. [Limitations & Important Notes](#7-limitations--important-notes) 8. [Troubleshooting Tips](#8-troubleshooting-tips) 9. [Glossary](#9-glossary) --- ## 1. Module Overview (Technical) ### What Is the Dispatcher Module? The **Dispatcher Module** in Ring2All SBC manages high-availability Session Border Controller traffic distribution, round-robin load balancing, weight-based routing, and automated failover monitoring across groups of Telephony Server media nodes, PSTN gateways, and carrier SBCs. Powered by Kamailio's `dispatcher` module, Ring2All SBC sends active SIP `OPTIONS` keepalive pings at regular intervals to verify gateway health. If a node fails to respond or returns server errors (e.g. 500, 503), the Dispatcher instantly marks it as inactive (`IP_INACTIVE`) and re-routes pending traffic to healthy nodes. ### Architecture ``` ┌─────────────────────────────────────────────────────────────────┐ │ Ring2All SBC - Dispatcher Architecture │ ├─────────────────────────────────────────────────────────────────┤ │ │ │ Inbound SIP Traffic ──> Kamailio SBC Core (Dispatcher) │ │ │ │ │ ┌──────────┼──────────┐ │ │ │ (Options Keepalive) │ │ │ ▼ ▼ ▼ │ │ ┌────────┐ ┌────────┐ ┌────────┐ │ │ │ Node 1 │ │ Node 2 │ │ Node 3 │ │ │ │ (Active) │ (Active) │ (Failed) │ │ └────────┘ └────────┘ └────────┘ │ │ │ │ X (Skipped) │ │ └──────────┴──────────┘ │ │ │ │ │ ▼ │ │ Telephony Server / Carrier Pool │ │ │ └─────────────────────────────────────────────────────────────────┘ ``` --- ## 2. Module Overview (Commercial/Business) ### Business Benefits 1. **Zero-Downtime Telephony Operations**: Automatically detects gateway failures in under 2 seconds, preventing dropped calls and agent downtime. 2. **Optimal Capacity Utilization**: Distributes traffic evenly across media servers according to processing capacity (weight algorithms). 3. **Carrier Cost Optimization**: Route traffic dynamically based on dispatcher group rules and carrier priorities. --- ## 3. Module Overview (End User/Administrator) ### What Can You Do in This Module? - **Define Dispatcher Groups**: Create logical pools for Telephony nodes, PSTN Trunks, or Outbound Carriers. - **Configure Load Balancing Algorithms**: Choose between Hash-based (Call-ID, From-URI), Round-Robin, or Weight-based distribution. - **Set Probing Parameters**: Define SIP `OPTIONS` ping intervals, timeout limits, and failure thresholds. - **View Gateway Health Status**: Real-time status monitoring (Active, Inactive, Probing, Disabled). --- ## 4. Configuration Sections ### 1. Dispatcher Rules Grid Lists all registered gateways with group IDs, destination URIs, weights, priority, and real-time status. ### 2. Gateway Properties Form Allows adding or editing destination URIs (`sip:192.168.10.32:5060`), flags, socket bindings, and description. --- ## 5. Settings Reference | Field Name | Type | Options / Format | Description | | :--- | :--- | :--- | :--- | | `setid` | Integer | Positive integer (e.g. `10`) | Dispatcher Group ID. | | `destination` | Input | `sip:host:port` | SIP URI of target gateway or media server. | | `flags` | Integer | Bitmask (e.g. `8` = Probing) | Operational flags for Kamailio dispatcher. | | `priority` | Integer | 0-100 | Routing priority order within dispatcher set. | --- ## 6. Common Scenarios & Examples ### Scenario: Configuring High-Availability Telephony Cluster 1. Create Dispatcher Set `1` for Telephony Server Media Pool. 2. Add Node A: `sip:192.168.10.30:5060`, Priority `10`, Flags `8`. 3. Add Node B: `sip:192.168.10.31:5060`, Priority `10`, Flags `8`. 4. Kamailio pings both nodes every 5 seconds. If Node A goes down, all traffic seamlessly flows to Node B. --- ## 7. Limitations & Important Notes - Ensure `ds_ping_interval` is set between 2s and 10s to avoid unnecessary network overhead while maintaining rapid failover. --- ## 8. Troubleshooting Tips | Symptom | Probable Cause | Solution | | :--- | :--- | :--- | | Node marked `INACTIVE` | Firewall blocking SIP `OPTIONS` | Verify port 5060 UDP is allowed between Kamailio and media nodes. | | Dispatcher rules not reloading | Memory cache not synced | Run `kamcmd dispatcher.reload` via SBC CLI or API. | --- ## 9. Glossary - **Dispatcher Set**: Logical grouping of destinations sharing the same routing policy. - **Probing**: Periodic transmission of SIP `OPTIONS` pings to verify destination health.