Charging Overview
What is Charging?
Charging is the process of collecting, measuring, and reporting resource usage for billing purposes. In mobile networks, charging tracks data volume, session duration, and service usage to generate bills for subscribers.
SMC implements charging functions for both traditional (EPC) and 5G Core networks, collecting detailed usage information and sending it to charging systems.
Online vs Offline Charging
Mobile networks use two charging models:
Online Charging
Online charging (also called prepaid or real-time charging) verifies credit availability before allowing service usage. The network checks with a charging system in real-time to ensure the subscriber has sufficient credit.
How it works:
- User requests service (for example, data session)
- SMC requests quota from Online Charging System (OCS)
- OCS checks subscriber balance and grants quota (for example, 100 MB or 1 hour)
- SMC allows service up to the granted quota
- When quota is consumed, SMC requests more quota or terminates service
- OCS deducts charges from subscriber balance immediately
Advantages:
- Prevents overspending
- Real-time balance deduction
- Fraud prevention
Disadvantages:
- Requires constant OCS availability
- Higher latency (quota checks delay service establishment)
- More complex implementation
Use cases:
- Prepaid mobile services
- Pay-as-you-go data
- Budget-controlled accounts
Protocol: Diameter Ro over Gy reference point (3GPP TS 32.299)
Offline Charging
Offline charging (also called postpaid or batch charging) collects usage information during service delivery and processes it later for billing. The network allows service first and charges afterwards.
How it works:
- User requests service
- SMC allows service immediately
- SMC collects usage information (data volume, duration, location)
- SMC sends charging records to Charging Gateway Function (CGF) or billing system
- Billing system processes records later (hourly, daily, monthly)
- Subscriber receives bill periodically
Advantages:
- Simple implementation
- Low latency (no quota checks)
- Works when charging system is temporarily unavailable
Disadvantages:
- Risk of overspending
- Delayed fraud detection
- Requires credit risk management
Use cases:
- Postpaid mobile services
- Enterprise accounts
- Flat-rate unlimited plans
Protocols:
- Diameter Rf (3GPP TS 32.299)
- RADIUS Accounting (IETF RFC 2866Opens in a new tab)
- Diameter NASREQ (IETF RFC 7155Opens in a new tab)
Charging in SMC
SMC supports both online and offline charging simultaneously. PCC rules control which charging type applies to specific traffic.
Charging Triggers
SMC generates charging records based on configured triggers. Different triggers cause different actions:
CDR Generation Triggers
These triggers cause SMC to close the current CDR and send a new one:
ms-time-zone-change- User's time zone changesrat-change- Radio Access Technology changes (for example, 3G to 4G)sgsn-sgw-change- Serving gateway changessgsn-sgw-plmn-id-change- Serving network PLMN changes
Charging Container Update Triggers
These triggers update the charging containers within the current CDR without closing it:
cgi-sai-change- Cell Global Identity or Service Area Identity changesecgi-change- E-UTRAN Cell Global Identifier changesqos-change- QoS parameters changerai-change- Routing Area Identifier changestai-change- Tracking Area Identifier changestariff-switch-change- Charging tariff changesuser-location-info-change- User location information changes
Trigger Configuration by Role
Triggers vary depending on SMC's role:
SMC as GGSN/PGW:
- Container updates: cgi-sai-change, ecgi-change, qos-change, rai-change, tai-change, tariff-switch-change, user-location-info-change
- CDR generation: ms-time-zone-change, rat-change, sgsn-sgw-change, sgsn-sgw-plmn-id-change
SMC as TDF (Traffic Detection Function):
- Container updates: sgsn-sgw-plmn-id-change, tariff-switch-change
- CDR generation: ms-time-zone-change
Reference: 3GPP TS 32.251, sections 5.2.3.4, 5.2.3.9, 5.2.3.10
Change Reporting Action (CRA)
For location-dependent triggers, SMC sends a Change Reporting Action (CRA) IE in GTPv2 Create Session Response messages. This instructs the SGSN/SGW to notify SMC when location changes occur.
The CRA IE depends on:
- Access network type (UTRAN, E-UTRAN)
- CRSI (Change Reporting Support Indication) flag
- ENBCRSI (eNodeB Change Reporting Support Indication) flag
- Configured triggers
Example CRA values:
Rating Groups
Rating groups categorise traffic for different billing rates. Multiple rules can share the same rating group to aggregate usage.
Rating groups are sent in charging messages and used by the charging system to apply the correct billing rates.
Reference: RFC 4006Opens in a new tab, section 5.1.2
Metering Methods
Metering methods define what is measured for charging:
Configure per rule:
Charging Interfaces
SMC supports multiple charging interfaces:
See interface-specific documentation:
- Rf Configuration - Offline charging via Diameter
- Ro (Gy) Configuration - Online charging via Diameter and OCS
- RADIUS Charging - Offline charging via RADIUS
Charging Data Records (CDRs)
A CDR (Charging Data Record) contains detailed information about resource usage:
Common CDR fields:
- Session identifiers - IMSI, MSISDN, Session-Id
- Time information - Start time, stop time, duration
- Location information - Cell ID, Tracking Area, PLMN
- Volume information - Uplink bytes, downlink bytes, total bytes
- QoS information - QoS class, bandwidth
- Rating information - Rating group, service identifier
- Network information - APN/DNN, IP address, RAT type
- Charging identifiers - Charging ID, correlation IDs
CDR types in SMC:
- PGW-CDR - Generated by SMC in PGW role
- TDF-CDR - Generated by SMC in TDF role
- GGSN-CDR - Generated by SMC in GGSN role (legacy 3G)
Reference: 3GPP TS 32.251
Configuration Overview
Charging configuration is split across multiple areas:
AAA Transport:
- Diameter Configuration - Diameter transport for Rf/Ro/NASREQ
- RADIUS Configuration - RADIUS transport
Policy Control:
- PCC Rules - Define charging parameters per rule
- Gx Configuration - Policy control via Diameter
- Npcf Configuration - Policy control via HTTP/2
Charging Interfaces:
- Rf Configuration - Offline charging configuration
- Ro Configuration - Online charging configuration
- RADIUS Charging - RADIUS charging configuration
Next Steps
Configure AAA transports:
- Diameter Configuration for Rf/Ro (Gy)
- RADIUS Configuration for RADIUS accounting
Define PCC rules with charging parameters:
Enable charging interfaces:
- Rf Configuration for offline charging
- Ro (Gy) Configuration for online charging
- RADIUS Charging for RADIUS accounting
Configure policy interfaces to activate rules:
- Gx Configuration for Diameter Gx
- Npcf Configuration for Npcf