For AI agents: this documentation is indexed for you in llms.txt, and all of it in /llms.txt. Every page is also available as markdown: append .md to its address.

You are reading Charging Data Function 3.1, an older release. The newest release is 4.3. Read this page in 4.3

Charging Data Function 3

Charging Data Function (CDF) is an entity in the 3GPP charging architecture for non-5G networks (see 3GPP TS 32.240Opens in a new tab). It collects accounting requests from the Charging Trigger Functions (CTFs) through the Rf reference point using the DIAMETER protocol with different applications, and builds Charging Data Records (CDRs) based on these events. CTFs include such functions as CSCFs (Call Session Control Functions), PGW (Packet Data Network Gateway), or SGW (Serving Gateway). CDRs are then sent to a Charging Gateway Function (CGF) through the Ga reference point (see 3GPP TS 32.295Opens in a new tab).

CDF is split into two parts: receiver and sender.

CDF Diagram
CDF Diagram

CDF receiver

The receiver receives Accounting Requests (ACRs) from Session Management Controller (SMC), parses, and saves a temporary DETS file with the charging data to the local disk. Periodically, the receiver sends the complete DETS files that store the ACRs as a CDR content map to the S3 storage.

Accounting Requests (ACRs)

Accounting Requests (ACRs) are charging events incoming from a CTF, in this case from SMC. There are three types of ACRs: start, interim, and stop. Only the interim and stop requests are saved in an existing DETS file. When the first interim and stop ACRs arrive after the start of CDF or after closing the previous file, they are saved in a newly created, temporary DETS file. If nothing except start records arrives at the receiver, no file is created and nothing is sent to the S3 storage.

CDF sender

The sender periodically receives DETS files from the S3 storage and reads CDRs from these files. It verifies the conditions that must be met to send a CDR through the Ga reference point to CGF. The sender sends CDRs to CGF. If CDF sends GTP Echo Requests and does not get any response, it does not send the CDRs.

Charging Data Records (CDRs)

The Charging Data Records are stored in folders per day of reception and per receiver name. Records are kept, including records that have been successfully transferred to CGF. These records are in a directory called to_archive/ under the receiver name. The transferred records are stored in S3 and directly deleted from the local directory of the sender. How and when they are deleted from S3 is up to the user, as this action is not automatic. To find the CDR that has not been sent yet, CDF goes through S3 by date, looking for the oldest receiver name that has a DETS file in the to_sender/ directory. The sender then sends the CDRs (one at a time) and, if acknowledged by CGF, it is stored in a temporary file. When the file is full (maximum size is configurable), it is closed and transferred to the to_archive/ directory. Further, the file is moved to S3 and deleted from the disk. If CGF doesn't acknowledge the CDR, CDF tries to resend it.