Call Flows Module Documentation
Table of Contents
Section titled βTable of Contentsβ- Navigation & Access
- Screenshots & Visual Interface
- Module Overview (Technical)
- Module Overview (Commercial/Business)
- Module Overview (End User/Administrator)
- Configuration Fields Reference
- Status Toggle
- Common Scenarios & Examples
- Model Context Protocol (MCP) AI Integration
- Limitations & Important Notes
- Troubleshooting Tips
- Glossary
Navigation & Access
Section titled βNavigation & AccessβTo access the Call Flows module:
- Log in to the Ring2All Web Portal.
- In the left navigation sidebar, expand PBX Engine.
- Under Incoming Call Tools, click Call Flows (
/pbx/incoming-tools/call-flows).
Screenshots & Visual Interface
Section titled βScreenshots & Visual InterfaceβCall Flows Overview
Section titled βCall Flows OverviewβDisplays all manual call flow toggle switches, extension/feature code, current state (normal / override), and quick management tools.

Call Flow Configuration Form
Section titled βCall Flow Configuration FormβConfigures toggle extension code, normal active destination, override destination, and current state switch.

1. Module Overview (Technical)
Section titled β1. Module Overview (Technical)βWhat Are Call Flows?
Section titled βWhat Are Call Flows?βCall Flows are toggleable routing switches that route calls to different destinations based on a binary state (enabled/disabled). Users can toggle the state via feature codes or BLF buttons to control call routing.
Architecture
Section titled βArchitectureβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ Call Flow System ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€β ββ Call Flow: "Night Mode" - Status: ENABLED ββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ β Toggle Code: *60 β ββ β β ββ β When ENABLED (current): β ββ β β Route to After-Hours Voicemail β ββ β β ββ β When DISABLED: β ββ β β Route to Main IVR β ββ β β ββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ ββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ β call_flow.lua β ββ β β ββ β Mode: Toggle (*60) β ββ β 1. User dials *60 β ββ β 2. Query public.call_flows by feature_code β ββ β 3. Flip status: enabled β disabled β ββ β 4. Update BLF state β ββ β 5. Play confirmation audio β ββ β β ββ β Mode: Route (inbound call) β ββ β 1. Call arrives at call flow β ββ β 2. Check current status β ββ β 3. Route to enabled/disabled destination β ββ β β ββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ2. Module Overview (Commercial/Business)
Section titled β2. Module Overview (Commercial/Business)βBusiness Value
Section titled βBusiness ValueβCall Flows provide on-demand routing control:
| Without Call Flows | With Call Flows |
|---|---|
| Fixed routing | Dynamic switching |
| Admin-only changes | User toggle via phone |
| No quick override | Instant BLF toggle |
| Manual updates | One-button control |
Use Cases
Section titled βUse Casesβ-
Night Mode
- Enable: Route to voicemail
- Disable: Route to normal IVR
-
Holiday Routing
- Enable: Route to holiday message
- Disable: Route to standard menu
-
Emergency Overflow
- Enable: Route to backup queue
- Disable: Route to primary queue
-
Do Not Disturb
- Enable: Route to voicemail
- Disable: Route to extension
Feature Highlights
Section titled βFeature Highlightsβ| Feature | Benefit |
|---|---|
| Two Destinations | Enabled/Disabled routing |
| Feature Code Toggle | Dial *60 to toggle |
| BLF Integration | Visual status on phones |
| *Toggle All (81) | Mass enable/disable |
| CoS Protection | Permission-based toggle |
| Auto-Schedule | Time-based switching |
3. Module Overview (End User/Administrator)
Section titled β3. Module Overview (End User/Administrator)βWhat Can You Do?
Section titled βWhat Can You Do?β- Create call flows with two destinations
- Set feature code for toggle (*60, *81, etc.)
- View and change current status
- Configure enabled/disabled destinations
- Set up auto-schedule
- Restrict toggle to specific extensions
Administrator Workflow
Section titled βAdministrator Workflowβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ Creating a Call Flow ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€β ββ Tab: General ββ ββ Name: "Night Mode" ββ ββ Feature Code: *60 ββ ββ Current Status: [Disabled] β Toggle button ββ ββ Allow Manual Toggle: β ββ ββ Enabled: β ββ ββ Section: Destinations ββ βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ β When Enabled: β ββ β ββ Destination Type: Voicemail β ββ β ββ Destination: General Mailbox β ββ βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ β When Disabled: β ββ β ββ Destination Type: IVR β ββ β ββ Destination: Main Menu β ββ βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ ββ Tab: Advanced Settings ββ ββ Announcement Path (ON): night-mode-enabled.wav ββ ββ Announcement Path (OFF): night-mode-disabled.wav ββ ββ Play Announcement Before Transfer: Off ββ ββ Record Call: Off ββ ββ BLF Update Behavior: Sync ββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββQuick Tips
Section titled βQuick Tipsβ[!TIP] BLF Button: Assign *60 to a BLF button for one-touch toggling with visual feedback.
[!TIP] Toggle All (*81): Use to enable/disable all call flows at once.
[!CAUTION] Both Destinations Required: Configure both enabled and disabled destinations.
4. Configuration Fields Reference
Section titled β4. Configuration Fields ReferenceβGeneral Fields
Section titled βGeneral Fieldsβ| Field | Description | Example |
|---|---|---|
| Name | Unique identifier | Night Mode |
| Feature Code | Toggle dial code | *60 |
| Current Status | Enabled/Disabled | Toggle button |
| Allow Manual Toggle | Permit user toggle | On/Off |
| Enabled | Call flow active | On/Off |
Destination Fields
Section titled βDestination Fieldsβ| Field | Description |
|---|---|
| Enabled Destination Type | Module when status=enabled |
| Enabled Destination Value | Target when status=enabled |
| Disabled Destination Type | Module when status=disabled |
| Disabled Destination Value | Target when status=disabled |
Destination Types
Section titled βDestination Typesβ| Type | Description |
|---|---|
| Extension | Route to extension |
| Voicemail | Route to voicemail |
| IVR | Route to IVR menu |
| Conference | Route to conference |
| Queue | Route to call queue |
| Hangup | Terminate call |
| Announcement | Play announcement |
Advanced Settings
Section titled βAdvanced Settingsβ| Field | Description | Default |
|---|---|---|
| Announcement Path (ON) | Audio file played when flow is enabled | None |
| Announcement Path (OFF) | Audio file played when flow is disabled | None |
| Play Announcement Before Transfer | Play announcement before routing call to destination | Off |
| Record Call | Record all calls routed through this call flow | Off |
| BLF Update Behavior | Sync/None BLF state update across phones | Sync |
5. Status Toggle
Section titled β5. Status ToggleβToggle Methods
Section titled βToggle Methodsβ| Method | Description |
|---|---|
| Feature Code | Dial *60 to toggle |
| BLF Button | Press button on phone |
| Admin Panel | Click toggle in UI |
| *Toggle All (81) | Toggle all flows |
Toggle Flow
Section titled βToggle FlowβUser dials *60 β βΌββββββββββββββββββββββββββββββββ call_flow.lua ββ ββ 1. Query call flow by *60 ββ 2. Current status: OFF ββ 3. Flip to: ON ββ 4. Update database ββ 5. Update BLF ββ 6. Play confirmation ββ ββββββββββββββββββββββββββββββββ β βΌStatus: ONBLF Light: Red/LitAudio: "Call flow enabled"BLF Integration
Section titled βBLF Integrationβ| Status | BLF State | Visual |
|---|---|---|
| Enabled | On | Red/Lit |
| Disabled | Off | Green/Off |
6. Common Scenarios & Examples
Section titled β6. Common Scenarios & ExamplesβScenario 1: Night Mode
Section titled βScenario 1: Night ModeβCall Flow: βNight Modeβ
| Setting | Value |
|---|---|
| Feature Code | *60 |
| Enabled Destination | Voicemail (General) |
| Disabled Destination | IVR (Main Menu) |
Usage:
- At close of business: Dial *60 β Night mode ON
- In morning: Dial *60 β Night mode OFF
Scenario 2: Holiday Routing
Section titled βScenario 2: Holiday RoutingβCall Flow: βHolidayβ
| Setting | Value |
|---|---|
| Feature Code | *61 |
| Enabled Destination | Announcement (Holiday Message) |
| Disabled Destination | IVR (Main Menu) |
Scenario 3: Emergency Overflow
Section titled βScenario 3: Emergency OverflowβCall Flow: βOverflow Modeβ
| Setting | Value |
|---|---|
| Feature Code | *62 |
| Enabled Destination | Queue (Backup Support) |
| Disabled Destination | Queue (Primary Support) |
7. Model Context Protocol (MCP) AI Integration
Section titled β7. Model Context Protocol (MCP) AI IntegrationβThe Ring2All Model Context Protocol (MCP) server provides native, granular AI tools for auditing, toggling, creating, and modifying Call Flow switches dynamically through natural language interaction. Autonomous agents and Copilots can query toggle states, perform day/night flips, adjust routing destinations, and provision new override codes while enforcing strict domain isolation and numbering collision prevention.
Available MCP Tools
Section titled βAvailable MCP Toolsβ| Tool Name | Operation | Description | Target Entity |
|---|---|---|---|
list_call_flows |
Read | Lists all Call Flows in the domain with feature extension code, current state, day/night destinations, and status | Call Flow switches |
get_call_flow_status |
Read | Retrieves detailed routing configuration and current active switch state (Normal/Day vs Override/Night) | Specific Call Flow |
create_call_flow |
Write | Provisions a new manual toggle switch with unique feature extension code and dual destinations | New Call Flow |
update_call_flow |
Write | Modifies toggle switch destinations, names, extension codes, or administrative status | Existing Call Flow |
toggle_call_flow |
Execute | Manually flips switch state (Normal/Day β Override/Night) and broadcasts real-time BLF presence | Active switch state |
delete_call_flow |
Write | Permanently removes an unreferenced Call Flow switch | Inactive Call Flow |
Protection & Validation Guards
Section titled βProtection & Validation Guardsβ- Strict Cross-Module Numbering Collision Prevention: When provisioning (
create_call_flow) or modifying feature codes (update_call_flow), theextensionis validated against the globalvalidateNumberUniquenessutility. It cannot collide with any standard SIP extension, ring group, call center queue, conference room, paging group, voicemail access code, or time condition toggle code within the same domain. - Dependency & Deletion Protection (
assertCanDeleteCallFlow): MCP guards ensure a Call Flow switch cannot be deleted if active Inbound Routes (DIDs), IVR option keys, Time Conditions, or other Call Flows route into it as their destination. - State Synchronization & Real-time BLF Broadcast: State transitions triggered via
toggle_call_flowimmediately update the PostgreSQLstatusfield and push Sofia SIP presence events (fsCommand: presence in <ext>@<domain> ...), ensuring physical IP phone LED indicators and software console displays instantly reflect the new routing state. - Multi-Tenant Domain Scoping: All operations require a verified
tenant_idanddomain_idcontext in the MCP execution context.
Example MCP Payloads
Section titled βExample MCP Payloadsβ1. Toggling Call Flow State (toggle_call_flow)
Section titled β1. Toggling Call Flow State (toggle_call_flow)β{ "identifier": "*280", "status": false}Response:
{ "success": true, "data": { "id": 14, "name": "Main Office Mode", "extension": "*280", "previousStatus": true, "currentStatus": false, "mode": "Override / Night", "activeDestination": { "module": "voicemail", "data": "2001" }, "blfUpdated": true }, "message": "Call flow '*280' successfully switched to Override/Night mode."}2. Creating a Day/Night Call Flow Switch (create_call_flow)
Section titled β2. Creating a Day/Night Call Flow Switch (create_call_flow)β{ "name": "Emergency Weather Switch", "extension": "*285", "enabledDestinationModule": "ivr", "enabledDestinationData": "Main IVR", "disabledDestinationModule": "announcement", "disabledDestinationData": "Severe Weather Closure", "status": true}Copilot Natural Language Prompts
Section titled βCopilot Natural Language Promptsβ- βShow all active call flow toggle switches and their current status (day vs night mode).β
- *βCheck the current state of call flow switch 280 and tell me which destination calls are routing to.β
- *βSwitch the βMain Office Modeβ call flow (280) to night mode immediately.β
- *βCreate a call flow named βSupport Snow Dayβ on feature code 288 that routes to Ring Group 600 normally, and to Announcement βWeather Noticeβ when toggled.β
- *βUpdate the night mode destination of call flow 280 to voicemail box 2002.β
8. Limitations & Important Notes
Section titled β8. Limitations & Important NotesβTechnical Notes
Section titled βTechnical Notesβ[!NOTE] CoS Required: Toggle actions require Class of Service permission.
[!WARNING] Both Destinations: Always configure both enabled and disabled destinations.
[!WARNING] Feature Code Unique: Ensure feature codes donβt conflict.
Best Practices
Section titled βBest Practicesβ- Clear Names: Use descriptive names like βNight Modeβ
- BLF Buttons: Assign to frequently toggled flows
- Confirm Audio: Enable toggle announcements
- Test Both States: Verify routing in both states
- Document Codes: Keep list of feature codes
9. Troubleshooting Tips
Section titled β9. Troubleshooting TipsβCommon Issues
Section titled βCommon Issuesβ| Symptom | Possible Cause | Solution |
|---|---|---|
| Toggle not working | CoS restriction | Check feature code permissions |
| Wrong destination | Status mismatch | Verify current status |
| BLF not updating | BLF behavior setting | Set to βSyncβ |
| Feature code conflict | Duplicate code | Use unique code |
| No audio | Missing audio file | Check announcement path |
Diagnostic SQL
Section titled βDiagnostic SQLβList call flows:
SELECT id, name, feature_code, status, enabled_destination_module, enabled_destination_data, disabled_destination_module, disabled_destination_dataFROM public.call_flowsWHERE domain_id = [domain_id];Check call flow status:
SELECT name, status, toggle_enabled, enabledFROM public.call_flowsWHERE domain_id = [domain_id] AND feature_code = '*60';Telephony Server Logs
Section titled βTelephony Server Logsβ# Check call flow togglegrep "CallFlow" /var/log/freeswitch/freeswitch.loggrep "call_flow.lua" /var/log/freeswitch/freeswitch.log10. Glossary
Section titled β10. Glossaryβ| Term | Definition |
|---|---|
| Call Flow | Toggleable routing switch |
| Status | Current state (enabled/disabled) |
| Feature Code | Dial code to toggle (*60) |
| Toggle | Switch between enabled/disabled |
| BLF | Busy Lamp Field - phone status light |
| Toggle All | Enable/disable all flows (*81) |
Documentation last updated: January 2026

