Callback System Module Documentation
Table of Contents
- Module Overview (Technical)
- Module Overview (Commercial/Business)
- Module Overview (End User/Administrator)
- Callback Rules Configuration
- Callback Profiles Configuration
- Call Flow / Logic Explanation
- Common Scenarios & Examples
- Limitations & Important Notes
- Troubleshooting Tips
- Glossary
---
1. Module Overview (Technical)
What Is the Callback System?
The Callback System provides automated call-back functionality with two main components:
- Callback Rules: User-triggered callbacks via dial codes
- Callback Profiles: Queue-integrated callbacks (caller presses key to request callback instead of waiting)
Architecture
Key Tables
| Table | Purpose | |
|---|---|---|
public.callback_rules | Callback rule definitions | |
public.callback_profiles | Queue callback policies | |
public.scheduled_calls | Pending callback queue |
Key Files
| File | Description | |
|---|---|---|
admin/apps/web/src/modules/callbackRules/ | Callback Rules frontend | |
admin/apps/web/src/modules/callbackProfiles/ | Callback Profiles frontend | |
telephony/freeswitch/lua/main/xml_handlers/callback/callback.lua | Rule trigger handler | |
telephony/freeswitch/lua/main/xml_handlers/callback/callback_handler.lua | Execution handler | |
telephony/freeswitch/lua/main/services/queue_callback_dispatcher.lua | Queue callback dispatcher |
2. Module Overview (Commercial/Business)
Business Value
Callbacks improve customer experience and operational efficiency:
| Without Callbacks | With Callbacks | |
|---|---|---|
| Caller waits on hold | Caller can hang up and receive callback | |
| Frustrating hold times | Free to do other things | |
| High abandonment rates | Improved customer satisfaction | |
| Wasted agent time | Efficient queue management |
Use Cases
- Queue Callbacks
- Reduces hold times and abandonment
- Scheduled Callbacks
- Service reminders
- Emergency Callbacks
- VIP customer service
- External Integration
- CRM-initiated callbacks
Feature Highlights
| Feature | Benefit | |
|---|---|---|
| Delay Timer | Schedule callback after X seconds | |
| Retry Logic | Automatic retry if no answer | |
| CoS Restriction | Limit who can use callbacks | |
| Notifications | Email/API confirmation | |
| Queue Integration | Seamless queue callback option |
3. Module Overview (End User/Administrator)
What Can You Do?
Callback Rules:- Create dial codes that trigger callbacks
- Set delay before callback execution
- Configure retry attempts and timeouts
- Restrict usage by Class of Service
- Create reusable callback policies for queues
- Configure DTMF key to request callback
- Set timeout and retry intervals
- Assign profiles to queues
Administrator Workflow (Callback Rule)
Quick Tips
TIP
Delay Seconds: Short delay (10-30s) for immediate response, longer (300s+) for scheduled callbacks.TIP
Retry Count: Set 2-3 retries to handle missed calls.CAUTION
CoS Restriction: Always restrict if callback incurs costs (external numbers).---
4. Callback Rules Configuration
Fields Reference
| Field | Description | Example | Required | |
|---|---|---|---|---|
| Callback Number | Dial code to trigger | 88, #99 | Yes | |
| Name | Friendly name | Sales Callback | Yes | |
| Destination Module | Type of destination | Queue, Extension, External | Yes | |
| Destination Value | Target identifier | sales_queue, 1001 | Yes | |
| Delay (seconds) | Wait before callback | 30 | Yes | |
| Retry Count | Retry attempts | 3 | Yes | |
| Max Wait Time | Ring time per attempt | 60 | Yes | |
| Dial Prefix | Prefix for dialing | 9 | No | |
| Class of Service | Access restriction | Standard | No | |
| Allowed Callers | Permitted extensions | 1001, 1002 | No | |
| Record Callback | Record the call | On/Off | No | |
| Hangup After | Auto hangup when done | On/Off | No |
Destination Modules
| Module | Description | |
|---|---|---|
| Extension | Call back to specific extension | |
| Queue | Route to call queue | |
| External | Call external number | |
| Ring Group | Route to ring group | |
| IVR | Send to IVR menu |
Callback Strategies
| Strategy | Description | |
|---|---|---|
| Immediate | Execute callback right away (after delay) | |
| Scheduled | Schedule for specific time | |
| Queue | Place in queue dispatcher |
5. Callback Profiles Configuration
What Are Callback Profiles?
Callback Profiles are reusable policies attached to queues. When enabled, callers in queue can press a DTMF key to request a callback instead of waiting.
Fields Reference
| Field | Description | Example | |
|---|---|---|---|
| Profile Name | Identifier | Standard Callback | |
| DTMF Key | Key to request callback | 1 | |
| Confirm Sound | Confirmation audio | callback_confirm.wav | |
| Thanks Sound | Acknowledgment audio | callback_thanks.wav | |
| Timeout (seconds) | How long request is valid | 3600 | |
| Retry Interval | Time between retries | 300 | |
| Max Attempts | Maximum retry count | 3 | |
| Strategy | Routing strategy | same-queue, overflow, any-agent | |
| Announcement Sound | Pre-callback audio | callback_announce.wav | |
| Enabled | Active status | On/Off |
Strategies
| Strategy | Description | |
|---|---|---|
| same-queue | Return caller to the same queue | |
| overflow | Use overflow queue if primary full | |
| any-agent | Route to first available agent |
6. Call Flow / Logic Explanation
Callback Rule Flow
Queue Callback Flow
---
7. Common Scenarios & Examples
Scenario 1: Sales Callback Request
Callback Rule:| Setting | Value | |
|---|---|---|
| Callback Number | 88 | |
| Name | Sales Callback | |
| Destination | Queue: sales_queue | |
| Delay | 30 seconds | |
| Retry Count | 3 |
Scenario 2: Queue Callback Option
Profile attached to support queue:| Setting | Value | |
|---|---|---|
| DTMF Key | 1 | |
| Strategy | same-queue | |
| Max Attempts | 3 | |
| Retry Interval | 300 seconds |
Scenario 3: VIP Callback Line
Callback Rule with CoS restriction:| Setting | Value | |
|---|---|---|
| Callback Number | 99 | |
| Name | VIP Callback | |
| Destination | Extension: 5000 (VIP line) | |
| Class of Service | VIP | |
| Delay | 0 (immediate) |
---
8. Limitations & Important Notes
Technical Limitations
WARNING
Dispatcher Running: Callback dispatcher service must be running for scheduled callbacks to execute.WARNING
External Costs: Callbacks to external numbers incur call costs—restrict with CoS if needed.IMPORTANT
Retry Limits: After max retries, callback is marked as failed.Best Practices
- Reasonable Delays: 10-60 seconds for immediate, 300+ for scheduled
- Limit Retries: 2-3 retries is usually sufficient
- Restrict External: Use CoS for external number callbacks
- Monitor Failed: Check failed callbacks regularly
- Test Thoroughly: Verify callbacks work before production
---
9. Troubleshooting Tips
Common Issues
| Symptom | Possible Cause | Solution | |
|---|---|---|---|
| Callback not triggered | Rule disabled | Enable the rule | |
| "Not authorized" | CoS mismatch | Check Class of Service | |
| No callback received | Dispatcher not running | Start dispatcher service | |
| Callback loops | Wrong destination | Verify destination config | |
| All retries failed | Destination unreachable | Check destination availability |
Diagnostic SQL
List callback rules: Check pending callbacks:---
10. Glossary
| Term | Definition | |
|---|---|---|
| Callback Rule | Configuration that triggers callback when dial code is used | |
| Callback Profile | Reusable callback policy for queues | |
| Dispatcher | Service that executes scheduled callbacks | |
| DTMF Key | Phone key pressed to request callback (1, 2, etc.) | |
| Delay Seconds | Time to wait before executing callback | |
| Retry Count | Number of callback attempts if no answer | |
| Loopback | FreeSWITCH mechanism to originate internal calls | |
| Scheduled Call | Callback request stored for future execution |
Lua Script Status ✅
Integration Module
| Component | Status | Location |
|---|---|---|
| Callback Handler | ✅ Active | app/callback/callback_system.lua |