Real-time charging is the primary mechanism for controlling mobile service usage. Before a subscriber consumes a service, PortaBilling verifies that they have sufficient funds or bundle allowances and locks the necessary funds for the initial period. As the session progresses, the network periodically requests re-authorization; once the session ends, PortaBilling deducts the actual usage from the subscriber's balance.
In 4G/LTE and 5G networks, real-time charging is handled via the Diameter protocol. PortaBilling supports two Diameter interfaces:
- Diameter Gy – used for real-time charging of data sessions. When a subscriber initiates a data session, the mobile core sends an authorization request to PortaBilling. PortaBilling internally reserves the necessary funds and grants a data quota for the initial period. As the session continues, the mobile core periodically reports actual usage and requests re-authorization.
- Diameter Ro – used for real-time charging of voice calls and SMS. For voice calls, the mobile core sends authorization requests to PortaBilling as the call progresses, deducting funds in real time. For SMS, the mobile core sends a request before delivering the message; PortaBilling authorizes the transaction and charges the subscriber's account.
In 2.5G and 3G networks, real-time charging can be handled via the CAMEL protocol, in which case, a CAMEL/Diameter gateway is required. It sits between the mobile core and PortaBilling, converting CAMEL requests to Diameter. See Integration with 2.5G/3G networks for details.
Real-time charging is also supported for roaming services. See Online charging for roaming services for more details.