IVR (Interactive Voice Response) Module Documentation
Table of Contents
- Module Overview (Technical)
- Module Overview (Commercial/Business)
- Module Overview (End User/Administrator)
- Configuration Fields Reference
- IVR Options
- Destination Types
- Common Scenarios & Examples
- Limitations & Important Notes
- Troubleshooting Tips
- Glossary
---
1. Module Overview (Technical)
What Is an IVR?
An IVR (Interactive Voice Response) is an automated phone menu that plays audio prompts and routes callers based on DTMF key presses. Callers hear options like "Press 1 for Sales, Press 2 for Support" and are routed accordingly.
Architecture
Key Tables
| Table | Purpose | |
|---|---|---|
public.ivrs | IVR menu definitions | |
public.ivrs_options | DTMF options per IVR | |
public.ivr_stats | Statistics tracking | |
public.dialplan_registry | Destination lookup |
Key Files
| File | Description | |
|---|---|---|
admin/apps/web/src/modules/ivrs/ | Frontend module | |
admin/apps/web/src/i18n/en/ivrs.json | Translations | |
telephony/freeswitch/lua/main/xml_handlers/ivr/ivr.lua | Main IVR handler | |
telephony/freeswitch/lua/main/xml_handlers/routing/ivr.lua | IVR routing handler | |
telephony/freeswitch/lua/main/services/ivr_stats_logger.lua | Statistics logger |
2. Module Overview (Commercial/Business)
Business Value
IVRs provide automated call routing:
| Without IVR | With IVR | |
|---|---|---|
| Receptionist answers every call | Automated menu routing | |
| Manual transfers | Self-service navigation | |
| Limited hours | 24/7 availability | |
| Inconsistent experience | Professional greeting |
Use Cases
- Main Auto-Attendant
- Route to departments
- After-Hours Greeting
- Offer voicemail
- Multi-Level Menus
- Support → Billing/Technical
- Language Selection
- Route to language-specific queues
Feature Highlights
| Feature | Benefit | |
|---|---|---|
| Custom Prompts | Branded audio messages | |
| Multiple Options | 0-9, , # for routing | |
| Nested IVRs | Multi-level menus | |
| Direct Dial | Dial extensions from IVR | |
| Timeout Handling | Default destination | |
| Failure Handling | Max retries limit | |
| Statistics | Track usage patterns |
3. Module Overview (End User/Administrator)
What Can You Do?
- Create IVR menus with audio prompts
- Configure multiple DTMF options
- Set timeout and retry limits
- Route to extensions, queues, other IVRs
- Enable direct extension dialing
- Track IVR statistics
Administrator Workflow
Quick Tips
TIP
Keep Menus Short: 3-5 options is ideal for caller retention.TIP
Option 0 = Operator: Standard convention for reaching a human.CAUTION
Audio File Quality: Use clear, professional recordings.---
4. Configuration Fields Reference
General Settings
| Field | Description | Default | |
|---|---|---|---|
| Name | IVR identifier | Required | |
| Welcome Message | First audio played | ivr-welcome.wav | |
| Instructions | Menu options audio | ivr-instructions.wav | |
| Invalid Message | For wrong input | ivr-invalid.wav | |
| Exit Message | When exiting IVR | ivr-goodbye.wav | |
| Timeout (seconds) | Wait for input | 5 | |
| Max Failures | Invalid attempts | 3 | |
| Max Timeouts | Timeout attempts | 3 | |
| Enabled | IVR active | On |
Advanced Settings
| Field | Description | Default | |
|---|---|---|---|
| Inter-Digit Timeout | Between digits (ms) | 2000 | |
| Min Digits | Minimum input | 1 | |
| Max Digits | Maximum input | 1 | |
| Allow Direct Dial | Dial extensions | Off | |
| Track Statistics | Log usage | Off | |
| Record Session | Record interaction | Off | |
| Max Call Duration | Session limit | None | |
| Event Webhook | API notification | None |
Destination Settings
| Field | Description | |
|---|---|---|
| Timeout Destination | Route when no input | |
| Failure Destination | Route after max failures | |
| Background Music | Loop during wait |
5. IVR Options
Option Configuration
Each IVR can have multiple options:
| Field | Description | Example | |
|---|---|---|---|
| Digits | DTMF trigger | 1, 2, , # | |
| Destination | Where to route | Sales Queue | |
| Enabled | Option active | On/Off | |
| Priority | Evaluation order | 1, 2, 3 |
Common Digit Mappings
| Digit | Typical Use | |
|---|---|---|
| 1 | Sales / First option | |
| 2 | Support / Second option | |
| 3 | Billing / Third option | |
| 0 | Operator / Live person | |
| Repeat menu | ||
| # | Exit / Main menu | |
| 9 | Directory / Dial by name |
Example Option Set
---
6. Destination Types
Available Destinations
| Type | Description | Example | |
|---|---|---|---|
| Extension | Route to extension | 1001 | |
| Queue | Route to call center queue | Sales Queue | |
| IVR | Route to another IVR | Billing Menu | |
| Ring Group | Route to ring group | Support Team | |
| Conference | Route to conference | Meeting Room | |
| Voicemail | Route to voicemail | General Mailbox | |
| Direct Route | External number | +15055551234 | |
| Announcement | Play audio, hangup | After-hours | |
| Feature Code | Execute feature | 70 (echo test) |
Transfer Actions
When an option is selected, the IVR can:
- Transfer - Route to destination
- IVR - Enter nested IVR menu
- Repeat - Replay current menu
---
7. Common Scenarios & Examples
Scenario 1: Simple Auto-Attendant
IVR: "Main Menu"| Setting | Value | |
|---|---|---|
| Welcome | "Thank you for calling ABC Company" | |
| Instructions | "For Sales press 1, Support press 2, Operator press 0" | |
| Timeout | 5 seconds | |
| Max Failures | 3 |
| Digit | Destination | |
|---|---|---|
| 1 | Sales Queue | |
| 2 | Support Queue | |
| 0 | Extension 1000 |
Scenario 2: Multi-Level Menu
IVR: "Main Menu"| Digit | Destination | |
|---|---|---|
| 1 | Sales IVR | |
| 2 | Support IVR |
| Digit | Destination | |
|---|---|---|
| 1 | New Customers Queue | |
| 2 | Existing Customers Queue | |
| Main Menu (parent) |
Scenario 3: After-Hours IVR
IVR: "After Hours"| Setting | Value | |
|---|---|---|
| Welcome | "Thank you for calling. Our office is closed." | |
| Instructions | "Leave a message after the tone, press 0 for emergency" | |
| Timeout Destination | General Voicemail |
| Digit | Destination |
|---|---|
| 0 | On-Call Extension |
8. Limitations & Important Notes
Technical Notes
NOTE
DTMF Interruption: Callers can press a digit during prompt playback.WARNING
Audio File Paths: Ensure audio files exist in the language directory.WARNING
Context Registration: IVR context must be in dialplan_registry.Best Practices
- Professional Audio: Use quality recordings
- Short Menus: 3-5 options maximum
- Consistent Layout: Option 0 = Operator
- Timeout Handling: Always set default destination
- Test Thoroughly: Verify all paths work
- Track Statistics: Enable for optimization
---
9. Troubleshooting Tips
Common Issues
| Symptom | Possible Cause | Solution | |
|---|---|---|---|
| No audio | Wrong path | Check audio file exists | |
| DTMF ignored | Timing issue | Increase timeout | |
| Wrong destination | Option misconfigured | Check option mapping | |
| Loops | Circular IVR reference | Review IVR destinations | |
| No answer | IVR not enabled | Enable IVR |
Diagnostic SQL
List IVRs: Check IVR options: Check IVR statistics:FreeSWITCH Logs
---
10. Glossary
| Term | Definition | |
|---|---|---|
| IVR | Interactive Voice Response - automated phone menu | |
| DTMF | Dual-Tone Multi-Frequency - key press tones | |
| Context | IVR identifier for routing | |
| Option | DTMF digit + destination mapping | |
| Nested IVR | IVR within IVR (sub-menu) | |
| Timeout | No input wait time | |
| Max Failures | Invalid input limit |
Lua Script Status ✅
All Scripts Already Correct
| Script | Status | |
|---|---|---|
ivr/ivr.lua | ✅ Uses public.domains, public.ivrs, public.ivrs_options, public.dialplan_registry, public.direct_dial | |
routing/ivr.lua | ✅ Routing handler | |
ivr_stats_logger.lua | ✅ Statistics logger |
---
Documentation last updated: January 2026*