Home›Telecom›Revenue›Mediation← All modules
Revenue · BSS module

Mediation Module

The Mediation module is the revenue pipeline backbone — ingesting raw usage records from network elements, processing and enriching them, and feeding billing-ready events to the rating and billing systems.

File-based Ingestion Event-driven Pipeline Decode & Validate Enrich & Normalise Real-time Rating Usage Inquiry API
On this pageAt a glanceWhere AI helpsStandards

At a glance

Collects raw usage from the network, cleans and enriches it, and passes billable events to rating.

Key data

Usage record (CDR)Source / network elementRejected recordBatch / file

Receives from

  • Network elements
  • Partner networks
Mediation

Sends to

  • Rating
  • Reporting
  • Fraud & assurance

Supported Usage Event Types

Categories of usage records ingested and processed through the mediation pipeline

Data Usage
Standard data consumption
Data Overflow
Usage beyond plan threshold
Voice — Standard
Domestic voice calls
Voice — IP
IP-based voice calls
Voice — PSTN
PSTN interconnect calls
Roaming Voice
International roaming calls
Roaming Voice — IP
Roaming over IP networks
Roaming Voice — PSTN
Roaming via PSTN
Messaging
SMS and RCS events
Circuit Switched Voice
Legacy CS voice records
5G Services
5G network usage events

End-to-End Processing Pipeline

Eight-stage pipeline from network source to rated billing events

Network Usage Source
Generates usage records per event type
External
→
File Transfer Server
Usage file drop zone; platform connects via secure file transfer protocol
File Storage
→
1
Ingest Service
Polls & downloads usage files to shared storage. Notifies downstream via event bus.
Data Store Event Bus
→
2
Collector Service
Decodes binary files to structured records. Duplicate check. Segregates by subscriber type.
Search Store Event Bus
→
3
Loader Service
Normalise, validate, enrich & filter records. Long-window duplicate detection. Routes to output channels.
Search Store Event Bus
→
4
Mapper Service
Reshapes voice & messaging records into the billing event format expected downstream.
Event Bus only
→
5
Bill Event Processor
Validates subscriber. Calls Rating Engine. Stores monthly usage summaries.
Data Store Event Bus
→
6
Rating Engine
Rates events via subscriber profile & rate table. Applies discounts. Returns charge.
Data Store
Source
Drop Zone
Ingest
Decode
Enrich
Transform
Bill Events
Rate
Side branches
Index Processor
Bulk-writes data events & rated events to search store. Updates usage aggregates.
Search Store Data Store
→
Usage API Gateway
REST API for itemized & aggregated usage queries from self-care and care portals.
Search Store REST
← Data events from the Loader and rated events from the Bill Event Processor flow through the Index Processor for persistence and aggregation — enabling near-real-time usage queries via the Usage API Gateway.

Async Event Bus — Channel Flow

Each stage communicates through dedicated channels — no direct service-to-service coupling

Async Event Bus — Channels by Pipeline Stage
① Ingest trigger File Ready Notification Ingest Service signals Collector that a new usage file is available for processing
② Decoded records Decoded Records — Consumer Decoded Records — Enterprise Decoded Records — Partner Unresolved Subscriber Records
③ Loader output Valid Voice & Messaging Events Valid Data Events Invalid Records Duplicate Records
④ Mapped events Billing Events — Consumer Billing Events — Partner Mapper → Bill Event Processor
⑤ Rated output Rated Events Rating Failures Zero-Charge Failures Late-Arrival Events Duplicate Events Threshold Alerts

Component Responsibilities

Detailed function of each service in the pipeline

Ingest Service

Stage 1 — File Collection
  • Polls secure file server on a scheduled interval
  • Downloads usage files to shared network storage
  • Publishes file-ready notification to event bus
  • Tracks file sequence numbers to prevent re-processing
  • Organises files: incoming / processed / corrupted

Collector Service

Stage 2 — Decode & Segregate
  • Reads file-ready notifications from event bus
  • Fetches binary-encoded usage file from shared storage
  • Validates for duplicate files using search store
  • Decodes binary format to structured records
  • Segregates records by subscriber type (Consumer / Enterprise / Partner)
  • Publishes decoded records to event bus channels

Loader Service

Stage 3 — Normalise & Enrich
  • Normalises timestamps and number formats
  • Rejects invalid records (test, zero-duration, overlap)
  • Enriches records with billing identifiers and event metadata
  • Detects duplicates over a configurable time window
  • Routes records to valid, data, invalid and duplicate channels

Mapper Service

Stage 4 — Transform
  • Consumes valid voice and messaging records from Loader
  • Reshapes record schema to billing event format
  • Aligns field names and nested structures for downstream
  • Stateless service — no own data store
  • Publishes mapped billing events to event bus

Bill Event Processor

Stage 5 — Rate & Store
  • Consumes billing events from Mapper channel
  • Validates subscriber status with billing account service
  • Sends chargeable events to Rating Engine for pricing
  • Stores monthly voice, messaging and data usage summaries
  • Handles late-arriving records in overflow documents
  • Publishes rated, failed and duplicate events downstream

Rating Engine

Stage 6 — Charge Calculation
  • Receives rating requests from Bill Event Processor
  • Fetches subscriber profile and current plan
  • Applies centralised rate table (loaded in memory)
  • Matches tariff by plan, charge type and event category
  • Calculates charge: standard or flexible billing formula
  • Applies applicable discounts and returns rated response

Index Processor

Side branch — Async Indexing
  • Generic event-bus to search-store writer
  • Bulk-inserts data usage events from Loader channels
  • Bulk-inserts rated events from Bill Event Processor channels
  • Monthly index rotation for efficient time-range queries
  • Routes duplicates and invalids to separate indices
  • Updates data usage aggregation documents

Usage API Gateway

Side branch — Query Layer
  • REST APIs for self-care and care portal applications
  • Itemized usage — per-record usage and charge details
  • Aggregated usage — monthly totals by usage category
  • Validates access via subscriber identity service
  • Resolves subscriber details via service inventory
  • Queries search store for usage and charge data

Storage & Persistence

How and where each component stores its data

Document Data Store

Operational data
  • File sequence tracking
  • Monthly voice usage summaries
  • Monthly messaging usage summaries
  • Monthly data usage aggregates
  • Subscriber profile & rate table
  • Late-arrival overflow documents

Search & Analytics Store

Event persistence & reporting
  • File processing statistics & dedup
  • Invalid / unparseable records
  • Unresolved subscriber records
  • Data usage events (monthly rotation)
  • Rated voice and messaging events
  • Duplicate records for audit trail

Async Event Bus

Inter-service communication
  • File ready notification channel
  • Decoded record channels (per segment)
  • Valid / Invalid / Duplicate output channels
  • Billing event channels
  • Rated / Failed / Missed event channels
  • Threshold monitoring alerts

Relational Store

Configuration & metadata
  • Collector operational configuration
  • Loader enrichment rule tables
  • Mapper schema configuration
  • Usage API configuration data
  • Shared across mediation services

Shared File Storage

Transient usage files
  • Incoming usage files (binary)
  • Processed files folder
  • Corrupted / decode-failed files
  • Periodic folder rotation
  • Shared mount across Ingest & Collector

Design Principles

Key architectural decisions behind the Mediation module

Event-driven & Decoupled

Each stage communicates exclusively through the async event bus. Services scale independently, can fail without blocking downstream stages, and can be replaced without disrupting the pipeline.

Multi-layer Deduplication

Duplicate detection runs at both the file level in the Collector (via search store) and at the record level in the Loader over a configurable long-window. Duplicates are routed to a dedicated audit channel rather than silently discarded.

Segment-aware Routing

From the Collector stage onward, records are segregated by subscriber segment (Consumer, Enterprise, Partner) into dedicated event bus channels, enabling independent scaling and billing logic per segment.

AI opportunity
Where AI helps
Feed anomaly detection

Spot missing or delayed usage files per network element before revenue is lost.

Duplicate detection

Learn patterns of duplicate and partial records beyond simple key matching.

More in 30 AI & ML use cases and AIOps for BSS.

Key business processRoaming Partner Management→
Standards & references
3GPP TS 32.240Charging architecture
3GPP TS 32.297Charging data record file format and transfer
TMF635Usage Management API