Published: Jun 16, 2020

As you can not imagine a bank without dealing with money or a keyboard without a space bar, a telecom company can not operate without a billing system.

Billing Is the Bread and Butter of Telecommunications

Telecommunication is all sorts of communications between users carried via electronic media: making voice calls, sending fax, texting, video messages, transferring files and photos and others. Phone, radio, television and internet are telecommunication services, and they may be provided via wires, fiber optics, radio towers, satellites and so on. A telecom operator manages transmitters and media networks and provides services to its subscribers with the help of operations and business support systems (OSS/BSS).

Telecom billing is the part of a business support system and is the process of gathering data about telecommunication services usage, structuring such data, charging used services, sending invoices, receiving and storing payments from subscribers. In other words, billing is the system responsible for monetizing telecommunication services. Without billing, a telecom business turns into charity.

Telecom billing

Rating as a Component of Telecommunications Billing

A telecom company offers customers different plans and sets different rates and tariffs according to services included in a subscription. And telecom operators approach charging its customers in multiple ways: a monthly fee or pay as you go, or a mixture of both. So, a telecom company should be careful with applying complex charges and sending accurate invoices to keep customers satisfied and receive exact payments for services provided. It is a task of a billing system to automate the handling of all those rates and tariffs as well as other charges like service installation, initiation or termination fees.

The rating engine is the component of a telecom billing system that calculates the price of events occurring in a telecommunication network. Depending on which telecommunication services usage they process: fixed-line or mobile communication, rating engines differ significantly. The architecture of mobile and fixed-line networks is not the same. Telecommunication operators use different hardware for fixed-line and for mobile communications, devices are structured and configured differently. The same is true for rating engines.

In mobile networks, some of the rating processes are done on the telecommunication switches hardware level. Especially when it deals with prepaid services subscribers or flat rates. A billing system may get already pre-rated data about service usage and do fewer operations to transform usage data into payments.

Fixed-line rating engines should do most of the calculations and operations on the software level, as fixed-line hardware oftentimes does not offer rating functionality. Major ready-to-use billing systems from popular vendors can not process the data from fixed-line switches directly. Moreover, a fixed-line service provider often works with a number of legacy rates. In some cases, a telecom operator requires a tailored rating engine additionally to prepare and rate data gathered from fixed-line switches and transfer it to a 3rd party billing system.

So, the load on rating engines in mobile and fixed-line networks and the manner they process events are not equal.

Rating as a Business Task of a Telecom Billing System

The task of a rating engine as a component of a billing system is to calculate each event's price in the operator’s network.

For calculations of fixed-line services, a rating engine takes into account a lot of parameters — an event type, its start time, event duration, an initiator and a receiver of the event, an event source and its endpoints, and takes into account multi-factored rating schemes, or rates, which depend on these parameters, such as special destinations and time categories, calculation unit types, volume discounts, etc.

To ensure correct calculations, the rating procedure passes through several steps. A rating system should subtract the incoming information about events (usually from files), check it, compare and link the input data with the subscriber base, apply the relevant rate plans, prices and tariffs, and calculate the cost of each event, applying discounts where applicable.

The calculation results are recorded in file storage, and further are loaded into the database.

When comparing the event parameters with a subscriber base, rating engine looks not only for an initiator (owner) of the event, it also finds an event recipient and checks if the initiator and recipient of the event belong to the same special group (Close User Group) and whether an individual tariff plan (Rate Plan) may be applied.

After finding the initiator, recipient and rate plan, the event is charged. Unless the operator offers flat rates only, different cost calculation schemes may be used.

To illustrate how complex and time-consuming calculations of voice calls and data transfer sessions may be, below are examples of specific cases.

Special charges may be applied for:

  • parts of the event, depending on duration and time value from the start of the event. (for example, every 5 seconds of a call are charged, or billable time starts from the 10th second).
  • event, thereof depending on the date or time of the event beginning — a particular day of the week, day of the month, month, specific date (and also counting event duration) — for example, a special price is applied for voice calls on Tuesdays, every 11th day of the month or January 1. This logic could get even more complicated if Daylight Saving Time offsets or different time zones have to be taken into account.
  • parts of the event, depending on the total duration of previous events with periodic reduction of the accumulated volumes to zero, for example, the first 20 minutes per month are not billable.

During an operational day, millions of events (commonly known as CDR, Call Detail Records) occur in the telecommunication operator’s network. And this whole set should be processed and charged within a few hours, leaving some time for other operational activities, which are many, the support and maintenance of the system, as well as for the possible recalculation of charges (Re-rating) if there were changes in configurations or prices made for previously charged periods.

Processes Running Under the Hood of Telecommunications Rating

As mentioned earlier, rating engines as a part of a Telecom billing system, do several functions: subtract event information from the files accepted from the hardware switches, verify event data, compare it with the subscriber base, apply subscribers configuration, charge events in accordance with the rating scheme and save the results to local file storage for further uploading to the subscriber’s profile.

At each of these stages, dedicated software modules perform corresponding operations — for example, one module reads an event record (CDR, Call Data Record) from a file, the next one checks the record format and converts CDR to internal UDR (Usage Detail Record) format, etc. Each stage is a set of modules called out in a configured order and runs in a separate thread to perform certain operations on an event

The number of execution threads for a stage is specified in the configuration. So, increasing the number of threads at highly-loaded stages, a telecom operator can speed up event processing at this stage.

The stages are divided logically according to the functions they perform. However, thanks to the modular architecture, it is also possible to redistribute the modules between the stages to improve load balancing. The key point of attention when redistributing modules between stages is not to disrupt the order in the sequence of modules so that every event is processed through all the stages.

Reference data are read from local files and loaded into memory at the start of the rating process and can be used at all stages.

Reference data preparation

To charge events, the data from the subscriber database is often used, and it is grouped into different sets or Dictionaries. Each of these sets is processed by modules that unload data from the database, place it and manage data in system memory during charging processes and modules intended for uploading changes back to the database.

In the case of using parallel algorithms and modular architecture, modules may unload data from the database, prepare the Dictionaries according to defined logic, read them from the database and write to local files for several reference data sets simultaneously.

The main reference data sets the rating engine may request to process:

  • Subscription Number
  • Customer
  • Rate Plan
  • Rate
  • Price
  • Customer User Group Definition.

To avoid the unnecessary database server and network overloads during charge calculation, reference data, which is common for all the calculations, is loaded into memory in the organized sets of data called Dictionaries. The data in the Dictionaries are sorted and indexed depending on the algorithms used to minimize search operations. To search for single values ​​in large data sets, for example, a phone number in the subscriber database, sorted data arrays and binary search are used. A special tree structure is used if there is a need to apply algorithms for choosing the most suitable options from several possible ones. For example, to find the most suitable price depending on the time of a day or the duration of the chargeable event.

Data verification

At this stage, information about events is subtracted from CDR files and checked physically — the recording format as a whole, the format of every field, and logically — valid dates, valid values ​​of record types, coding of switches, etc.

After verification of records, a check for duplication of information is performed. Duplicated records are eliminated in order not to be further processed. A check for double processing of files is also performed before the charging process.

Verified data is transferred to the rating system and verified files will not be re-checked during recounting (Re-rating) or error correction processes.

Identifying subscriber making a call

This is a stage to determine an event owner via a source identifier (a phone number or an IP address) and search for a customer and a subscriber that should be billed for this event. The next step, after a source and owner of the event is identified, is to look for calculation schemes (Rate Plans) associated with an event source and owner.


Rating is basically a calculation stage of the entire charging process — using the reference data, an event data — its dates, duration, source and recipient identifiers, as well as determined on the previous stage subscriber data and Rate Plans, an event cost is calculated. At this stage, also discounts and special offers and conditions are applied.

Output of Telecommunications Rating

The charges calculated on the rating stage are recorded in the file storage for later upload to the database. At this stage, reports and other files are generated to transfer data to other related systems (for example, to data warehouse, 3rd party billing systems, etc.).


On the next stage, rating results consisting of several data sets are uploaded to the database for display in the subscriber’s account. Such data contains information (Usage Detail Records) on the rating of each event or its part, consolidated information for the item or line of the accounting invoice, consolidated information about accumulated event volumes, etc. In addition to the main data, changes to the subscriber’s configuration associated with the use of related services are also uploaded to the database.

Multi-threaded algorithms are used for data loading and its following processing — updating of bills, related services, subscribers data, etc., to increase the speed of the data processing, as well as the overall charging speed for fixed-line charging.


In some cases, events may be charged incorrectly and require re-rating. For example, there may be a mistake in the rate plan, or an event was associated with the wrong customer account, or a current rate plan was replaced or changed with a new one in the middle of a billing period, or later ordering actions came along the way. To re-rate an event, a rating engine processes a mistakenly charged event again: unloads it from the base, calculates the new charge and submits a fixed data for loading back to the database.

Speeding up a Rating Module of Telecommunication Billing System

Business environment analysis

A major telecommunication operator required help with the improvement of a billing system and speed up the rating process for fixed-line services.

A business task is to process 80M of chargeable events (Call Detail Records) within 10 hours so that the system is not busy with calculations for more than half of a day. There are 8M of registered subscribers and 11M of phone numbers in the network. A telecom operator uses the following hardware:

  • Rating AIX server: 6 CPU + 30GB RAM
  • Oracle DB hosted separately.

The estimated speed of processing is calculated as follows: 80,000,000/10/60/60 = 2,222 CDRs/sec. So, a rating engine should process at least 2,222 events to charge all the required 80M within 10 hours.

Solution: How to arrange the computing logic resource effectively

If a telecom operator uses single-threaded processing and direct work with the database for a rating engine, the calculation speed on the given configuration will not exceed 500 CDRs/sec.

To speed up the charging process, the general process of charging events for a fixed-line was divided into three parts — the logic for downloading reference data from the database to local files and memory, the calculation logic that reads events from files and applies rate plans to them and the logic for loading of charged data into the database.

The resource-effective approach to developing a rating engine is the parallelization of data processing and the minimum number of synchronizations. As a result, computing resources are used more completely and delays associated with waiting for the necessary data are minimized. As a result of such an approach, 12GB of reference data is prepared and uploaded for further processing within 15 minutes. On typical production configuration, we’ve reached the download and processing speed of approx. 10,000 UDR/sec.

Implementing the computational logic, a modular architecture was used, which allows grouping processing modules to balance the load and ensure better performance and utilization of computing power.

The delivered system is capable of:

  • greater performance, reducing an operational window for telecommunications rating from 10 hours to 3-4 hours,
  • reducing the testing and integration cycles,
  • bringing growth potential and a reserve of computing power for possible Telecom operator’s network scaling and development,
  • saving time for resource-consuming re-rating and bill simulation operations.

How rating engine software helps Telcos reach business goals

Telecommunications is a high-tech business based on a complex network of hardware and high-end software. Billing systems automate the process of turning services usage into payments. Rating modules are the components of a telecommunication billing system that charge customers according to telecommunication service usage and their tariffs. Also, they prepare data for billing. The performance and accuracy of the rating engines greatly influence customer satisfaction and the profits of a telecom operator. Achieving greater rating software performance is crucial to sustain the everyday business activities of a telecommunications operator, as optimizing time required for the processing and increasing processing speeds, leaves a telecom operator an operational time to explore greater opportunities for scaling and development.

We, at SYTOSS, have provided services of custom software development, application integration, maintenance and support and all other IT services that rating as a high-end process in telecommunications may require. Our expertise is built of 10+ years of long-term cooperation with major Western and European telecommunication operators. We help our telecom clients to modernize legacy telecommunication software, implement modern tools, migrate data, install and set up box solutions and create a company-specific software. In case you are looking for software to transform your business processes, SYTOSS may assist you and be your system integrator and custom software development partner.