> 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/telecom-references/protocols/customer-defined-cdr-records.md).

# Customer defined CDR records

> **Applies to:** Tmedia 3.2; SBC 3.1

### Customer defined CDR records

From release 3.1.101+, The Customer defined CDR records is supported, you can select the SIP generic headers and their parameters as a CDR records used in TextCdr and Radius CDR, look at the list below to see the sip call headers that are not supported by this new feature. And you can use the accounting header defined in sip\_headers\_manipulation.rb (routing script)

For activating the feature, log on the web portal of SBC and go to Gateway->CDR Options->Use Customer CDR header, enter the CDR records you want in text-area box "Customer CDR headers settings" with the format like "cdr record"="sip header":"header parameter", for example:

TERM-IOI=P-Charging-Vector:term-ioi

P-CHARGE-INFO=P-CHARGE-INFO:all

This example means that 2 CDR records are needed, one is TERM-IOI and other one is P-CHARGE-INFO. Each line represents a CDR record and lines are separated by a line return. In this example, CDR record TERM-IOI comes from the received SIP header "P-Charging-Vector" and use its param "term-ioi" as the value of CDR record TERM-IOI. For the second line, CDR record is P-CHARGE-INFO and it comes from received SIP header "P-CHARGE-INFO", the parameter "all" means all of the content of sip header "P-CHARGE-INFO" will be used as the value of CDR record P-CHARGE-INFO. If Radius CDR is used, the attribute name will be like Telcob-generic-cdr-nameX (X will be from 1 to 16 , depends on the number of Customer defined CDR records ).

Usage example:

Text CDR: Test='@{TERM-IOI}',PCV='@{P-CHARGE-INFO}'

Radius CDR: Telcob-generic-cdr-name1 TERM-IOI=xxxxxxxxxxxx , Telcob-generic-cdr-name2 P-CHARGE-INFO=xxxxxxxxxxx

Radius server needs to parse the received value like "TERM-IOI=xxxxxxxxxxxx" for attribute "Telcob-generic-cdr-name1"

If you want to use accounting header with this feature, you need to add the accounting header in script sip\_headers\_manipulation.rb , for example: def filter\_sip\_headers\_manipulation params call\[:manipulation]\[:accounting] = {} call\[:manipulation]\[:accounting]\["header1"] = "value1" call\[:manipulation]\[:accounting]\["header2"] = "value2" end

The header1 and header2 are the accounting headers name you defined for your cdr purpose. After adding them in sip\_headers\_manipulation.rb, in text-area box "Customer CDR headers settings", you add :

HISTORY-INFO=header1:all

ruri=header2:all

Limitation:

1. The maximal number of Customer defined CDR records is 16.
2. All of sip header in the the following list are not supported by the feature.
3. List of SIP header that are not supported: Accept Accept-Contact Accept-Encoding Accept-Language Alert-Info Allow Allow-Events Also Anonymity Authentication-Info Authorization Call-ID Call-Info Contact Content-Disposition Content-Encoding Content-Language Content-Length Content-Type CSeq Date Encryption Error-Info Event Expires From In-Reply-To Max-Forwards MIME-version Min-Expires Min-SE Organization P-Asserted-Identity P-Media-Authorization P-Preferred-Identity Priority Privacy Proxy-Authenticate Proxy-Authorization Proxy-Require RAck Reason Record-Route Refer-To Referred-By Reject-Contact Remote-Party-ID Replaces Reply-To Request-Disposition Require Response-Key Retry-After Route RPID-Privacy RSeq Security-Client Security-Server Security-Verify Server Service-Route Session-Expires Subject Subscription-State Supported Timestamp To Unsupported User-Agen Via Warning WWW-Authenticate

### Links on Call Detail Records

* [CDR](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/concepts/call-detail-record/README.md)
* [Text CDR](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/concepts/text-call-detail-records/README.md)
* [Radius CDR](https://github.com/telcobridges-main/tmedia-wiki/tree/main/reference/protocols/radius/README.md)


---

# 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/telecom-references/protocols/customer-defined-cdr-records.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.
