--- title: "🔄 Multi-PBX Dispatch & Webhook Synchronization" description: "Connecting distributed Ring2All PBX clusters to Ring2All DMS for automated catalog and template synchronization" --- > **Multi-PBX Dispatch** bridges centralized hardware engineering with real-time operations, allowing telecom carriers to propagate phone templates, certified models, and firmware policies across dozens of PBX clusters simultaneously. --- ## 🏗️ Synchronization Topology In multi-cluster carrier networks, PBX nodes operate independently to provide geographical redundancy and multi-tenant isolation. Ring2All DMS acts as the authoritative master hub: ```mermaid flowchart TB DMS["Ring2All DMS Master Hub
(dms.ring2all.com)"] subgraph PBXClusters["Registered Client Applications (PBX Clusters)"] PBX_US["US-East Enterprise PBX
(east.carrier.com)
Webhook: /api/v1/provisioning/sync/inbound"] PBX_EU["EU-West Hospitality PBX
(eu.carrier.com)
Webhook: /api/v1/provisioning/sync/inbound"] PBX_AP["APAC Carrier Softswitch
(apac.carrier.com)
Webhook: /api/v1/provisioning/sync/inbound"] end DMS -->|Instant Dispatch (Push)| PBX_US DMS -->|Instant Dispatch (Push)| PBX_EU DMS -->|Instant Dispatch (Push)| PBX_AP PBX_US -.->|Periodic Auto-Sync (Pull)| DMS PBX_EU -.->|Periodic Auto-Sync (Pull)| DMS PBX_AP -.->|Periodic Auto-Sync (Pull)| DMS ``` ![Multi-PBX Dispatch & Webhook Synchronization](/screenshots/dms/dispatch/pbx-sync.png) --- ## 🔑 Client Application Registration To connect a Ring2All PBX cluster to DMS: 1. In Ring2All DMS, navigate to **Third-Party Platforms** (`/platforms` or `/settings/client-apps`). 2. Click **Add Client Application** and enter: * **Application Name**: Descriptive node identifier (e.g., `PBX-Cluster-Austin-01`). * **Platform Type**: `ring2all_pbx` (or generic softswitch). * **Server Base URL**: Public domain of the PBX (e.g., `https://pbx.austin.carrier.com`). * **Dispatch Webhook URL**: Inbound webhook endpoint on the PBX: `https://pbx.austin.carrier.com/api/v1/provisioning/sync/inbound` * **Allowed IPs**: IP address whitelist permitted to execute sync queries. 3. The system generates a cryptographically secure 64-character **API Key** (Token). 4. Copy the API Key and configure it in the PBX interface under **Settings > Catalog Synchronization**. --- ## ⚡ Dual Synchronization Modes Ring2All supports two complementary synchronization mechanisms: ### 1. Inbound Push Dispatch (Instant) When a hardware architect modifies a template or certifies a new device model on DMS: * The operator clicks **Dispatch Sync** in the DMS console (or uses the MCP AI Assistant tool `dispatch_catalog_sync`). * DMS immediately dispatches an authenticated HTTP `POST` request with the JSON catalog payload to the registered webhook URL of every connected PBX. * The PBX validates the HMAC signature, updates its database tables (`provision_vendors`, `provision_models`, `provision_templates`), and makes the new hardware immediately available in subscriber extension forms. ### 2. Outbound Pull Sync (Periodic Auto-Sync) Each PBX runs an automated background scheduler: * Every configurable interval (default: 24 hours), the PBX contacts `https://dms.ring2all.com/api/v1/catalog/sync`. * It presents its Client API Key and checks for changes using `ETag` and `last_updated_at` headers. * Only differential updates are downloaded, minimizing bandwidth and database write overhead. --- ## 🛡️ Asset Integrity & Anti-Phantom Sanitization When synchronizing between DMS and PBX instances, Ring2All strictly enforces asset integrity rules to prevent broken UI layouts: 1. **Vendor Logo Sanitization**: - The sync engine never injects relative web paths (such as `/devices/yealink/logo.svg`) into PBX database records. - If the local file does not physically exist in `/var/www/softswitch/uploads/vendors/`, the field is set to `NULL`, allowing the PBX to render a stylized two-letter initials badge without 404 image errors. 2. **Template Body Decoupling**: - Multi-kilobyte Jinja2 template bodies are compressed and streamed to prevent Node.js event-loop spikes or heap exhaustion during peak sync windows. 3. **Audit Trail Logging**: - Every sync event records the originating user or IP, models updated, execution duration in milliseconds, and status (`success` or `failed`). --- ## 🎯 User Roles & Key Capabilities | User Role | Operations in Multi-PBX Dispatch | | :--- | :--- | | **Carrier Fleet Manager** | Registers new PBX nodes, issues API access tokens, and monitors overall synchronization health. | | **VoIP Hardware Architect** | Triggers instant remote dispatch after releasing a template revision to verify that changes deploy uniformly. | | **PBX Administrator** | Configures the local pull sync schedule and inspects last-sync timestamps in the PBX web interface. |