Ctrl K
ring2all.com

ESL Users Module Documentation

Table of Contents

  1. Module Overview (Technical)
  2. Module Overview (Commercial/Business)
  3. Module Overview (End User/Administrator)
  4. Configuration Fields
  5. Common Scenarios & Examples
  6. Limitations & Important Notes
  7. Troubleshooting Tips
  8. Glossary

---

1. Module Overview (Technical)

What Are ESL Users?

ESL Users is a FreeSWITCH Event Socket Layer configuration module that manages users who can connect to FreeSWITCH via the Event Socket interface. ESL provides programmatic access to FreeSWITCH for sending commands and receiving real-time events.

Architecture

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│                   ESL Users Architecture                       │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  External Applications                                          │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │  Call Center Dashboard                                   │   │
│  │  Real-time Monitoring                                    │   │
│  │  Custom Integrations                                     │   │
│  │  Third-party CRM                                         │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │ ESL Connection                                         │
│       ▼                                                         │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        FreeSWITCH Event Socket                           │   │
│  │                                                          │   │
│  │  Listen IP: :: (all interfaces)                         │   │
│  │  Listen Port: 8021                                       │   │
│  │                                                          │   │
│  │  Authentication:                                         │   │
│  │  ├─ Username / Password                                 │   │
│  │  ├─ Allowed IP / CIDR Range                             │   │
│  │  └─ ACL Restrictions                                     │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼ Events & Commands                                      │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        FreeSWITCH Core                                   │   │
│  │                                                          │   │
│  │  Channel Events → ESL Client                            │   │
│  │  Commands ← ESL Client                                   │   │
│  │  API Responses → ESL Client                             │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Key Tables

TablePurpose
public.esl_usersESL user credentials and settings

Key Files

FileDescription
modules/eslUsers/Frontend module
FreeSWITCH event_socket.conf.xmlGenerated configuration
---

2. Module Overview (Commercial/Business)

Business Value

ESL Users provides secure programmatic access:

Without ESL UsersWith ESL Users
Single passwordPer-user credentials
No IP restrictionIP-based security
All eventsFiltered events
No audit trailUser tracking

Use Cases

  1. Real-time Dashboards
- Live call monitoring

- Queue statistics

  1. CRM Integration
- Click-to-call

- Screen pops

  1. Custom Applications
- Call recording control

- IVR automation

  1. Third-party Tools
- Billing systems

- Reporting tools

Feature Highlights

FeatureBenefit
Per-User AuthIndividual credentials
IP RestrictionsNetwork security
Access ModesInbound/Outbound/Embedded
Event FiltersLimit events received
ACL SupportFreeSWITCH ACL integration
Enable/DisableQuick access control
---

3. Module Overview (End User/Administrator)

What Can You Do?

  • Create ESL user accounts
  • Set username/password credentials
  • Configure allowed IP addresses
  • Select access mode
  • Filter event subscriptions
  • Configure listen IP/port
  • Enable/disable users

ESL Users Interface

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              ESL Users                                          │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Manage Event Socket Layer users for FreeSWITCH connections.   │
│                                                                 │
│  [+ Add]                                                        │
│                                                                 │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │ Username    │ Access Mode │ Allowed IP   │ Enabled │ Updated│ │
│  ├─────────────┼─────────────┼──────────────┼─────────┼───────┤  │
│  │ dashboard   │ Inbound     │ 192.168.1.0/24│ ✓      │ 2h ago│  │
│  │ crm-app     │ Inbound     │ 10.0.0.50    │ ✓      │ 1d ago│  │
│  │ billing     │ Inbound     │ 0.0.0.0/0    │ ☐      │ 5d ago│  │
│  └───────────────────────────────────────────────────────────┘  │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

User Edit View

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Edit ESL User                                      │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  General                                                        │
│                                                                 │
│  Username: [dashboard                      ]                   │
│    ESL login name for Event Socket connection.                  │
│                                                                 │
│  Password: [••••••••••                     ]                   │
│    Leave empty to keep current password.                        │
│                                                                 │
│  Access Mode: [Inbound ▼]                                      │
│    ├─ Inbound (clients connect to FreeSWITCH)                  │
│    ├─ Outbound (FreeSWITCH connects to clients)                │
│    └─ Embedded (within FreeSWITCH process)                     │
│                                                                 │
│  Allowed IP / Range: [192.168.1.0/24       ]                   │
│    IP address or CIDR range allowed to connect.                 │
│                                                                 │
│  Enabled: ✓                                                     │
│                                                                 │
│  ──────────────────────────────────────────────────────────────│
│                                                                 │
│  Security                                                       │
│                                                                 │
│  Listen IP: [::                           ]                    │
│    IP address where ESL listener binds.                         │
│                                                                 │
│  Listen Port: [8021                       ]                    │
│    Port number used by ESL listener.                            │
│                                                                 │
│  NAT Map: ☐                                                    │
│  Apply Inbound ACL: [default               ]                   │
│  Stop on Bind Error: ✓                                         │
│                                                                 │
│  ──────────────────────────────────────────────────────────────│
│                                                                 │
│  Event Filters: [🔧 Select FreeSWITCH events ]                 │
│    12 event(s) selected.                                        │
│                                                                 │
│  Description: [Dashboard real-time monitoring]                 │
│                                                                 │
│  [Save] [Cancel]                                                │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Quick Tips

TIP
IP Restriction: Always restrict IPs in production.
TIP
Event Filters: Only subscribe to needed events.
WARNING
Security: ESL provides full system access - protect credentials!

---

4. Configuration Fields

General Section

FieldDescription
UsernameESL login name (unique)
PasswordAuthentication password
Access ModeInbound, Outbound, Embedded
Allowed IP / RangeCIDR or specific IP
EnabledAccount active/inactive

Security Section

FieldDescription
Listen IPBind address (:: = all)
Listen PortESL port (default 8021)
NAT MapEnable NAT mapping
Apply Inbound ACLFreeSWITCH ACL name
Stop on Bind ErrorFail if port unavailable

Metadata Section

FieldDescription
Event FiltersFreeSWITCH events to receive
DescriptionPurpose notes

Access Modes

ModeDescription
InboundClients connect to FreeSWITCH
OutboundFreeSWITCH connects to external server
EmbeddedWithin FreeSWITCH process
---

5. Common Scenarios & Examples

Scenario 1: Dashboard User

  1. Create new ESL user
  2. Username = dashboard
  3. Set secure password
  4. Allowed IP = dashboard server IP
  5. Access Mode = Inbound
  6. Select events: CHANNEL_ANSWER, CHANNEL_HANGUP
  7. Enable and save

Scenario 2: CRM Integration

  1. Create new ESL user
  2. Username = crm-app
  3. Access Mode = Inbound
  4. Allowed IP = CRM server IP/24
  5. Event Filters = CHANNEL_CREATE, CHANNEL_CALLER_ID
  6. Enable and save

Scenario 3: Development User

  1. Create new ESL user
  2. Username = dev-test
  3. Allowed IP = 0.0.0.0/0 (open for dev)
  4. Event Filters = All events
  5. Save but keep Disabled until needed

Scenario 4: Restricted Admin

  1. Create new ESL user
  2. Username = esl-admin
  3. Allowed IP = specific admin workstation
  4. Access Mode = Inbound
  5. Apply Inbound ACL = admin-acl
  6. Enable and save

---

6. Limitations & Important Notes

Technical Notes

NOTE
Default Port: ESL uses port 8021 by default.
NOTE
Generate XML: ESL config generates event_socket.conf.xml.
WARNING
Security Critical: ESL provides full FreeSWITCH control.

Best Practices

  1. Unique Usernames: One per application
  2. Strong Passwords: Use complex passwords
  3. IP Restrictions: Always restrict in production
  4. Minimal Events: Only subscribe to needed events
  5. Disable Unused: Keep unused accounts disabled
  6. Monitor Access: Review ESL connections regularly

Common Event Filters

EventPurpose
CHANNEL_CREATENew call started
CHANNEL_ANSWERCall answered
CHANNEL_HANGUPCall ended
CHANNEL_BRIDGECalls connected
DTMFKey presses
RECORD_STARTRecording began
RECORD_STOPRecording ended
---

7. Troubleshooting Tips

Common Issues

SymptomPossible CauseSolution
Connection refusedPort blockedCheck firewall
Auth failedWrong passwordVerify credentials
Connection deniedIP not allowedCheck Allowed IP
No eventsFilters too strictAdd event filters
Already in usePort conflictChange Listen Port

Test ESL Connection

Bash
# Connect via telnet
telnet <freeswitchip> 8021

# Authenticate
auth <password>

# Subscribe to events
events plain ALL

# Send command
api status

Check ESL Users

Sql
SELECT 
  username,
  access_mode,
  allowed_ip,
  enabled
FROM public.esl_users
WHERE enabled = true;

---

8. Glossary

TermDefinition
ESLEvent Socket Layer
InboundClients connect to FS
OutboundFS connects to clients
ACLAccess Control List
CIDRIP range notation
Event FilterSubscribed event types
Listen PortESL connection port
---

Lua Script Status ℹ️

Configuration Module

ComponentStatus
ESL Usersℹ️ Configuration module - generates event_socket.conf.xml
ESL Users is a configuration module. Settings are stored and used to generate FreeSWITCH Event Socket configuration. No Lua handlers are used.

---

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?