> For the complete documentation index, see [llms.txt](https://prosbcdocs.telcobridges.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://prosbcdocs.telcobridges.com/appendices/appendix-a-glossary/glossary-call-detail-records-cdr.md).

# Glossary: Call Detail Records (CDR)

ProSBC call detail records: text and RADIUS CDR export, per-leg generation, session identifiers, and CDR behaviour in 1+1 high-availability setups.

### Definition

Call detail records, or CDR for short, are the foundation of subscriber billing activities by telecom service providers. They are data records containing call-related information such as:

* Incoming Network
* Outgoing Network
* Calling number
* Called number
* Start time
* End Time

### TelcoBridges and call detail records

TelcoBridges [TMG800](https://docs.telcobridges.com/wiki/TMG800), [TMG3200](https://docs.telcobridges.com/wiki/TMG3200), [TMG7800](https://docs.telcobridges.com/wiki/TMG7800) and [ProSBC](https://docs.telcobridges.com/wiki/ProSBC) products support the generation of call detail records in [text](https://prosbcdocs.telcobridges.com/configuration-details/configuration-by-web-portal-category/call-detail-records-cdr/cdr-variables) format. They also support the ability to export call detail records to a [RADIUS](https://prosbcdocs.telcobridges.com/appendices/appendix-a-glossary/glossary-radius) server for accounting purposes. Both methods can be used simultaneously.

[Text CDRs](https://prosbcdocs.telcobridges.com/configuration-details/configuration-by-web-portal-category/call-detail-records-cdr/cdr-variables) are stored locally on the devices and must be extracted from the system either manually, or automatically.

If the network supports [RADIUS](https://prosbcdocs.telcobridges.com/appendices/appendix-a-glossary/glossary-radius), this method is preferred as each record will be sent in a timely manner to an external database for storage.

<figure><img src="https://docs.telcobridges.com/w/images/thumb/8/8b/CDR_High-level_drawing_v2.bmp/686px-CDR_High-level_drawing_v2.bmp.png" alt="CDR output paths: RADIUS accounting CDRs go to the server marked Current among several Active servers, plus text CDRs written locally."><figcaption></figcaption></figure>

### Call Detail Records Generation

TelcoBridges CDRs are generated on a per-leg bases when the call is answered and when the call is terminated.

In the cases illustrated below:

Id is a 128 bits unique identifier for all the records of a same call.

* h323-conf-id for RADIUS and @{SessionId} for Text CDR

'*Original Id is a 128 bits unique identifier used for Call Transfer records. Each call transfer outgoing legs has its own unique Id with its Original Id* associated call legs (incoming+outgoing).

* h323-incoming-conf-id for RADIUS and @{OriginalSessionId} for Text CDR

#### Case 1: Call Answered

<figure><img src="https://docs.telcobridges.com/w/images/thumb/6/63/CDR_CallAnswer.jpg/640px-CDR_CallAnswer.jpg" alt="Answered call: START and END records are written on both the A-leg and the B-leg, all sharing session Id 1."><figcaption></figcaption></figure>

#### Case 2: Call Unanswered

<figure><img src="https://docs.telcobridges.com/w/images/thumb/5/5e/CDR_UnansweredCall.jpg/640px-CDR_UnansweredCall.jpg" alt="Unanswered call: no START records are written, only an END record on each leg, both with session Id 1."><figcaption></figcaption></figure>

#### Case 3: Call Transferred

<figure><img src="https://docs.telcobridges.com/w/images/thumb/b/b0/CDR_CallTransferBleg.jpg/640px-CDR_CallTransferBleg.jpg" alt="Call transfer, B-leg: B answers then transfers to C, so the B-leg closes with an END record while the A-leg stays open."><figcaption></figcaption></figure>

<figure><img src="https://docs.telcobridges.com/w/images/thumb/b/b7/CDR_CallTransferCleg.jpg/640px-CDR_CallTransferCleg.jpg" alt="Transferred C-leg records carry their own session Id 2 plus Original Id 1, linking them back to the call that was transferred."><figcaption></figcaption></figure>

### Text-based Call Detail Records

[Text-based call detail records](https://prosbcdocs.telcobridges.com/configuration-details/configuration-by-web-portal-category/call-detail-records-cdr/cdr-variables)

### RADIUS Call Detail Records

[RADIUS](https://prosbcdocs.telcobridges.com/appendices/appendix-a-glossary/glossary-radius)

### Call Detail Records in High Availability (HA) Environment

The term HA refers to a system equipped with primary and secondary host controllers (i.e. A SBC deployed in a 1+1 configuration, a TMG7800 gateway with redundant controllers or Tmedia gateways deployed in a 1+1 configuration)

* Text CDR only Mode
  * The active gateway application is storing text-based CDR records on the active host (i.e. non-zero bytes of CDR log file)
  * Each CDR record will only be present either on the primary or on the secondary host
  * The user needs to merge the CDR records from both the primary and secondary hosts to get all the data
* RADIUS CDR only Mode
  * CDR records will be sent out to the RADIUS server(s) from the gateway application on the active host only
  * No CDR records are stored on the HA system
* Text and RADIUS CDR Mode
  * CDR records will be sent out to RADIUS server(s) from the gateway application on the active host
  * The active gateway application is also storing text-based CDR records on the active host (i.e. non-zero bytes of CDR log file)
  * Also, each text-based CDR record will only be present either on the primary or on the secondary host
  * The user needs to merge the CDR records from both the primary and secondary hosts to get all the data
* RADIUS CDR with text CDR fallback Mode
  * If the RADIUS server(s) is(are) in service
    * CDR records will be sent out to the RADIUS server(s) from the gateway application on the active host only
  * If the RADIUS server(s) is(are) out of service
    * The active gateway application is storing text-based CDR records on the active host (i.e. non-zero bytes of CDR log file)
    * Each CDR record will only be present either on the primary or on the secondary host
    * The user needs to merge the CDR records from both the primary and secondary hosts to get all the data

\
Click here for instructions on [Customer defined CDR records](https://docs.telcobridges.com/wiki/CDR:Customer_defined_CDR_Records)

### Links on Call Detail Records

* [Text CDR](https://prosbcdocs.telcobridges.com/configuration-details/configuration-by-web-portal-category/call-detail-records-cdr/cdr-variables)
* [Radius CDR](https://prosbcdocs.telcobridges.com/appendices/appendix-a-glossary/glossary-radius)
* [Wikipedia - Call Retail Record](http://en.wikipedia.org/wiki/Call_detail_record)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://prosbcdocs.telcobridges.com/appendices/appendix-a-glossary/glossary-call-detail-records-cdr.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
