r function (CTF) generates charging events based on the observation of the use of network resources. It is integrated in all the entities of the IMS network. The charging data function (CDF) receives the charging data from the CTF function. The CDF function then uses these data to generate charging data records (CDR). The charging data records produced by the CDF function are kept in the charging gateway function (CGF), a database which acts as a gateway with the billing system. 1.4.1.2. Online charging The functional architecture of the online charging system (OCS) is described in Figure 1.9. 20 VoLTE and ViLTE DIAMETER Billing system S-CSCF I-CSCF P-CSCF Figure 1.8. Functional architecture of OFCS DIAMETER Billing System S-CSCF IMS-GWF Figure 1.9. Functional architecture of OCS The S-CSCF entity does not trigger any charging event and does not necessarily include the CTF function. Charging during a session is a service logic controlled by an application server IMS Gateway Function (IMS-GWF). The OCS entity comprises several distinct modules: - charging on the basis of the sessions established by the users (e.g. voice calls); - charging on the basis of events in conjunction with application servers; Network Architecture - valorization of the use of network resources to calculate the amount of charging; - balance of the user's account. The generation of CDRs sent to the billing system is optional. If the OCS entity does not produce CDRs, they are used by the same CDF as with offline charging. 1.4.2. Protocol architecture The Rf interface is the reference point between, on the one hand, the entities of the IMS network, while on the other hand, the OFCS entity. This interface supports the DIAMETER signaling. The Ro interface is the reference point between, on the one hand, the entities of the IMS network, and on the other hand, the OCS entity. This interface supports the DIAMETER signaling. 1.5. PCC function 1.5.1. Functional architecture The functional architecture of the policy and charging control (PCC) is descr