Skip to content

Telecom data mediation: CDR records from the network to billing

B2Bnetwork team · · 6 min

IT in telecom

In brief

Mediation is the layer between the network and billing that collects usage records from network elements, decodes them, validates them, removes duplicates, merges partial records, enriches them with customer data and passes them on: to rating, the data warehouse and settlement with other operators. A CDR (Charging Data Record) is, in 3GPP terms, the record of a single chargeable event, for example a call or a data session. The core job of mediation: no record may be lost or counted twice.

What mediation and a CDR are

An operator's network produces usage records in many formats: some for voice calls, others for data, SMS, roaming or value-added services. Billing needs a single clean stream of events with a customer identifier, time, quantity and service type. Mediation translates one into the other.

The abbreviation CDR originally meant Call Detail Record, a record of a call. 3GPP specifications use the name Charging Data Record and apply it to every service type. In practice the two meanings are used interchangeably.

3GPP distinguishes offline charging, where records are collected and rated later, from online charging, where the network asks the charging system for permission before granting service, for example on prepaid accounts. Mediation handles mainly the offline path, but in many networks it also processes records from online charging so they reach the warehouse and settlement. Testing rating itself is covered in the article on telecom billing.

Where records come from: the 3GPP architecture

Charging principles are set out in 3GPP TS 32.240 (Charging architecture and principles). In simplified form:

  • the CDF (Charging Data Function) creates CDRs from information supplied by network elements;
  • the CGF (Charging Gateway Function) collects records, buffers them and packs them into files;
  • the Bx interface carries the record files to the operator's billing domain, which includes mediation;
  • in 5G networks charging is handled by the CHF (Charging Function), which can also generate CDRs.

Record content is defined in TS 32.298 (CDR parameter description): the fields and their encoding in ASN.1 with BER rules. The file format and transfer are defined in TS 32.297. The default file transfer protocol there is FTP, although operators often use more secure equivalents.

Two concepts from TS 32.298 matter a lot for mediation. Partial records appear when a long session is split into several records, for example at set intervals or after conditions change. The cause for record closing tells you whether a record ends the session or more will follow. Sequence numbers let you detect gaps.

What mediation does, step by step

  1. Collection. Fetching files or streams from network elements, with a completeness check on every file.
  2. Decoding. Converting ASN.1 and vendor formats into a common internal model.
  3. Validation. Checking mandatory fields, ranges, dates and consistency. Bad records go to a separate queue with a reason.
  4. Deduplication. Removing records delivered twice, for example after a file is resent.
  5. Merging partial records into a single event, if billing requires it.
  6. Normalization. Uniform units, time zones and number formats.
  7. Enrichment. Attaching the customer identifier, contract, service category and roaming zone.
  8. Distribution. Passing data to rating, the data warehouse, inter-operator settlement, fraud management and the archive.

The order of steps varies between operators, but none of them should change the number of events without a trace in the log.

Reconciliation: no record gets lost

Mediation is where an operator most easily loses revenue without any alarm going off. That is why counts have to be reconciled at every stage.

CheckpointWhat to count
Input from the networknumber of files and records per network element, gaps in sequence numbers
After validationrecords accepted, rejected and held, with a reason
After deduplicationnumber of duplicates removed and their source
After mergingnumber of sessions, sessions without a closing record
Output to billingnumber of events and total quantity (seconds, bytes, SMS) per service type
After ratingunrated events, for example with no matching customer

Rejected records cannot stay in the queue forever. You need a reprocessing flow after a rule or reference data is fixed, with a check that the record does not reach billing twice. Data quality in a flow like this is covered in the article on data quality.

Mediation closer to real time

Classic mediation processes files in batches. More and more often operators need data sooner: for fraud alerts, bundle usage notifications, network quality analysis. Then part of the stream goes through an event platform, described in the article on real-time network events.

That does not mean files go away. Offline rating and inter-operator settlement still rely on complete, reconciled data sets. In practice there are two paths: a fast one for operational decisions and a full, reconciled one for money. Changes on the 5G side are covered in the piece on 5G from the software side.

How to test mediation

  • Decoders are tested on real files from every type and version of network element, because vendors interpret optional fields differently.
  • Time edge cases: a session spanning midnight, the end of the month, the switch to and from daylight saving time.
  • Partial records: a missing closing record, records out of order, the same sequence number twice.
  • Damaged input: a truncated file, an empty file, a file resent under a different name.
  • Enrichment: a number ported from another operator, a customer changed mid-cycle, missing reference data.
  • Performance: peak traffic and backlogs after an outage, when mediation has to catch up on several hours of records.
  • Reconciliation: every test ends by comparing counts at input and output.

When migrating mediation or billing, it is worth processing the same records in the old and new systems for several cycles and comparing the results. Such migrations often require work in night windows, as in the scenario on a BSS migration with a night shift team.

Questions and answers

What does CDR stand for in telecom?

In 3GPP specifications CDR stands for Charging Data Record, a record of chargeable data about a single event or part of a session: a call, a data session, an SMS. The older expansion, Call Detail Record, dates from when mostly voice calls were billed. In conversation both mean the same thing: a usage record from which a charge is produced.

What is the difference between mediation and billing?

Mediation prepares the data: it collects records from the network, decodes, cleans, merges and enriches them. Billing prices them according to the customer's tariff and produces the bill. The split makes sense because the network changes differently from the price list: a new network element requires a change in mediation, a new offer a change in billing.

What format are CDRs in?

Records defined by 3GPP are encoded in ASN.1 with BER rules, and their fields are defined in TS 32.298. Record files and how they are transferred are described in TS 32.297. Network vendors add their own fields and formats, so mediation needs a separate decoder for each type and version of network element.

How do you detect that mediation is losing records?

Through reconciliation at every stage: the number of records and total quantity at input, after each step and at output to billing, with every difference explained. Gaps in sequence numbers from network elements reveal records that never arrived. Rejected records need a reason and an owner, not just a place in an error folder.

What it looks like in a project

Changing an operator's systems? Talk to an engineer who has done it in night windows.

Let's talk

Read more: IT in telecom