Ctrl K
ring2all.com

CDR Filters 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. Search Conditions
  6. Common Scenarios & Examples
  7. Limitations & Important Notes
  8. Troubleshooting Tips
  9. 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

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

TablePurpose
public.cdr_filtersSaved filter configurations

Key Files

FileDescription
modules/cdrFilters/Frontend module
modules/cdrFilters/api/cdrFilterApi.tsAPI calls
modules/cdrFilters/types/cdrFilter.types.tsType definitions
---

2. Module Overview (Commercial/Business)

Business Value

CDR Filters provides reusable report templates:

Without CDR FiltersWith CDR Filters
Manual search each timeSaved filters
Complex queriesOne-click apply
Error-proneConsistent results
Time consumingQuick access

Use Cases

  1. Failed Call Analysis
- Filter by hangup cause

- Identify problem areas

  1. Traffic Type Reports
- Outbound only

- Inbound only

  1. Customer/Account Analysis
- Filter by account code

- Customer code reports

  1. Compliance Auditing
- Duration thresholds

- Specific destinations

Feature Highlights

FeatureBenefit
Multiple ConditionsComplex filtering
AND/OR LogicFlexible queries
Search ModesBegins/Contains/Ends/Exact
Exclude OptionNegative matching
Saved FiltersReusable templates
Duration/Talk TimeTime-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

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

FieldDescriptionExample
DescriptionFilter nameFailed Outbound
Duration FromMinimum duration (seconds)0
Duration ToMaximum duration (seconds)300
Talk Time FromMinimum talk time0
Talk Time ToMaximum talk time60

Condition Fields

FieldDescription
ConditionAND or OR
Search ByField to search
ModeMatch type
ValueSearch value
ExcludeExclude matches
---

5. Search Conditions

Search By Options

FieldDescription
Caller IDCaller ID number
SourceSource number
DestinationCalled number
DIDInbound DID
Account CodeAccount code
Customer CodeCustomer code
Hangup CauseCall termination reason
Call TypeInbound/Outbound/Internal

Call Types

TypeDescription
InboundIncoming calls
OutboundOutgoing calls
InternalExtension to extension
TransitPass-through calls

Match Modes

ModeDescriptionExample
Begins WithStarts with value555
ContainsContains value555
Ends WithEnds with value555
ExactlyExact match555

Common Hangup Causes

CauseDescription
NORMAL_CLEARINGNormal call end
USER_BUSYBusy signal
NO_ANSWERNo answer
CALL_REJECTEDCall rejected
ORIGINATOR_CANCELCaller hung up
USER_NOT_REGISTEREDExtension offline
---

6. Common Scenarios & Examples

Scenario 1: Failed Outbound Calls

Filter:
SettingValue
DescriptionFailed Outbound Calls
Condition 1Call Type = Outbound
Condition 2AND Hangup Cause != NORMAL_CLEARING

Scenario 2: Long Duration Calls

Filter:
SettingValue
DescriptionLong Calls (>1 hour)
Duration From3600
ConditionCall Type = Outbound

Scenario 3: Specific Customer

Filter:
SettingValue
DescriptionCustomer ABC Calls
ConditionCustomer Code = ABC

Scenario 4: International Calls

Filter:
SettingValue
DescriptionInternational Outbound
Condition 1Call Type = Outbound
Condition 2AND Destination Begins With 011

Scenario 5: Unanswered Calls

Filter:
SettingValue
DescriptionUnanswered Inbound
Condition 1Call Type = Inbound
Condition 2AND 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

  1. Descriptive Names: Clear filter descriptions
  2. Test Filters: Verify results before relying on
  3. Keep Simple: Start with few conditions
  4. Document Purpose: Note why filter was created
  5. Regular Review: Remove unused filters

---

8. Troubleshooting Tips

Common Issues

SymptomPossible CauseSolution
No resultsToo restrictiveLoosen conditions
Too many resultsToo broadAdd more conditions
Wrong dataWrong fieldCheck search by field
Save failsMissing descriptionAdd description
Not workingFilter disabledEnable filter

Validation Errors

ErrorMeaning
descriptionRequiredAdd a description
atLeastOneConditionAdd at least one condition

Diagnostic SQL

List CDR filters:

Sql
SELECT id, description, enabled, created_at
FROM public.cdr_filters
WHERE domain_id = [domain_id]
ORDER BY created_at DESC;

---

9. Glossary

TermDefinition
CDRCall Detail Record
FilterSaved search configuration
ConditionSingle search criterion
AND/ORLogical operators
Hangup CauseCall termination reason
Call TypeInbound/Outbound/Internal
---

Lua Script Status ℹ️

No Lua Handler Required

ComponentStatus
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
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?