Blacklist Module Documentation
Table of Contents
- Module Overview (Technical)
- Module Overview (Commercial/Business)
- Module Overview (End User/Administrator)
- Configuration Fields Reference
- Feature Codes
- Common Scenarios & Examples
- Limitations & Important Notes
- Troubleshooting Tips
- Glossary
---
1. Module Overview (Technical)
What Is Blacklist?
Blacklist is a call blocking system that rejects calls from specified phone numbers or patterns. Entries can be managed via the admin panel or by users dialing feature codes (30, 31, 32).
Architecture
Key Tables
| Table | Purpose | |
|---|---|---|
public.blacklist | Blacklist entries | |
public.domains | Domain resolution | |
public.sip_extensions | Extension lookup |
Key Files
| File | Description | |
|---|---|---|
admin/apps/web/src/modules/blacklist/ | Frontend module | |
admin/apps/web/src/i18n/en/blacklist.json | Translations | |
telephony/freeswitch/lua/features/blacklist.lua | Feature code handler (30, 31, 32) |
2. Module Overview (Commercial/Business)
Business Value
Blacklist provides unwanted call protection:
| Without Blacklist | With Blacklist | |
|---|---|---|
| All calls accepted | Spam blocked | |
| Manual rejection | Automatic blocking | |
| No patterns | Wildcard/regex support | |
| Admin-only | User self-service |
Use Cases
- Spam Protection
- Pattern-block area codes (555)
- Fraud Prevention
- Block international prefixes
- User Self-Service
- Dial
30 to add number manually- Compliance
- Audit trail with source tracking
Feature Highlights
| Feature | Benefit | |
|---|---|---|
| Exact Match | Block specific numbers | |
| Wildcards | Pattern matching (555) | |
| Regex | Advanced pattern matching | |
| Inbound/Outbound | Direction control | |
| Feature Codes | User self-service | |
| Source Tracking | Manual/System/API |
3. Module Overview (End User/Administrator)
What Can You Do?
- Block specific phone numbers
- Create pattern-based blocks
- Use regex for advanced matching
- Set direction (inbound/outbound/both)
- Enable/disable entries
- Use feature codes for quick blocks
Administrator Workflow
End User Feature Codes
| Code | Action | Description | |
|---|---|---|---|
| \30 | Add | Enter number to block | |
| \31 | Remove | Enter number to unblock | |
| \32 | Block Last | Block last incoming caller |
Quick Tips
TIP
Quick Block: Dial 32 immediately after an unwanted call to block that number.TIP
Wildcards: Use 555 to block all numbers starting with 555.CAUTION
Regex Syntax: Test regex patterns carefully before saving.---
4. Configuration Fields Reference
Entry Fields
| Field | Description | Example | |
|---|---|---|---|
| Match Type | How to match | Exact/Pattern/Regex | |
| Number / Pattern | Value to match | +15551234567 or 555 | |
| Description | Reason for block | Spam caller | |
| Direction | Where rule applies | Inbound/Outbound/Both | |
| Source | How created | Manual/System/API | |
| Destination | Optional route | Announcement | |
| Enabled | Entry active | On/Off |
Match Types
| Type | Description | Example | |
|---|---|---|---|
| Exact Number | Exact match only | +15551234567 | |
| Pattern | Wildcard matching | 555, 1234 | |
| Regex | Regular expression | ^\+1(555\ | 666). |
Directions
| Direction | Description | |
|---|---|---|
| Inbound Only | Block incoming calls | |
| Outbound Only | Block outgoing calls | |
| Both | Block both directions |
Sources
| Source | Description | |
|---|---|---|
| Manual | Added via admin panel | |
| System | Fraud detection/automatic | |
| API | External integration |
5. Feature Codes
30 - Add Number to Blacklist
Flow:- User dials 30
- System prompts: "Enter the number to block"
- User enters digits + #
- System adds to blacklist
- Confirmation: "Number has been blocked"
31 - Remove Number from Blacklist
Flow:- User dials 31
- System prompts: "Enter the number to unblock"
- User enters digits + #
- System removes from blacklist
- Confirmation: "Number has been unblocked"
32 - Block Last Caller
Flow:- User dials 32 (after unwanted call)
- System gets last caller number
- System adds to blacklist automatically
- Confirmation: "Last caller has been blocked"
---
6. Common Scenarios & Examples
Scenario 1: Block Specific Spam Number
Entry:| Field | Value | |
|---|---|---|
| Match Type | Exact Number | |
| Value | +15551234567 | |
| Description | Telemarketer | |
| Direction | Inbound Only |
Scenario 2: Block Area Code
Entry:| Field | Value | |
|---|---|---|
| Match Type | Pattern | |
| Value | 555 | |
| Description | Block all 555 numbers | |
| Direction | Both |
Scenario 3: Block Premium Rate Numbers
Entry:| Field | Value | |
|---|---|---|
| Match Type | Pattern | |
| Value | 900 | |
| Description | Block 900 premium | |
| Direction | Outbound Only |
Scenario 4: Block Multiple Prefixes with Regex
Entry:| Field | Value | ||
|---|---|---|---|
| Match Type | Regex | ||
| Value | ^\+1(900\ | 976). | |
| Description | Block 900 and 976 prefixes | ||
| Direction | Outbound Only |
7. Limitations & Important Notes
Technical Notes
NOTE
Inbound Scope: User feature codes (30, 31, 32) add entries as "inbound" only.WARNING
Regex Complexity: Complex regex may impact call processing performance.WARNING
Source Tracking: Keep track of why numbers were blocked.Pattern Matching Rules
| Pattern | Matches | |
|---|---|---|
555 | 555, 5551234, 555anything | |
1234 | Any number ending in 1234 | |
5551234 | Starting with 555, ending 1234 |
Best Practices
- Document Entries: Add clear descriptions
- Review Regularly: Remove outdated blocks
- Test Patterns: Verify before enabling
- Use Right Type: Simple = Exact, Complex = Regex
- Monitor Sources: Track automatic blocks
---
8. Troubleshooting Tips
Common Issues
| Symptom | Possible Cause | Solution | |
|---|---|---|---|
| Call not blocked | Pattern mismatch | Check match type/pattern | |
| Wrong calls blocked | Pattern too broad | Narrow pattern scope | |
| Feature code fails | CoS restriction | Check feature permissions | |
| Duplicate error | Already blocked | Entry exists | |
| Invalid number | Non-numeric input | Enter digits only |
Diagnostic SQL
List blacklist entries: Check if number is blacklisted:FreeSWITCH Logs
---
9. Glossary
| Term | Definition | |
|---|---|---|
| Blacklist | List of blocked numbers | |
| Pattern | Wildcard matching rule | |
| Regex | Regular expression pattern | |
| Scope | Direction (inbound/outbound) | |
| Source | How entry was created | |
| Feature Code | Dial code for user actions |
Lua Script Status ✅
Already Correct
| Script | Status |
|---|---|
features/blacklist.lua | ✅ Uses public.domains, public.blacklist, public.sip_extensions |
---
Documentation last updated: January 2026*