CDR Filters Module Documentation
Table of Contents
- Module Overview (Technical)
- Module Overview (Commercial/Business)
- Module Overview (End User/Administrator)
- Configuration Fields Reference
- Search Conditions
- Common Scenarios & Examples
- Limitations & Important Notes
- Troubleshooting Tips
- Glossary
---
1. Module Overview (Technical)
What Are CDR Filters?
CDR Filters are saved search configurations for querying Call Detail Records (CDR). They allow administrators to create reusable filter templates with multiple conditions that can be applied to CDR reports.
Architecture
┌─────────────────────────────────────────────────────────────────┐
│ CDR Filters System │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Filter Definition │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ CDR Filter │ │
│ │ │ │
│ │ Description: "Failed Outbound Calls" │ │
│ │ │ │
│ │ Conditions: │ │
│ │ ├─ call_type = "outbound" │ │
│ │ ├─ AND hangup_cause != "NORMAL_CLEARING" │ │
│ │ └─ AND duration > 0 │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ Applied to CDR Query │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ CDR Report │ │
│ │ │ │
│ │ SELECT * FROM cdr │ │
│ │ WHERE call_type = 'outbound' │ │
│ │ AND hangup_cause != 'NORMAL_CLEARING' │ │
│ │ AND duration > 0 │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
Key Tables
| Table | Purpose |
|---|
public.cdr_filters | Saved filter configurations |
Key Files
| File | Description |
|---|
modules/cdrFilters/ | Frontend module | |
modules/cdrFilters/api/cdrFilterApi.ts | API calls | |
modules/cdrFilters/types/cdrFilter.types.ts | Type definitions |
---
2. Module Overview (Commercial/Business)
Business Value
CDR Filters provides reusable report templates:
| Without CDR Filters | With CDR Filters |
|---|
| Manual search each time | Saved filters | |
| Complex queries | One-click apply | |
| Error-prone | Consistent results | |
| Time consuming | Quick access |
Use Cases
- Failed Call Analysis
- Filter by hangup cause
- Identify problem areas
- Traffic Type Reports
- Outbound only
- Inbound only
- Customer/Account Analysis
- Filter by account code
- Customer code reports
- Compliance Auditing
- Duration thresholds
- Specific destinations
Feature Highlights
| Feature | Benefit |
|---|
| Multiple Conditions | Complex filtering | |
| AND/OR Logic | Flexible queries | |
| Search Modes | Begins/Contains/Ends/Exact | |
| Exclude Option | Negative matching | |
| Saved Filters | Reusable templates | |
| Duration/Talk Time | Time-based filters |
---
3. Module Overview (End User/Administrator)
What Can You Do?
- Create saved CDR filters
- Add multiple search conditions
- Combine with AND/OR logic
- Filter by duration/talk time
- Exclude matching records
- Apply filters to CDR reports
CDR Filter Configuration
┌─────────────────────────────────────────────────────────────────┐
│ Create CDR Filter │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Section: GENERAL │
│ ├─ Description: Failed Outbound Calls │
│ ├─ Duration From: [0 ] To: [ ] seconds │
│ └─ Talk Time From: [ ] To: [ ] seconds │
│ │
│ Section: Add Search Condition │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Condition │ Search By │ Mode │ Value │ Exclude │ │
│ ├───────────┼──────────────┼─────────┼───────────┼─────────┤ │
│ │ -- │ Call Type │ Exactly │ Outbound │ No │ │
│ │ AND │ Hangup Cause │ Exactly │ NORMAL... │ Yes │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │
│ [+ Add] condition │
│ │
│ [Save] [Cancel] │
│ │
└─────────────────────────────────────────────────────────────────┘
Quick Tips
TIP
Combine Conditions: Use AND for all conditions must match, OR for any match.
TIP
Exclude: Use exclude to filter OUT specific values.
CAUTION
At Least One: At least one search condition is required.
---
4. Configuration Fields Reference
General Settings
| Field | Description | Example |
|---|
| Description | Filter name | Failed Outbound | |
| Duration From | Minimum duration (seconds) | 0 | |
| Duration To | Maximum duration (seconds) | 300 | |
| Talk Time From | Minimum talk time | 0 | |
| Talk Time To | Maximum talk time | 60 |
Condition Fields
| Field | Description |
|---|
| Condition | AND or OR | |
| Search By | Field to search | |
| Mode | Match type | |
| Value | Search value | |
| Exclude | Exclude matches |
---
5. Search Conditions
Search By Options
| Field | Description |
|---|
| Caller ID | Caller ID number | |
| Source | Source number | |
| Destination | Called number | |
| DID | Inbound DID | |
| Account Code | Account code | |
| Customer Code | Customer code | |
| Hangup Cause | Call termination reason | |
| Call Type | Inbound/Outbound/Internal |
Call Types
| Type | Description |
|---|
| Inbound | Incoming calls | |
| Outbound | Outgoing calls | |
| Internal | Extension to extension | |
| Transit | Pass-through calls |
Match Modes
| Mode | Description | Example |
|---|
| Begins With | Starts with value | 555 | |
| Contains | Contains value | 555 | |
| Ends With | Ends with value | 555 | |
| Exactly | Exact match | 555 |
Common Hangup Causes
| Cause | Description |
|---|
| NORMAL_CLEARING | Normal call end | |
| USER_BUSY | Busy signal | |
| NO_ANSWER | No answer | |
| CALL_REJECTED | Call rejected | |
| ORIGINATOR_CANCEL | Caller hung up | |
| USER_NOT_REGISTERED | Extension offline |
---
6. Common Scenarios & Examples
Scenario 1: Failed Outbound Calls
Filter:
| Setting | Value |
|---|
| Description | Failed Outbound Calls | |
| Condition 1 | Call Type = Outbound | |
| Condition 2 | AND Hangup Cause != NORMAL_CLEARING |
Scenario 2: Long Duration Calls
Filter:
| Setting | Value |
|---|
| Description | Long Calls (>1 hour) | |
| Duration From | 3600 | |
| Condition | Call Type = Outbound |
Scenario 3: Specific Customer
Filter:
| Setting | Value |
|---|
| Description | Customer ABC Calls | |
| Condition | Customer Code = ABC |
Scenario 4: International Calls
Filter:
| Setting | Value |
|---|
| Description | International Outbound | |
| Condition 1 | Call Type = Outbound | |
| Condition 2 | AND Destination Begins With 011 |
Scenario 5: Unanswered Calls
Filter:
| Setting | Value |
|---|
| Description | Unanswered Inbound | |
| Condition 1 | Call Type = Inbound | |
| Condition 2 | AND Hangup Cause = NO_ANSWER |
---
7. Limitations & Important Notes
Technical Notes
NOTE
Filter Only: This module creates filters - apply them in CDR reports.
NOTE
Domain Scoped: Filters are per-domain.
WARNING
One Condition Minimum: At least one search condition required.
Best Practices
- Descriptive Names: Clear filter descriptions
- Test Filters: Verify results before relying on
- Keep Simple: Start with few conditions
- Document Purpose: Note why filter was created
- Regular Review: Remove unused filters
---
8. Troubleshooting Tips
Common Issues
| Symptom | Possible Cause | Solution |
|---|
| No results | Too restrictive | Loosen conditions | |
| Too many results | Too broad | Add more conditions | |
| Wrong data | Wrong field | Check search by field | |
| Save fails | Missing description | Add description | |
| Not working | Filter disabled | Enable filter |
Validation Errors
| Error | Meaning |
|---|
descriptionRequired | Add a description | |
atLeastOneCondition | Add at least one condition |
Diagnostic SQL
List CDR filters:
SELECT id, description, enabled, created_at
FROM public.cdr_filters
WHERE domain_id = [domain_id]
ORDER BY created_at DESC;
---
9. Glossary
| Term | Definition |
|---|
| CDR | Call Detail Record | |
| Filter | Saved search configuration | |
| Condition | Single search criterion | |
| AND/OR | Logical operators | |
| Hangup Cause | Call termination reason | |
| Call Type | Inbound/Outbound/Internal |
---
Lua Script Status ℹ️
No Lua Handler Required
| Component | Status |
|---|
| CDR Filters | ℹ️ Configuration module - filters applied by CDR report queries |
CDR Filters is a configuration module for creating saved search templates. The filters are applied when generating CDR reports. No Lua handlers are used.
---
Documentation last updated: January 2026