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 Session Management Controller 3.15, an older release. The newest release is 3.17. Go to 3.17

Ro (Gy) Online Charging Configuration

Overview

Ro is the Diameter Credit-Control Application running over the 3GPP Gy reference point for online charging in 3GPP networks. It is specified in 3GPP TS 32.299. SMC sends Credit-Control-Request (CCR) messages to the Online Charging System (OCS), which grants quota based on subscriber credit availability.

Online charging verifies credit before allowing service delivery, making it suitable for prepaid and budget-controlled accounts.

Note

While technically named "Ro" (the Diameter application), this interface is commonly referred to as "Gy" in 3GPP terminology, which is the reference point name users typically search for.

References:

Basic Configuration

Enable Ro and configure whether to use common Diameter settings:

yaml

When standalone is false, Ro uses Diameter transport settings from aaa.oss (see Diameter Configuration).

When standalone is true, configure Ro-specific settings:

yaml

Network Configuration

Ro can use common network settings or dedicated network configuration.

Using Common Network Settings

yaml

Using Separate Network Settings

Configure dedicated network settings for Ro:

yaml

Credit-Control Procedures

Ro implements three credit-control procedures:

CCR-Initial / CCA-Initial

Sent when a user session requiring online charging is established.

Purpose:

  • Request initial quota from OCS
  • Provide session context (IMSI, MSISDN, service details)
  • Receive granted quota (volume, time, or both)

OCS response (CCA-Initial):

  • Granted-Service-Unit (volume and/or time)
  • Validity-Time (quota expiration)
  • Result-Code (success or failure)

If the OCS denies credit (for example, insufficient balance), the session is not established or the service is restricted.

CCR-Update / CCA-Update

Sent when granted quota is nearly exhausted or when session parameters change.

Triggers:

  • Quota threshold reached (for example, 80% consumed)
  • Quota expiration approaching
  • Service-level changes
  • Location or RAT type changes

Purpose:

  • Report consumed quota
  • Request additional quota
  • Update session information

OCS response (CCA-Update):

  • Additional granted quota
  • Quota refill
  • Service termination instruction

CCR-Terminate / CCA-Terminate

Sent when the user session terminates.

Purpose:

  • Report final consumed quota
  • Close charging context
  • Final balance update

OCS response (CCA-Terminate):

  • Acknowledgement
  • Final cost (informational)

PCC Rule Integration

Online charging is enabled per PCC rule. Configure rules with onlineEnabled: true:

yaml

Multiple rules can use the same rating group, or use separate rating groups for different services:

yaml

OCS Free Feature

OCS Free allows user sessions to continue with predefined quota when the OCS is unavailable or unresponsive. This prevents service disruption during OCS outages.

Enabling OCS Free

yaml

When enabled, SMC uses predefined responses in these conditions:

  • OCS is unreachable (connection down)
  • Request times out
  • Rate limit is exceeded

OCS Free Behaviour

When OCS Free activates, SMC generates a synthetic CCA response:

yaml

Key characteristics:

  • One entry per rule with onlineEnabled: true
  • Granted time is randomised between ccTimeMin and ccTimeMax
  • Rating group comes from rule configuration (onlineRatingGroup or ratingGroup)
  • No volume quota is granted (time-based only)
  • When granted quota expires, the session terminates without further OCS communication

Caution

OCS Free grants quota without real credit checks. Use only for temporary OCS outages. Sessions may exceed subscriber credit limits during OCS Free operation.

OCS Free Configuration Parameters

Recommended values:

  • ccTimeMin: 3600 - 1 hour minimum
  • ccTimeMax: 7200 - 2 hours maximum

Randomisation prevents all sessions from expiring simultaneously when OCS recovers.

Example Configurations

Basic Ro with Common Settings

yaml

Ro with OCS Free

yaml

Ro with Separate Network

yaml

Multiple Online Services

yaml

Hybrid Charging (Online + Offline)

yaml

Troubleshooting

Sessions Rejected by OCS

Symptom: Sessions fail to establish with insufficient credit errors.

Cause: OCS reports subscriber has insufficient balance.

Solution:

  1. Verify subscriber balance in OCS

  2. Check OCS policies for the subscriber

  3. Review CCA result code in SMC logs:

    • 4xxx = Client error (for example, invalid request)
    • 5xxx = Server error (for example, OCS internal error)
  4. Check OCS logs for rejection reason

OCS Not Reachable

Symptom: All sessions fail with connection errors.

Possible causes:

  • OCS server down
  • Network connectivity issues
  • Firewall blocking port 3868

Solution:

  1. Verify OCS connectivity (see Diameter Configuration)

  2. Check if OCS Free is enabled and activating:

    yaml
  3. Review SMC logs for Ro connection errors

  4. Verify OCS service status

OCS Free Not Activating

Symptom: Sessions fail when OCS is down despite OCS Free being enabled.

Possible causes:

  • OCS Free not enabled
  • Configuration error in ocsFree section
  • No rules have onlineEnabled: true

Solution:

  1. Verify OCS Free is enabled:

    yaml
  2. Verify at least one rule has online charging enabled:

    yaml
  3. Check SMC logs for OCS Free activation messages

  4. Test OCS connectivity issues (stop OCS temporarily)

Quota Exhausted Too Quickly

Symptom: Sessions terminate frequently due to quota exhaustion.

Possible causes:

  • OCS grants small quota
  • High data usage
  • Quota threshold too high (causing frequent re-authorisation)

Solution:

  1. Check OCS quota grant policies

  2. Review typical usage patterns for the service

  3. Consider increasing quota threshold in OCS configuration

  4. Check for traffic loops or unusual traffic patterns

Wrong Rating Group in Ro Messages

Symptom: CCR messages contain unexpected rating group values.

Possible causes:

  • Multiple rules match the same traffic
  • Wrong rule has higher precedence
  • onlineRatingGroup overrides ratingGroup

Solution:

  1. Review rule precedence:

    yaml
  2. Check for onlineRatingGroup overrides:

    yaml
  3. Verify flow descriptions match intended traffic

  4. Check SMC logs for rule activation details

OCS Free Quota Too Short

Symptom: Sessions terminate quickly during OCS Free operation.

Cause: ccTimeMin and ccTimeMax values are too small.

Solution:

Increase OCS Free time grants:

yaml

Tip

Balance OCS Free quota with business risk. Longer quotas provide better service continuity but increase revenue risk during OCS outages.

Sessions Not Using OCS Free

Symptom: Sessions fail when OCS is unavailable despite OCS Free configuration.

Possible causes:

  • Connection to OCS not detected as down (slow timeout)
  • Rate limiting not configured correctly
  • OCS responding with errors instead of timing out

Solution:

  1. Verify connection monitoring detects OCS failures

  2. Configure rate limiting to trigger OCS Free faster:

    yaml
  3. Check OCS response codes - 5xxx errors should trigger OCS Free

  4. Review timeout settings (fixed at 5000 milliseconds)

Note

OCS Free activates when OCS is unreachable, times out, or rate limit is exceeded. It does not activate for OCS rejections (insufficient credit).