Rf Offline Charging Configuration
Overview
Rf is the Diameter interface used for offline charging in 3GPP networks, specified in 3GPP TS 32.299. SMC sends Accounting-Request (ACR) messages to a Charging Gateway Function (CGF) or charging system, which generates CDRs (Charging Data Records) for billing.
Offline charging allows service delivery without real-time credit checks. Usage information is collected during the session and processed later for billing.
References:
- 3GPP TS 32.299 - Diameter charging applications
- 3GPP TS 32.251 - Packet Switched (PS) domain charging
- Diameter Configuration - Diameter transport configuration
- Charging Overview - Charging concepts and triggers
Basic Configuration
Enable Rf and configure whether to use common Diameter settings:
When standalone is false, Rf uses Diameter transport settings from aaa.oss (see Diameter Configuration).
When standalone is true, configure Rf-specific settings:
Network Configuration
Rf can use common network settings or dedicated network configuration.
Using Common Network Settings
Using Separate Network Settings
Rf does not have separate network settings. It always uses networking.oss. For separate network configuration, use Ro interface settings (see Ro Configuration).
Accounting Phases
Rf supports three accounting phases:
Accounting-Start
Sent when a user session is established. Contains initial session information:
- User identity (IMSI, MSISDN)
- Session start time
- Network context (PLMN, location, RAT type)
- IP address allocation
- QoS parameters
Automatically enabled when aaa.rf.enabled is true.
Accounting-Interim
Sent periodically during an active session. Contains cumulative usage information:
- Data volume (uplink and downlink)
- Session duration
- Current location
- Current QoS
Interim interval controlled by aaa.acctInterimInterval:
Set to null to disable interim records:
Caution
If RADIUS Stop or Interim accounting are enabled, acctInterimInterval cannot be null.
Accounting-Stop
Sent when a user session terminates. Contains final usage information:
- Final data volume
- Total session duration
- Termination cause
- Final location
Automatically enabled when aaa.rf.enabled is true.
Connection Monitoring
Monitor Rf connections using the diameter_connections metric with label svc="ergw_rf".
Example Prometheus query:
When the metric shows 0, no Rf connections are active. This indicates:
- Charging data is queued in memory
- Memory consumption may increase
- CDRs will be sent when the connection recovers
Caution
During Rf connection failures, traffic data volumes and service information are stored in SMC memory. This may increase memory consumption significantly. Monitor memory usage carefully during extended Rf outages.
Charging Triggers
Rf offline charging generates CDRs based on triggers. See Charging Overview for detailed trigger configuration.
CDR generation triggers:
- ms-time-zone-change
- rat-change
- sgsn-sgw-change
- sgsn-sgw-plmn-id-change
Container update triggers:
- cgi-sai-change
- ecgi-change
- qos-change
- rai-change
- tai-change
- tariff-switch-change
- user-location-info-change
PCC Rule Integration
Offline charging is enabled per PCC rule. Configure rules with offlineEnabled: true:
Multiple rules can share the same rating group for aggregated billing:
Example Configurations
Basic Rf with Common Settings
Rf with No Interim Records
Note
This configuration only sends Accounting-Start and Accounting-Stop messages, not interim updates.
Rf with Standalone Configuration
Multiple Rating Groups
Troubleshooting
No Rf Connection
Symptom: Metric diameter_connections{svc="ergw_rf"} shows 0.
Possible causes:
- CGF/charging system unreachable
- Diameter transport misconfiguration
- Firewall blocking port 3868
Solution:
Verify Diameter transport configuration (see Diameter Configuration)
Check network connectivity:
bashReview SMC logs for Rf connection errors:
bashVerify CGF/charging system is running and accepting connections
Memory Growth
Symptom: SMC memory usage increases continuously when Rf connection is down.
Cause: Charging data is queued in memory while Rf is unavailable.
Solution:
Restore Rf connectivity immediately
Monitor memory usage:
promqlIf memory continues to grow dangerously, consider restarting SMC:
bash
Important
Restarting SMC during an Rf outage results in loss of queued offline charging records.
No CDRs Generated
Symptom: CGF receives no CDRs despite active sessions.
Possible causes:
aaa.rf.enabledisfalse- No rules have
offlineEnabled: true - Sessions do not match any offline-enabled rules
Solution:
Verify Rf is enabled:
yamlVerify at least one rule has offline charging enabled:
yamlVerify rules are activated by checking session logs
Verify sessions match rule flow descriptions
Interim Records Not Sent
Symptom: Start and Stop records are received, but no interim records.
Possible causes:
acctInterimIntervalisnullacctInterimIntervalis larger than session duration- Sessions terminate before interim interval expires
Solution:
Configure interim interval:
yamlReduce interval for testing:
yamlVerify sessions last longer than the interim interval
Check SMC logs for interim accounting messages
Wrong Rating Group in CDRs
Symptom: CDRs contain unexpected rating group values.
Possible causes:
- Multiple rules match the same traffic
- Wrong rule has higher precedence
offlineRatingGroupoverridesratingGroup
Solution:
Review rule precedence - lower values are evaluated first:
yamlCheck for
offlineRatingGroupoverrides:yamlVerify flow descriptions match intended traffic
Test with simple catch-all rules to isolate the issue