Mapping CDRs to Import into TimelyBill
![Mapping CDRs to Import into TimelyBill](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzi_sP8MIxnROy0gjsfPln3nxuM9S0nuQboqfhnEQu6i194wAmkdHUkma77g0Md5rezUNc0JE8otcos2E0vRzHA99dhToEAvWpbtiB5P3cfMHf687iZ_z8WCMf6O8jSvNLbtlJQlRp2yffTl4_1AkC7IEcIdVF-hHTcVydTc5xOdC8RpQX0ME_orxAucXF/s1600/CDR-mapping-and-importing.png)
How We Map and Import CDRs into TimelyBill for Accurate Telecom Billing
In telecommunications, CDRs (Call Detail Records) originate from the telecommunication switches or exchange systems that handle and route phone calls. These systems log detailed information about each call that passes through them.
CDRs are typically plain text "flat" files that store usage data in a structured format.
Flat files do not contain relationships between data points. Instead, they represent data in a straightforward manner, often using delimiters like commas, tabs, or spaces to separate values.CDRs must be mapped and imported into TimelyBill, so our system can rate and bill usage charges.
Providing these CDR files to TimelyBill is important for the smooth operation of your telecom business. It ensures accurate billing, regulation compliance, fraud detection, and better customer support.Understanding the data within a CDR will help you manage call usage charges and fees inside of TimelyBill.
To assist new TimelyBill customers, we provide a data mapping document to ensure that usage is imported into our system accurately. This mapping is done only once (as long as the CDR structure doesn't change). Our importers will then apply this mapping logic to all future CDRs pulled into our system.
Here's a breakdown of the key fields in the mapping spreadsheet that you'll populate with the corresponding data in your CDRs:
![]() |
Sample telecom usage mapping spreadsheet |
Core Call Information
Organization ID: The unique ID of the organization identifies the organization making or receiving the call.
Rate Type: The ID of the call's rate type determines the call's pricing structure.
From Number: The originating number, extension, etc., identifies the source of the call.
To Number: The terminating number, extension, that identifies the call's destination.
Start Date Time: Call start date and time (e.g., 02/26/2018 19:59:32).
Actual Duration: The actual duration of the call is typically in seconds. Indicates the length of the call for billing purposes.
Rated Flag: Flag indicating if the call is pre-rated (Y/N). Typically, N. Shows whether the call has been pre-rated for billing.
Common Call Information
LD Carrier ID: Unique integer of the carrier ID for importing from multiple switches. Provides visibility into the record source in the billing system.
Trunk Group: Identifies the trunk group or other identifiers related to a billable service. Helps in billing and routing the call appropriately.
ESN (Emergency Services Number): When using trunk groups, indicate the other side. This number is used for emergency services routing.
Location: City, Rate Center, or Location for the call. Geographical identification of the call's origin or destination.
Region: For NANPA destinations, the two-digit state/province code. Identifies the regional location for regulatory and billing purposes.
From OCN: The originating Operating Company Number. Identifies the originating telecom operator.
To OCN: The terminating Operating Company Number. Identifies the terminating telecom operator.
From LATA: The originating Local Access and Transport Area. Geographical area used in telecom billing.
To LATA: The terminating Local Access and Transport Area. Geographical area used in telecom billing.
Additional Information
Billing Number: The Billing Telephone Number is helpful when other fields do not contain enough information to link the call to a billable service. Ensures the call can be billed correctly.
Pin Number: The pin code, conference code, authorization code, etc., are used for security and authorization of the call.
Provider Cost: The call cost from the upstream provider. Helps calculate the margin data.
Message Cost: If calls are pre-rated, the rate for this call is a maximum of 6 decimal places. The Rated Flag should be "Y." Accurate billing information for pre-rated calls.
Message Duration: The calculation duration is based on any minimum and incremental units for pre-rated calls. Ensures accurate duration measurement for billing.
Record Type: Type of record (T - Telephone/VoIP, D - Data, I - IP, P - Pay per, U - Unknown). "T" is assumed if the field is not present. This identifies the type of communication for the call.
Call Typing, Rating, and Billing
After your CDRs are mapped, they can be typed and rated. Data typing refers to defining and structuring the data within call detail records. This involves classifying the data to differentiate between call types (local calls, long-distance calls, interstate calls, etc.) that may be billed at different rates.
The processed data is then used to apply the appropriate rates based on the customer's billing plan and call details. TimelyBill then calculates the total charges for the billing cycle.
Timely Tip:
Established telecoms are most likely familiar with these concepts. However, MSPs or others just entering the telecom space must be familiar with them, especially during the implementation phase↗️.
Mapping CDR data into TimelyBill correctly will lead to more accurate billing. By familiarizing yourself with these fields, you can ensure that your organization's billing process is set up to be efficient and profitable from the beginning!