Class of Services Module Documentation
Table of Contents
- Module Overview (Technical)
- Module Overview (Commercial/Business)
- Module Overview (End User/Administrator)
- Configuration Fields Reference
- Permission System
- Common Scenarios & Examples
- Limitations & Important Notes
- Troubleshooting Tips
- Glossary
---
1. Module Overview (Technical)
What Is Class of Service?
Class of Service (CoS) is the central permission system that controls what features and calling capabilities are available to extensions. It aggregates three key components:
- Feature Code Category → Which dialpad features (XX) are available
- Dial Rule Restrictions → Which numbers can/cannot be dialed
- ARS Profile → Which outbound routes are used
Architecture
Key Tables
| Table | Purpose | |
|---|---|---|
public.class_of_services | CoS definitions | |
public.sip_extensions | References CoS via class_of_services_id | |
public.feature_code_categories | Feature groupings | |
public.dial_rule_restrictions | Dial restrictions | |
public.ars_profiles | Outbound routing |
Key Files
| File | Description | |
|---|---|---|
admin/apps/web/src/modules/classOfServices/ | Frontend module | |
admin/apps/web/src/i18n/en/classOfServices.json | Translations | |
telephony/freeswitch/lua/resources/functions/cos_utils.lua | CoS permission checks |
Lua Integration
CoS is referenced in 40+ Lua scripts for permission checks:
---
2. Module Overview (Commercial/Business)
Business Value
Class of Service enables tiered permission management:
| Without CoS | With CoS | |
|---|---|---|
| Same permissions for all | Role-based access | |
| Per-extension configuration | Template-based configuration | |
| Manual updates everywhere | Update once, apply everywhere | |
| No feature control | Granular feature access |
Use Cases
- Role-Based Access
- Manager: Advanced features
- Employee: Standard features
- Lobby/Guest: Basic only
- Cost Control
- Limit international to approvers
- Route to cheapest carriers
- Compliance
- Block spy features to authorized users
- Audit trail per permission level
Feature Highlights
| Feature | Benefit | |
|---|---|---|
| Feature Categories | Control dialpad features | |
| Dial Restrictions | Control destination access | |
| ARS Profiles | Control carrier routing | |
| Default Class | Auto-assign to new extensions | |
| Enable/Disable | Suspend without deletion |
3. Module Overview (End User/Administrator)
What Can You Do?
- Create permission profiles (CoS)
- Link Feature Categories for feature access
- Link Dial Restrictions for call control
- Link ARS Profiles for routing
- Set default CoS for new extensions
- Assign CoS to extensions
Administrator Workflow
Quick Tips
---
4. Configuration Fields Reference
CoS Fields
| Field | Description | Example | Required | |
|---|---|---|---|---|
| Class Name | Unique identifier | Standard Employee | Yes | |
| Description | Purpose notes | Staff calling permissions | No | |
| Feature Code Category | Which features allowed | Basic Features | No | |
| Dial Restriction | Which patterns blocked | Standard Restrictions | No | |
| ARS Profile | Which routes used | Standard Routing | No | |
| Default Class | Auto-assign to new ext | On/Off | No | |
| Enabled | CoS active status | On/Off | Yes |
Field Relationships
| Field | Null Behavior | |
|---|---|---|
| Feature Code Category = NULL | All features allowed | |
| Dial Restriction = NULL | No dial restrictions | |
| ARS Profile = NULL | Default routing |
5. Permission System
Permission Hierarchy
---
6. Common Scenarios & Examples
Scenario 1: Corporate Hierarchy
| CoS | Feature Category | Dial Restrictions | ARS Profile | |
|---|---|---|---|---|
| Executive | All Features | No Restrictions | Premium Routing | |
| Manager | Advanced | International Allowed | Standard Routing | |
| Employee | Basic | Domestic Only | Standard Routing | |
| Lobby | Minimal | Emergency Only | Standard Routing |
Scenario 2: Call Center Tiers
| CoS | Features | Restrictions | Notes | |
|---|---|---|---|---|
| Agent Tier 1 | Basic calling | Local only | New agents | |
| Agent Tier 2 | + Transfers | + Long distance | Experienced | |
| Supervisor | + Spy modes | Full access | Team leads |
Scenario 3: Multi-Location
| CoS | Features | Restrictions | ARS Profile | |
|---|---|---|---|---|
| NYC Office | Standard | - | NYC Carriers | |
| LA Office | Standard | - | LA Carriers | |
| Remote | Standard | Limited | VoIP Only |
7. Limitations & Important Notes
Technical Limitations
Best Practices
- Plan First: Design CoS structure before creating
- Document Purpose: Use clear descriptions
- Test Thoroughly: Verify permissions work correctly
- Minimize Classes: Use as few as needed
- Set Default: Always have a default CoS
Default CoS Rules
---
8. Troubleshooting Tips
Common Issues
| Symptom | Possible Cause | Solution | |
|---|---|---|---|
| Feature not working | Not in Feature Category | Add to category | |
| Call blocked | Dial Restriction triggered | Check pattern rules | |
| Wrong carrier | ARS Profile misconfigured | Review ARS routes | |
| New ext no CoS | No default set | Set default CoS |
Diagnostic SQL
List CoS with assignments: Check extension CoS:---
9. Glossary
| Term | Definition | |
|---|---|---|
| Class of Service (CoS) | Permission profile assigned to extensions | |
| Feature Code Category | Group of allowed dialpad features | |
| Dial Rule Restriction | Pattern-based call control | |
| ARS Profile | Outbound route selection rules | |
| Default Class | CoS automatically assigned to new extensions |
Lua Handler Status
⚡ No Dedicated Handler Required
Class of Services is a configuration module. CoS permissions are checked by individual feature and routing Lua scripts when processing calls. The cos_utils.lua library provides shared functions for permission validation.
resources/functions/cos_utils.lua- Permission check utilitiesresources/helpers/feature_access.lua- Feature code validation
---
Documentation last updated: January 2026*