Call Flows Module Documentation
Table of Contents
- Module Overview (Technical)
- Module Overview (Commercial/Business)
- Module Overview (End User/Administrator)
- Configuration Fields Reference
- Status Toggle
- Common Scenarios & Examples
- Limitations & Important Notes
- Troubleshooting Tips
- Glossary
---
1. Module Overview (Technical)
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
Key Tables
| Table | Purpose | |
|---|---|---|
public.call_flows | Call flow definitions and status | |
public.domains | Domain resolution | |
public.sip_extensions | Extension CoS lookup | |
public.feature_code_numbers | Feature code validation | |
public.feature_code_cos_members | CoS permissions |
Key Files
| File | Description | |
|---|---|---|
admin/apps/web/src/modules/callFlows/ | Frontend module | |
admin/apps/web/src/i18n/en/callFlows.json | Translations | |
telephony/freeswitch/lua/main/xml_handlers/call_flow/call_flow.lua | Main handler | |
telephony/freeswitch/lua/main/xml_handlers/routing/call_flow.lua | Routing handler |
2. Module Overview (Commercial/Business)
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
- Night Mode
- Disable: Route to normal IVR
- Holiday Routing
- Disable: Route to standard menu
- Emergency Overflow
- Disable: Route to primary queue
- Do Not Disturb
- Disable: Route to extension
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)
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
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
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
| 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
| 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
| Field | Description | Default | |
|---|---|---|---|
| Description | Optional notes | - | |
| Announcement Path (ON) | Audio when enabled | None | |
| Announcement Path (OFF) | Audio when disabled | None | |
| Play Announcement | Before transfer | Off | |
| Auto-Schedule Enabled | Time-based toggle | Off | |
| BLF Update Behavior | Sync/Manual/None | Sync | |
| State Change Webhook | Notification URL | None | |
| Restrict Toggle To | Extension whitelist | None | |
| Record Call | Record routed calls | Off | |
| Max Call Duration | Time limit | None |
5. Status Toggle
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
BLF Integration
| Status | BLF State | Visual | |
|---|---|---|---|
| Enabled | On | Red/Lit | |
| Disabled | Off | Green/Off |
6. Common Scenarios & Examples
Scenario 1: Night Mode
Call Flow: "Night Mode"| Setting | Value | |
|---|---|---|
| Feature Code | 60 | |
| Enabled Destination | Voicemail (General) | |
| Disabled Destination | IVR (Main Menu) |
- At close of business: Dial 60 → Night mode ON
- In morning: Dial 60 → Night mode OFF
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
Call Flow: "Overflow Mode"| Setting | Value | |
|---|---|---|
| Feature Code | 62 | |
| Enabled Destination | Queue (Backup Support) | |
| Disabled Destination | Queue (Primary Support) |
7. Limitations & Important Notes
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
- 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
---
8. Troubleshooting Tips
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
List call flows: Check call flow status:FreeSWITCH Logs
---
9. 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) |
Lua Script Status ✅
Fixed in This Session
| Script | Status |
|---|---|
call_flow/call_flow.lua | ✅ Fixed: Changed from core.call_flows, core.tenants, core.sip_users, core.feature_code_ to public.call_flows, public.domains, public.sip_extensions, public.feature_code_. Also fixed tenant_id to domain_id and update_at to updated_at. |
---
Documentation last updated: January 2026