Skip to content

Dynamic Destinations Module Documentation

13 min readUpdated: Sep 26, 2026
View as Markdown
  1. Module Overview (Technical)
  2. Module Overview (Commercial/Business)
  3. Module Overview (End User/Administrator)
  4. Configuration Fields Reference
  5. Call Flow / Logic Explanation
  6. Common Scenarios & Examples
  7. Model Context Protocol (MCP) AI Integration
  8. Limitations & Important Notes
  9. Troubleshooting Tips
  10. Glossary

Dynamic Destinations allow real-time call routing decisions based on external data sources. The system queries a database or HTTP API, evaluates the response, and routes the call to a matching destination.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Dynamic Destination System β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β”‚
β”‚ Inbound call arrives β”‚
β”‚ β”‚ β”‚
β”‚ β–Ό β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ Dynamic Destination Lookup β”‚ β”‚
β”‚ β”‚ SELECT * FROM public.dynamic_destinations β”‚ β”‚
β”‚ β”‚ WHERE name = [config_name] AND active = TRUE β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚ β”‚
β”‚ β–Ό β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ Query External Source β”‚ β”‚
β”‚ β”‚ β”‚ β”‚
β”‚ β”‚ Source Type: DB β”‚ β”‚
β”‚ β”‚ β”œβ”€ Connect to: postgresql://crm.example.com/db β”‚ β”‚
β”‚ β”‚ └─ Execute: SELECT status FROM clients β”‚ β”‚
β”‚ β”‚ WHERE phone='${caller_id_number}' β”‚ β”‚
β”‚ β”‚ β”‚ β”‚
β”‚ β”‚ Source Type: URL β”‚ β”‚
β”‚ β”‚ β”œβ”€ Request: https://api.example.com/lookup β”‚ β”‚
β”‚ β”‚ └─ Path: /check?caller=${caller_id_number} β”‚ β”‚
β”‚ β”‚ β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚ β”‚
β”‚ β–Ό Response: "VIP" β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ Match Against Options β”‚ β”‚
β”‚ β”‚ β”‚ β”‚
β”‚ β”‚ Option 1: VIP β†’ Queue: vip_support ← MATCH β”‚ β”‚
β”‚ β”‚ Option 2: STANDARD β†’ Queue: general_support β”‚ β”‚
β”‚ β”‚ Option 3: BLACKLIST β†’ Hangup β”‚ β”‚
β”‚ β”‚ Default: β†’ Queue: general_support β”‚ β”‚
β”‚ β”‚ β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚ β”‚
β”‚ β–Ό β”‚
β”‚ Route call to: Queue vip_support β”‚
β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Dynamic Destinations enable intelligent, data-driven routing:

Without Dynamic Destinations With Dynamic Destinations
Static routing rules Real-time decisions
Same treatment for all VIP vs. standard routing
No CRM integration CRM-aware call handling
Manual blacklist updates Automatic blacklist enforcement
  1. CRM-Based VIP Routing

    • Query CRM for customer tier
    • VIP customers β†’ Priority queue
  2. Credit/Account Status

    • Check payment status
    • Delinquent β†’ Collections queue
  3. Blacklist Enforcement

    • Query blocklist database
    • Blocked callers β†’ Hangup or message
  4. Geographic Routing

    • Look up caller location
    • Route to nearest branch
  5. Business Hours Override

    • Query external schedule API
    • Dynamic after-hours routing
Feature Benefit
Database Source Query PostgreSQL/MySQL directly
HTTP Source Integrate with REST APIs
Variable Substitution Use ${caller_id_number}, etc.
Multiple Options Match different values to destinations
Default Fallback Handle unmatched cases
Priority Ordering Process options in order

  • Create routing flows that query external sources
  • Map response values to PBX destinations
  • Configure fallback for unmatched responses
  • Support both database and HTTP queries
Role Key Capabilities
Super Admin Configures global database integrations, external API credentials, domain isolation, and monitors system-wide dynamic routing logs.
Tenant Admin Creates and maintains domain-specific Dynamic Destinations, configures CRM query templates, and maps lookup values to queues, IVRs, or extensions.
Call Center Supervisor Reviews dynamic routing options and verifies that VIP/high-value callers are routed to appropriate priority queues or departments.
Support Specialist / Agent Benefits from automatic context-driven routing where callers are pre-screened and delivered to the correct skill-based destination.
  1. Navigate to PBX Engine β†’ Applications β†’ Dynamic Destination in the sidebar (or visit /pbx/applications/dynamic-destination).
  2. The list view shows all configured dynamic routing engines, indicating Name, Source Type (DB/URL), Match Field, Default Destination, active Options count, and Status (Active/Inactive).
  3. Click the + Add button in the top toolbar to create a new dynamic routing engine.
  4. Click any existing engine row or edit button to update database connection strings, API URLs, or routing option rules.

Dynamic Destinations List View

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Creating a Dynamic Destination β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β”‚
β”‚ Step 1: General Settings β”‚
β”‚ β”œβ”€ Name: "CRM Customer VIP Lookup" β”‚
β”‚ β”œβ”€ Description: "Live customer tier lookup via external CRM" β”‚
β”‚ β”œβ”€ Source Type: HTTP Request (URL) β”‚
β”‚ β”œβ”€ URL: https://crm.company.com/api/v1/customer-lookup β”‚
β”‚ β”œβ”€ Payload / Template: {"caller": "${caller_id_number}"} β”‚
β”‚ β”œβ”€ Match Field: tier β”‚
β”‚ β”œβ”€ Default Destination: Queues β†’ General Support β”‚
β”‚ └─ Active: Enabled β”‚
β”‚ β”‚
β”‚ Step 2: Routing Options Matrix β”‚
β”‚ β”œβ”€ Option 1: "VIP" β†’ Queues β†’ Priority VIP Queue (Enabled) β”‚
β”‚ β”œβ”€ Option 2: "COLLECTIONS" β†’ Extensions β†’ Billing Dept (Enabled)β”‚
β”‚ └─ Option 3: "PARTNER" β†’ Ring Groups β†’ Partner Desk (Enabled) β”‚
β”‚ β”‚
β”‚ Step 3: Save and Route Inbound DIDs β”‚
β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

[!TIP] Variable Substitution: Use ${caller_id_number}, ${destination_number}, ${caller_id_name}, ${uuid}, or ${domain_name} within your SQL queries or JSON payload templates.

[!TIP] Fast Fallback: Always ensure your Default Destination points to a dependable destination (such as a primary IVR or general queue) in case the external API or database times out.

[!CAUTION] Query Latency: Telephony channels can wait a maximum of 2–3 seconds before callers experience dead air. Ensure external database indices and API endpoints respond in under 500ms.


Dynamic Destination Configuration Form

Field Description UI Tooltip Example Notes
Name * Primary identification label Friendly name identifying this dynamic destination profile CRM Customer VIP Lookup Required.
Description Contextual administrative notes Optional description of the routing purpose or external database integration Customer VIP check via CRM API Optional.
Source Type * Backend lookup protocol Data source protocol queried during call routing HTTP Request (URL) Database (DB) or HTTP Request (URL). Required.
Match Field * Extracted variable name Field name in database row or JSON response key compared against routing rules tier, status, account_code Required.
Database Connection * PostgreSQL or MySQL connection string Connection string for database source postgresql://user:pass@host:5432/crm Required when Source Type is Database (DB).
SQL Query Template * SQL query with variable placeholders Parameterized SQL query executed to retrieve routing attributes SELECT tier FROM clients WHERE phone = '${caller_id_number}' Required when Source Type is Database (DB).
URL * REST endpoint address HTTP/HTTPS URL of the external lookup service https://crm.company.com/api/v1/customer-lookup Required when Source Type is HTTP Request (URL).
Payload / Query Template * HTTP request body or query template JSON body or query string template with parameter substitution {"caller": "${caller_id_number}"} Required when Source Type is HTTP Request (URL).
Default Destination * Fallback call destination Destination to bridge if the query returns no result or fails to match an option Queues β†’ General Support Required. Module and Destination select.
Active Operational status Master toggle to enable or disable dynamic lookup for inbound calls Enabled / Disabled Toggle. Default: Enabled.

The Routing Options table defines discrete matching rules evaluated against the value extracted from the Match Field.

Field Description UI Tooltip Example Notes
Match Value * Expected return value Exact string or code expected from the external lookup response VIP, PLATINUM, OVERDUE Case-sensitive string matching.
Destination * Target module and entity PBX destination bridged when the return value matches Queues β†’ Priority VIP Queue Selectable module (Extension, Queue, Ring Group, IVR, etc.).
Enabled Rule state Toggle to enable or disable this specific match rule Enabled / Disabled Toggle per option row.
Actions Row management Remove this match option from the routing table Trash Icon Removes the row.

The dynamic routing engine interpolates runtime channel variables prior to executing the database query or HTTP API call:

Variable Description Runtime Example
${caller_id_number} Incoming Caller ID phone number 15551234567
${caller_id_name} Inbound Caller ID Name (CNAM) John Doe
${destination_number} Dialed DID or virtual extension 18005550199
${domain_name} PBX telephony tenant domain pbx.company.com
${uuid} Telephony Server unique channel identifier e742be94-8bf1-4e78-bc5a-e14b7320a5fd

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Dynamic Destination Flow β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β”‚
β”‚ 1. Call arrives, triggers dynamic destination β”‚
β”‚ β”‚ β”‚
β”‚ β–Ό β”‚
β”‚ 2. Load configuration from database β”‚
β”‚ β”œβ”€ Found & active β†’ Continue β”‚
β”‚ └─ Not found β†’ Use default dialplan β”‚
β”‚ β”‚ β”‚
β”‚ β–Ό β”‚
β”‚ 3. Build query with variable substitution β”‚
β”‚ ${caller_id_number} β†’ 5551234567 β”‚
β”‚ β”‚ β”‚
β”‚ β–Ό β”‚
β”‚ 4. Execute external query β”‚
β”‚ β”œβ”€ Database: Run SQL, get result β”‚
β”‚ └─ HTTP: Make request, parse response β”‚
β”‚ β”‚ β”‚
β”‚ β–Ό β”‚
β”‚ 5. Extract match field from response β”‚
β”‚ Response: {"tier": "VIP"} β†’ Match value: "VIP" β”‚
β”‚ β”‚ β”‚
β”‚ β–Ό β”‚
β”‚ 6. Search options (by priority order) β”‚
β”‚ β”œβ”€ Option "VIP" ← MATCH β”‚
β”‚ β”‚ └─ Route to: Queue vip_support β”‚
β”‚ β”œβ”€ Option "STANDARD" (skipped) β”‚
β”‚ └─ Option "BLOCKED" (skipped) β”‚
β”‚ β”‚ β”‚
β”‚ β–Ό β”‚
β”‚ 7. If no match β†’ Use default destination β”‚
β”‚ β”‚ β”‚
β”‚ β–Ό β”‚
β”‚ 8. Transfer call to resolved destination β”‚
β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Configuration:

Setting Value
Name CRM Tier Routing
Source Type Database
Connection postgresql://crm:pass@crm.local/customers
Query SELECT tier FROM clients WHERE phone='${caller_id_number}'
Match Field tier

Options:

Match Destination
VIP Queue: vip_support
GOLD Queue: priority_support
STANDARD Queue: general_support
Default Queue: general_support

Configuration:

Setting Value
Name Blacklist Check
Source Type HTTP Request
Base URL https://blocklist.example.com
Endpoint /check?phone=${caller_id_number}
Match Field blocked

Options:

Match Destination
true Hangup
false Queue: main_queue
Default Queue: main_queue

Configuration:

Setting Value
Name Payment Status
Source Type Database
Query SELECT status FROM accounts WHERE phone='${caller_id_number}'
Match Field status

Options:

Match Destination
DELINQUENT Queue: collections
SUSPENDED IVR: payment_options
ACTIVE Queue: customer_service
Default Queue: customer_service

Ring2All exposes dedicated Model Context Protocol (MCP) tools for Dynamic Destinations, allowing autonomous AI agents and Copilots to inspect real-time CRM/HTTP webhook routing rules, provision automated external lookup engines, and modify data source configurations with domain-level isolation.

Tool Name Description Key Parameters
list_dynamic_destinations Lists all dynamic destination engines configured in the domain, including webhook URLs, DB sources, and fallback modules. search (optional string)
get_dynamic_destination_status Retrieves full routing logic, webhook parsing rules, source queries, and configured match branch options for a dynamic destination. name (required)
create_dynamic_destination Creates a new external-lookup routing destination using an HTTP REST endpoint or SQL query, with fallback routing. name, sourceType (β€˜URL’ or β€˜DB’), sourceConfig, defaultModule, defaultDestination, matchField
update_dynamic_destination Updates external source URL/query, JSON match field parsing, or fallback route destinations. name, newName, sourceType, sourceConfig, defaultModule, defaultDestination, enabled
delete_dynamic_destination Deletes a dynamic destination configuration from the domain. name (required)
{
"tool": "list_dynamic_destinations",
"arguments": {
"search": "CRM"
}
}
{
"tool": "create_dynamic_destination",
"arguments": {
"name": "HubSpot VIP Tier Routing",
"sourceType": "URL",
"sourceConfig": "https://api.crm.example.com/v1/lookup?caller=${caller_id_number}",
"matchField": "customer_tier",
"defaultModule": "queue",
"defaultDestination": "support_standard"
}
}
  • β€œShow me all dynamic destinations that route incoming calls based on external CRM webhooks.”
  • β€œCreate a dynamic destination called β€˜Zendesk VIP Check’ that queries https://crm.internal/api/tier and falls back to IVR 100.”
  • β€œInspect the matching rules for β€˜HubSpot VIP Tier Routing’.”

[!WARNING] Query Latency: External queries add delay. Keep queries fast (<500ms).

[!WARNING] Connection Failures: If external source is down, default destination is used.

[!IMPORTANT] Security: Connection strings are stored in database. Use secure connections.

  1. Fast Queries: Index lookup columns
  2. Timeout Handling: External sources may fail
  3. Default Always: Configure fallback for all cases
  4. Test Thoroughly: Verify all match values route correctly
  5. Monitor Latency: Track query performance

[!CAUTION] SQL Injection: Variables are substituted directlyβ€”ensure trusted sources.


Symptom Possible Cause Solution
Always uses default Query returns no match Check query and match field
β€œFeature not available” Config not found/disabled Verify active status
Long call setup Slow external query Optimize query, add indexes
Wrong destination Match value mismatch Check case sensitivity

List dynamic destinations:

SELECT name, source_type, match_field, active,
(SELECT COUNT(*) FROM public.dynamic_destination_options
WHERE dynamic_destination_id = d.id) as option_count
FROM public.dynamic_destinations d
WHERE domain_id = [domain_id];

Check options:

SELECT match_value, destination_module, destination, priority, enabled
FROM public.dynamic_destination_options
WHERE dynamic_destination_id = [dd_id]
ORDER BY priority;

Term Definition
Dynamic Destination Routing configuration that queries external sources
Source Type Database (DB) or HTTP Request (URL)
Query Template SQL or HTTP path with variable placeholders
Match Field Response key containing value to match
Routing Option Match value mapped to a destination
Default Destination Fallback when no option matches
Variable Substitution Replacing ${var} with call data
Priority Order in which options are evaluated

Documentation last updated: January 2026