Emergency Numbers Module Documentation
Table of Contents
- Module Overview (Technical)
- Module Overview (Commercial/Business)
- Module Overview (End User/Administrator)
- Configuration Fields Reference
- Compliance Requirements
- Common Scenarios & Examples
- Limitations & Important Notes
- Troubleshooting Tips
- Glossary
---
1. Module Overview (Technical)
What Are Emergency Numbers?
Emergency Numbers is an E911 compliance module that configures how emergency calls (911, 933, 112, etc.) are routed. It ensures compliance with Kari's Law and RAY BAUM's Act, providing proper caller ID, notifications, and call recording for emergency calls.
Architecture
┌─────────────────────────────────────────────────────────────────┐
│ Emergency Number Routing │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Extension dials 911 │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ routing/emergency.lua │ │
│ │ │ │
│ │ 1. Check if common emergency number (911, 933, etc.) │ │
│ │ 2. Query public.emergency_numbers for configuration │ │
│ │ 3. Generate dialplan XML │ │
│ │ 4. Route to e911_handler.lua │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ e911_handler.lua │ │
│ │ │ │
│ │ - Override Caller ID with E911 location info │ │
│ │ - Start call recording (if enabled) │ │
│ │ - Send notifications (email, webhook) │ │
│ │ - Route via configured gateway/trunk │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ Emergency Services (PSAP) │
│ │
└─────────────────────────────────────────────────────────────────┘
Key Tables
| Table | Purpose |
|---|
public.emergency_numbers | Emergency number configurations | |
public.domains | Domain resolution |
Key Files
| File | Description |
|---|
modules/emergencyNumbers/EmergencyNumbersPage.tsx | Frontend page | |
modules/emergencyNumbers/EmergencyNumberFormView.tsx | Configuration form | |
lua/main/xml_handlers/routing/emergency.lua | Initial routing handler | |
lua/main/xml_handlers/emergency/e911_handler.lua | E911 call handler |
---
2. Module Overview (Commercial/Business)
Business Value
Emergency Numbers provides E911 compliance:
| Without E911 Config | With E911 Config |
|---|
| No location info | E911 CID with location | |
| No notifications | Email/webhook alerts | |
| No recording | Automatic recording | |
| Non-compliant | Kari's Law compliant |
Regulatory Compliance
| Regulation | Description |
|---|
| Kari's Law | Requires direct 911 dialing, notification to on-site personnel | |
| RAY BAUM's Act | Requires dispatchable location info with 911 calls |
Use Cases
- Enterprise E911
- Multi-location offices
- Location-based caller ID
- Test Mode (933)
- Verify E911 routing
- Test without calling actual 911
- Notification Alerts
- Alert security when 911 dialed
- Webhook to monitoring system
- Call Recording
- Record all emergency calls
- Compliance documentation
Feature Highlights
| Feature | Benefit |
|---|
| E911 CID Override | Location info to PSAP | |
| Forced Recording | Compliance documentation | |
| Notifications | Alert on-site personnel | |
| Test Mode | 933 for testing | |
| Multi-Country | 911, 112, 999, 000 support |
---
3. Module Overview (End User/Administrator)
What Can You Do?
- Configure emergency numbers (911, 112, etc.)
- Set location-based caller ID
- Enable automatic recording
- Configure notifications
- Set up test mode (933)
- Route via specific gateway/trunk
Emergency Number Configuration
┌─────────────────────────────────────────────────────────────────┐
│ Configure Emergency Number │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Section: Basic Configuration │
│ ├─ Emergency Number: 911 │
│ ├─ Description: US Emergency Services │
│ ├─ Country Code: US │
│ └─ Enabled: ✓ │
│ │
│ Section: Routing Configuration │
│ ├─ Route Type: Gateway │
│ └─ Gateway: [Primary SIP Trunk ▼] │
│ │
│ Section: Caller ID Override │
│ ├─ Override Caller ID: ✓ │
│ ├─ Emergency CID Number: +13055551234 │
│ └─ Emergency CID Name: Acme Corp - Main Building │
│ │
│ Section: Recording & Notifications │
│ ├─ Force Call Recording: ✓ │
│ ├─ Enable Notifications: ✓ │
│ ├─ Notification Emails: security@acme.com │
│ └─ Notify Extensions: 1001, 1002 │
│ │
│ Section: Test Mode (933) │
│ ├─ Enable Test Mode: ☐ │
│ └─ Test Number: 933 │
│ │
│ [Save] [Cancel] │
│ │
└─────────────────────────────────────────────────────────────────┘
Quick Tips
TIP
Test First: Use 933 test mode before going live with 911.
TIP
Include Location: E911 CID Name should include building/floor info.
CAUTION
Critical Module: Misconfiguration can affect emergency services.
---
4. Configuration Fields Reference
Basic Configuration
| Field | Description | Example |
|---|
| Emergency Number | Number to route | 911 | |
| Description | Purpose description | US Emergency | |
| Country Code | Country | US | |
| Enabled | Active status | On/Off |
Routing Configuration
| Field | Description |
|---|
| Route Type | Gateway, Trunk, or Direct | |
| Gateway | SIP gateway for routing | |
| Trunk ID | Specific trunk ID | |
| Direct Number | Direct dial number |
Caller ID Override
| Field | Description | Example |
|---|
| Override Caller ID | Enable E911 CID | On/Off | |
| Emergency CID Number | Number sent to PSAP | +13055551234 | |
| Emergency CID Name | Name with location | Acme - Floor 3 |
Recording & Notifications
| Field | Description |
|---|
| Force Call Recording | Record all 911 calls | |
| Enable Notifications | Send alerts | |
| Notification Emails | Email recipients | |
| Notify Extensions | Extensions to alert | |
| Webhooks | External notification URLs |
Test Mode
| Field | Description |
|---|
| Enable Test Mode | Use test number instead | |
| Test Number | Test destination (933) |
---
5. Compliance Requirements
Kari's Law Requirements
| Requirement | Implementation |
|---|
| Direct dialing | No prefix needed for 911 | |
| Notification | Email/webhook on 911 dial | |
| On-site alert | Notify extensions |
RAY BAUM's Act Requirements
| Requirement | Implementation |
|---|
| Dispatchable location | E911 CID includes address | |
| Multi-line systems | Per-location caller ID | |
| VoIP systems | Location-based routing |
Best Practices
- Location Info: Include building/floor/room in CID name
- Regular Testing: Test 933 quarterly
- Multiple Notifications: Email + on-site + webhook
- Recording: Keep recordings for compliance
- Documentation: Maintain E911 records
---
6. Common Scenarios & Examples
Scenario 1: Single Office E911
Emergency Number: 911
| Setting | Value |
|---|
| Route Type | Gateway | |
| Gateway | Primary SIP Trunk | |
| Override CID | ✓ | |
| CID Number | +13055551234 | |
| CID Name | Acme Corp - Miami Office | |
| Force Recording | ✓ | |
| Notify Emails | security@acme.com |
Scenario 2: Multi-Location E911
Per-Location Configuration:
| Location | CID Name |
|---|
| Main Building | Acme - Main Bldg 1st Fl | |
| Warehouse | Acme - Warehouse | |
| Remote Office | Acme - Remote Site |
Scenario 3: Test Mode Configuration
For Testing:
| Setting | Value |
|---|
| Enable Test Mode | ✓ | |
| Test Number | 933 |
Users dial 911 → routed to 933 for testing.
Scenario 4: International Emergency
Emergency Number: 112 (Europe)
| Setting | Value |
|---|
| Number | 112 | |
| Country Code | EU | |
| Route Type | Gateway |
---
7. Limitations & Important Notes
Technical Notes
IMPORTANT
Critical System: Emergency number configuration must be tested and verified.
WARNING
Location Updates: Update E911 CID when moving locations.
WARNING
Gateway Availability: Emergency routes should use highly available gateways.
Supported Emergency Numbers
| Number | Region |
|---|
| 911 | USA, Canada | |
| 933 | USA (Test) | |
| 112 | Europe, Asia | |
| 999 | UK, Asia | |
| 000 | Australia |
Best Practices
- Test Regularly: Use 933 test mode
- Redundant Routes: Failover gateways
- Update CID: When location changes
- Train Users: Emergency procedures
- Document: Keep compliance records
---
8. Troubleshooting Tips
Common Issues
| Symptom | Possible Cause | Solution |
|---|
| 911 not routed | Not configured | Add emergency number config | |
| Wrong location | Old CID | Update E911 CID | |
| No notifications | Not enabled | Enable notifications | |
| Test mode active | Forgot to disable | Disable test mode | |
| Gateway failure | Down gateway | Configure failover |
Diagnostic SQL
List emergency numbers:
SELECT id, number, enabled, test_mode, emergency_cid_number, emergency_cid_name
FROM public.emergency_numbers
WHERE domain_id = [domain_id];
FreeSWITCH Logs
# Check emergency routing
grep "Emergency Routing" /var/log/freeswitch/freeswitch.log
grep "911\|933" /var/log/freeswitch/freeswitch.log
---
9. Glossary
| Term | Definition |
|---|
| E911 | Enhanced 911 with location | |
| PSAP | Public Safety Answering Point | |
| Kari's Law | US 911 direct dial law | |
| RAY BAUM's Act | US location requirements | |
| CID | Caller ID | |
| 933 | 911 test number |
---
Lua Script Status ✅
Fixed
| Script | Status |
|---|
routing/emergency.lua | ✅ Fixed to use public.domains, public.emergency_numbers |
Lua script fixed for public. schema compliance!
---
Documentation last updated: January 2026