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

Gx Policy Control Configuration

Overview

Gx is the Diameter-based interface between the Policy and Charging Enforcement Function (PCEF) and the Policy and Charging Rules Function (PCRF), defined in 3GPP TS 29.212. Through Gx, the PCRF controls PCC (Policy and Charging Control) rules applied to user sessions.

SMC implements the PCEF role and communicates with an external PCRF via the Gx interface.

References:

  • 3GPP TS 23.203 - Policy and charging control architecture
  • 3GPP TS 29.212 - Gx reference point
  • Diameter Configuration - Diameter transport configuration
  • PCC Rules - PCC rule configuration

Basic Configuration

Gx uses Diameter transport. Configure Diameter transport first (see Diameter Configuration), then enable Gx:

yaml

When enabled is true, SMC sends Credit-Control-Request (CCR) messages to the PCRF via Gx during session establishment, updates, and termination.

Static Policy Provisioning

For testing or deployments without a PCRF, disable Gx and configure rules statically. When aaa.gx.enabled is false, the chart uses a built-in static handler that activates the rule base name configured under aaa.applicationDetection.rulesBaseName:

yaml

This configuration:

  • Disables dynamic Gx communication
  • Activates the configured rule base for all sessions

Gx Procedures

SMC implements three Gx procedures:

CCR-Initial / CCA-Initial

Sent when a user session is established (for example, GTP Create Session Request or PFCP Session Establishment).

Direction: PCEF → PCRF

Purpose:

  • Request initial policies for the session
  • Provide session context (IMSI, APN, location, etc.)
  • Receive PCC rules and QoS policies

Example CCA-Initial response:

yaml

CCR-Update / CCA-Update

Sent when session parameters change (for example, location update, RAT type change, QoS modification).

Direction: PCEF → PCRF

Purpose:

  • Inform PCRF of session changes
  • Request updated policies
  • Receive rule additions or removals

Triggers for CCR-Update:

  • Location change (User-Location-Info)
  • RAT type change (3GPP-RAT-Type)
  • QoS change
  • Bearer operation (addition/modification/deletion)
  • Explicit policy update request

Example CCA-Update response:

yaml

CCR-Terminate / CCA-Terminate

Sent when a user session terminates (for example, GTP Delete Session Request or PFCP Session Deletion).

Direction: PCEF → PCRF

Purpose:

  • Inform PCRF of session termination
  • Close policy context
  • Report final session information

Example CCA-Terminate response:

yaml

PCRF-Initiated Updates

The PCRF can initiate policy updates by sending Re-Authorization-Request (RAR) messages to SMC.

Direction: PCRF → PCEF

Purpose:

  • Install new rules
  • Remove existing rules
  • Modify QoS parameters

SMC response: Re-Authorization-Answer (RAA)

Note

SMC supports PCRF-initiated policy updates via RAR/RAA exchange.

Rule Installation Methods

The PCRF can install PCC rules using three methods:

Installation by Rule Name

Reference a pre-configured rule in SMC:

yaml

The rule "premium-service" must exist in SMC configuration under aaa.applicationDetection.rules.

Advantage: Rules defined once in SMC, referenced by PCRF
Use case: Standard service rules shared across subscribers

Installation by Rule Base

Reference a collection of rules:

yaml

The rule base "silver-tier" must be configured in SMC under aaa.applicationDetection.rulesBaseName.

Advantage: Activate multiple rules with a single reference
Use case: Service tier packages (bronze, silver, gold)

Inline Rule Definition

Define the complete rule in the CCA message:

yaml

The PCRF defines the rule completely, including flow descriptions, precedence, and charging parameters.

Advantage: Dynamic rule creation per subscriber
Use case: Subscriber-specific rules, temporary rules

Tip

Use inline rules when rules must vary per subscriber. Use rule names for common rules to reduce message size and simplify management.

Rule Removal

Remove previously installed rules:

yaml

This removes both "premium-service" and "video-stream" rules from the session.

Note

Rule removal applies to rules installed by name, base, or inline definition.

Session Context AVPs

SMC sends session context information in CCR messages. The PCRF uses this information for policy decisions.

Key AVPs sent by SMC:

For a complete AVP list, see Diameter Support.

Application Mapping

The chart automatically generates the internal AAA procedure chain for Gx based on aaa.gx.enabled. When enabled: true, all three Gx procedures (CCR-Initial, CCR-Update, CCR-Terminate) are wired to the Diameter handler. No manual mapping configuration is needed or supported via Helm values.

Example Configurations

Dynamic Gx with Live PCRF

yaml

Static Policy (Testing)

yaml

Static Policy with Multiple Rules

yaml

Inline Rule Definition (Static)

Inline rule definitions in static CCA answers can be used via the configYaml escape hatch for advanced deployments. See chart configuration reference for configYaml.

Troubleshooting

No Gx Communication

Symptom: CCR messages are not sent to PCRF.

Possible causes:

  • aaa.gx.enabled is false
  • Diameter connection to PCRF is down
  • Gx procedures not mapped in application configuration

Solution:

  1. Enable Gx:

    yaml
  2. Verify Diameter connectivity (see Diameter Configuration)

  3. Verify aaa.gx.enabled: true is set (the chart maps procedures automatically)

  4. Review SMC logs for Gx-related errors

PCRF Rejects Sessions

Symptom: CCA messages contain error result codes (for example, 5xxx).

Possible causes:

  • Session context missing required AVPs
  • Origin-Realm or Destination-Realm mismatch
  • PCRF policy rejects the session (for example, subscriber not found)

Solution:

  1. Check CCA result code in SMC logs

  2. Verify Origin-Realm and Destination-Realm configuration

  3. Review PCRF logs for rejection reason

  4. Verify subscriber exists in PCRF database

Rules Not Activated

Symptom: CCA contains rule names, but rules are not applied to traffic.

Possible causes:

  • Rule does not exist in SMC configuration
  • Flow description syntax error
  • Precedence conflict

Solution:

  1. Verify rule exists under aaa.applicationDetection.rules:

    yaml
  2. Check SMC logs for rule activation errors

  3. Review flow descriptions for syntax errors

  4. Check rule precedence for conflicts (see PCC Rules)

Inline Rules Not Working

Symptom: Inline rule definitions in CCA are rejected or not applied.

Possible causes:

  • Syntax error in Charging-Rule-Definition AVP
  • Missing required sub-AVPs
  • Invalid flow description format

Solution:

  1. Verify all required sub-AVPs are present:

    • Charging-Rule-Name
    • Rating-Group (if charging is enabled)
    • Flow-Information or TDF-Application-Identifier
    • Metering-Method
  2. Check Flow-Description syntax (RFC 6733Opens in a new tab IPFilterRule)

  3. Review SMC logs for parsing errors

  4. Test with a simple inline rule first:

    yaml

Tip

Use static provisioning with inline rules first to verify syntax before testing with a live PCRF.