Ctrl K
ring2all.com

Emergency Numbers Module Documentation

Table of Contents

  1. Module Overview (Technical)
  2. Module Overview (Commercial/Business)
  3. Module Overview (End User/Administrator)
  4. Configuration Fields Reference
  5. Compliance Requirements
  6. Common Scenarios & Examples
  7. Limitations & Important Notes
  8. Troubleshooting Tips
  9. 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

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│                 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

TablePurpose
public.emergency_numbersEmergency number configurations
public.domainsDomain resolution

Key Files

FileDescription
modules/emergencyNumbers/EmergencyNumbersPage.tsxFrontend page
modules/emergencyNumbers/EmergencyNumberFormView.tsxConfiguration form
lua/main/xml_handlers/routing/emergency.luaInitial routing handler
lua/main/xml_handlers/emergency/e911_handler.luaE911 call handler
---

2. Module Overview (Commercial/Business)

Business Value

Emergency Numbers provides E911 compliance:

Without E911 ConfigWith E911 Config
No location infoE911 CID with location
No notificationsEmail/webhook alerts
No recordingAutomatic recording
Non-compliantKari's Law compliant

Regulatory Compliance

RegulationDescription
Kari's LawRequires direct 911 dialing, notification to on-site personnel
RAY BAUM's ActRequires dispatchable location info with 911 calls

Use Cases

  1. Enterprise E911
- Multi-location offices

- Location-based caller ID

  1. Test Mode (933)
- Verify E911 routing

- Test without calling actual 911

  1. Notification Alerts
- Alert security when 911 dialed

- Webhook to monitoring system

  1. Call Recording
- Record all emergency calls

- Compliance documentation

Feature Highlights

FeatureBenefit
E911 CID OverrideLocation info to PSAP
Forced RecordingCompliance documentation
NotificationsAlert on-site personnel
Test Mode933 for testing
Multi-Country911, 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

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              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

FieldDescriptionExample
Emergency NumberNumber to route911
DescriptionPurpose descriptionUS Emergency
Country CodeCountryUS
EnabledActive statusOn/Off

Routing Configuration

FieldDescription
Route TypeGateway, Trunk, or Direct
GatewaySIP gateway for routing
Trunk IDSpecific trunk ID
Direct NumberDirect dial number

Caller ID Override

FieldDescriptionExample
Override Caller IDEnable E911 CIDOn/Off
Emergency CID NumberNumber sent to PSAP+13055551234
Emergency CID NameName with locationAcme - Floor 3

Recording & Notifications

FieldDescription
Force Call RecordingRecord all 911 calls
Enable NotificationsSend alerts
Notification EmailsEmail recipients
Notify ExtensionsExtensions to alert
WebhooksExternal notification URLs

Test Mode

FieldDescription
Enable Test ModeUse test number instead
Test NumberTest destination (933)
---

5. Compliance Requirements

Kari's Law Requirements

RequirementImplementation
Direct dialingNo prefix needed for 911
NotificationEmail/webhook on 911 dial
On-site alertNotify extensions

RAY BAUM's Act Requirements

RequirementImplementation
Dispatchable locationE911 CID includes address
Multi-line systemsPer-location caller ID
VoIP systemsLocation-based routing

Best Practices

  1. Location Info: Include building/floor/room in CID name
  2. Regular Testing: Test 933 quarterly
  3. Multiple Notifications: Email + on-site + webhook
  4. Recording: Keep recordings for compliance
  5. Documentation: Maintain E911 records

---

6. Common Scenarios & Examples

Scenario 1: Single Office E911

Emergency Number: 911
SettingValue
Route TypeGateway
GatewayPrimary SIP Trunk
Override CID
CID Number+13055551234
CID NameAcme Corp - Miami Office
Force Recording
Notify Emailssecurity@acme.com

Scenario 2: Multi-Location E911

Per-Location Configuration:
LocationCID Name
Main BuildingAcme - Main Bldg 1st Fl
WarehouseAcme - Warehouse
Remote OfficeAcme - Remote Site

Scenario 3: Test Mode Configuration

For Testing:
SettingValue
Enable Test Mode
Test Number933
Users dial 911 → routed to 933 for testing.

Scenario 4: International Emergency

Emergency Number: 112 (Europe)
SettingValue
Number112
Country CodeEU
Route TypeGateway
---

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

NumberRegion
911USA, Canada
933USA (Test)
112Europe, Asia
999UK, Asia
000Australia

Best Practices

  1. Test Regularly: Use 933 test mode
  2. Redundant Routes: Failover gateways
  3. Update CID: When location changes
  4. Train Users: Emergency procedures
  5. Document: Keep compliance records

---

8. Troubleshooting Tips

Common Issues

SymptomPossible CauseSolution
911 not routedNot configuredAdd emergency number config
Wrong locationOld CIDUpdate E911 CID
No notificationsNot enabledEnable notifications
Test mode activeForgot to disableDisable test mode
Gateway failureDown gatewayConfigure failover

Diagnostic SQL

List emergency numbers:

Sql
SELECT id, number, enabled, test_mode, emergency_cid_number, emergency_cid_name
FROM public.emergency_numbers
WHERE domain_id = [domain_id];

FreeSWITCH Logs

Bash
# Check emergency routing
grep "Emergency Routing" /var/log/freeswitch/freeswitch.log
grep "911\|933" /var/log/freeswitch/freeswitch.log

---

9. Glossary

TermDefinition
E911Enhanced 911 with location
PSAPPublic Safety Answering Point
Kari's LawUS 911 direct dial law
RAY BAUM's ActUS location requirements
CIDCaller ID
933911 test number
---

Lua Script Status ✅

Fixed

ScriptStatus
routing/emergency.lua✅ Fixed to use public.domains, public.emergency_numbers
Lua script fixed for public. schema compliance!

---

Documentation last updated: January 2026
AI Assistant

👋 Hello! I'm your Ring2All documentation assistant. I can help you find information about configuring and using the Ring2All PBX platform.

How can I help you today?