Version

Gy AVPs

Gy (application id: 14)

The Gy interface is a component in the 3GPP-defined online charging system (OCS), connecting the Policy and Charging Enforcement Function (PCEF) to the Online Charging System (OCS). This interface is responsible for enabling real-time, session-based charging in mobile networks. Diameter protocol supports various charging models, such as session-based, event-based, or volume-based charging.

OCS is responsible for managing the real-time credit control and charging of user sessions. It monitors the user’s account balance, processes credit requests from the PCEF, and sends back charging responses that determine whether a service can continue based on the user’s available credit.

Gy interface workflow

Session Initialization:

  • When a user initiates a session, such as starting a data connection, the PCEF generates a Credit Control Request (CCR) and sends it to the OCS via the Gy interface. 

Credit Authorization by OCS:

  • Upon receiving the CCR, the OCS checks the user’s account balance to determine if there is sufficient credit to authorize the session. The OCS then responds with a Credit Control Answer (CCA), which includes the granted credit units (e.g., data volume or time) and instructions on how the PCEF should proceed with the session.

Ongoing Monitoring and Mid-Session Requests:

  • As the session continues, the PCEF monitors the user’s data usage or session duration. If the user approaches the allocated credit limit, the PCEF sends another CCR to the OCS to request additional credit.

Service Continuation or Termination:

  • If the OCS grants additional credit, the session continues seamlessly. If the OCS denies the request due to insufficient credit, the PCEF may terminate the session or reduce the service level, depending on the instructions received.

Session Termination:

  • At the end of the session, the PCEF sends a final CCR to the OCS to report the total usage and finalize the charging process. The OCS deducts the appropriate amount from the user’s balance, closes the session, and updates the billing system accordingly.

For functionality and use cases of the Gy interface please refer to: [3GPP TS 32.251]
For the Diameter charging applications details please refer to: [3GPP TS 32.299]

package com.mobius.software.telco.protocols.diameter.primitives.gy

 Name

AVP Code

Data Type

Vendor

Final-Unit-Indication

430

Grouped

IETF

Used in the Credit-Control-Answer (CCA) message within the Diameter Gy interface to signal that a quota limit for a service has been reached or exhausted. This AVP specifies the action to be taken when the final units are consumed and may also define a redirect server for handling user traffic. The Final-Unit-Indication AVP is primarily utilized for prepaid services to handle scenarios where additional service usage is denied, or the user is redirected for recharging or notifications.

The AVP structure is defined as follows:

Final-Unit-Action (Mandatory, Enumerated): Specifies the action to be executed when the final units are consumed. Enumerated Values:

  • TERMINATE (0): Disconnects the user's session immediately.

  • REDIRECT (1): Redirects the user to a specific server for additional actions (e.g., top-up or notification).

  • RESTRICT_ACCESS (2): Allows continued access but restricts the services or data allowed.

Redirect-Server (Optional, Grouped): Specifies the URL or IP address of the redirect server where the user is sent for further action, applicable only when Final-Unit-Action = REDIRECT. Contains:

  • Redirect-Address-Type (Enumerated) – Specifies whether the address is IPv4, IPv6, or a URL.

  • Redirect-Server-Address (UTF8String) – Contains the actual address of the redirect server.

Granted-Service-Unit

431

Grouped

IETF

Specifies the amount of service units (e.g., time, volume) that are granted to a user for the current session or request. This AVP is typically included in Diameter Credit-Control messages and is used to manage resource allocation and enforce usage limits. This AVP is derived from the Requested-Service-Unit AVP and provides additional details about the allocated service units. The AVP structure is defined as follows:

CC-Time (Optional): Specifies the time granted for the service in seconds. This parameter is used for time-based charging.

CC-Total-Octets (Optional): Specifies the total volume of data (in octets) granted for the service. Includes both uplink and downlink traffic.

CC-Input-Octets (Optional): Specifies the volume of data (in octets) granted for uplink traffic.

CC-Output-Octets (Optional): Specifies the volume of data (in octets) granted for downlink traffic.

PS-Information

874

Grouped

3GPP

Used within the Gy interface to provide Packet-Switched (PS) charging-related information. It is typically included in the Credit-Control-Request (CCR) message. This AVP encapsulates data about the IP-CAN session, such as connection identifiers, IP addresses, quality of service (QoS) settings, location information, and access technology type. The AVP structure is defined as follows:

3GPP-Charging-Id (Optional, OctetString): Identifies the charging session for correlation between charging records.

PDN-Connection-Charging-Id (Optional, Unsigned32): Uniquely identifies the PDN connection associated with the session.

PDN-Type (Optional, Enumerated): Specifies the type of PDN connection (e.g., IPv4, IPv6, or IPv4v6).

PDP-Address (Optional, Address): Contains the IP address assigned to the PDP context.

PDP-Address-Prefix-Length (Optional, Unsigned32): Specifies the prefix length for IP addressing.

3GPP-GPRS-Negotiated-QoS-Profile (Optional,UTF8String): Describes the QoS profile negotiated for the session.

GGSN-Address (Optional, Address): Stores the IP address of the GGSN.

TDF-IP-Address (Optional, Address): Provides the IP address of the Traffic Detection Function (TDF) node.

3GPP-IMSI-MCC-MNC (Optional, UTF8String): Contains the IMSI with MCC (Mobile Country Code) and MNC (Mobile Network Code).

3GPP-GGSN-MCC-MNC (Optional, UTF8String): Provides the MCC/MNC of the GGSN.

Called-Station-Id (Optional, UTF8String): Contains the called station identifier used during authentication.

Session-Stop-Indicator (Optional, OctetString): Indicates whether the session has been stopped.

Selection-Mode (Optional, UTF8String): Specifies the selection mode used for PDP context activation.

MS-Time-Zone (Optional, OctetString): Defines the time zone of the Mobile Station (MS).

User-Location-Info (Optional, OctetString): Provides the user's location information.

RAT-Type (Optional, Enumerated): Specifies the Radio Access Technology (RAT) type used by the UE.

Requested-Service-Unit

437

Grouped

IETF

Used by the Credit-Control-Request (CCR) message to specify the amount of service units requested by the client during a charging session. This AVP enables dynamic allocation of resources such as time, volume, or monetary value based on the user’s service plan or policies. The AVP structure is defined as follows:

CC-Time (Optional, Unsigned32): Specifies the time units (in seconds) requested for service consumption.

CC-Total-Octets (Optional, Unsigned64): Requests the total volume (bytes) of data, including both input and output traffic.

CC-Input-Octets (Optional, Unsigned64): Requests the volume (bytes) of input (uplink) data.

CC-Output-Octets (Optional, Unsigned64): Requests the volume (bytes) of output (downlink) data.

CC-Service-Specific-Units (Optional, Unsigned64): Requests service-specific units, such as SMS counts or voice call durations, depending on the service type.

Service-Information

873

Grouped

3GPP

Provides detailed service-specific information required for charging in Diameter Gy sessions. This AVP acts as a container for service-related data, enabling the PCRF and OCS (Online Charging System) to handle service monitoring, charging, and policy enforcement effectively. The AVP structure is defined as follows:

PS-Information (Optional, Grouped): Contains Packet-Switched (PS) session-specific charging information, such as QoS, IP addresses, and session identifiers. Contains:

  • 3GPP-Charging-Id (AVP Code: 2) – Unique identifier for the charging session.

  • PDN-Type (AVP Code: 143) – Specifies the PDN type (IPv4, IPv6).

  • PDP-Address (AVP Code: 122) – Provides the IP address assigned to the session.

  • GGSN-Address (AVP Code: 847) – Indicates the GGSN address for traffic routing.

  • TDF-IP-Address (AVP Code: 1091) – Includes the Traffic Detection Function (TDF) IP address.

  • User-Location-Info (AVP Code: 22) – Specifies the user's location information for regional charging.

  • RAT-Type (AVP Code: 1032) – Specifies the Radio Access Technology used (e.g., LTE, WLAN).

Multiple-Services-Credit-Control

456

Grouped

3GPP

Supports independent credit control of multiple services within a single charging session. The AVP structure is defined as follows:

Requested-Service-Unit (Optional, Grouped): Specifies the requested service units (volume, time, or monetary value).

Used-Service-Unit (Multiple Allowed, Grouped): Reports used service units (volume, time, or monetary value).

Granted-Service-Unit (Optional, Grouped): Contains the granted service units allocated to the user.

Rating-Group (Optional, Unsigned32): Groups services for rating and charging purposes.

Validity-Time (Optional, Unsigned32): Specifies the validity period for the granted quota.

Result-Code (Optional, Unsigned32): Indicates the result of the credit-control operation.

Final-Unit-Indication (Optional, Grouped): Specifies actions when the final unit is consumed. Contains:

  • Final-Unit-Action – Determines the action (e.g., terminate, redirect).

  • Redirect-Server – Provides redirection information.

Quota-Holding-Time (Optional, Unsigned32): Defines how long unused quotas are held after the user becomes inactive.

Quota-Consumption-Time (Optional, Unsigned32): Sets the time period for usage monitoring before quotas are released.

Time-Quota-Threshold (Optional, Unsigned32): Indicates the threshold for time-based usage.

Volume-Quota-Threshold (Optional, Unsigned32): Specifies the threshold for volume-based usage.

Unit-Quota-Threshold (Optional, Unsigned32): Sets the threshold for unit-based usage.

GSU-Pool-Reference (Optional, Grouped): Provides references to pooled resources for usage monitoring.

Reporting-Reason (Optional, Multiple Allowed, Enumerated): Indicates the reason for reporting (e.g., threshold reached, quota exhausted).

Trigger (Optional, Grouped): Specifies events or conditions that trigger reporting or updates.

AF-Correlation-Information (Optional, Multiple Allowed, Grouped): Correlates usage records with application functions (AF) for service monitoring.

QoS-Information (Optional, Grouped): Defines Quality of Service (QoS) attributes for the service, including bandwidth limits and priorities.

Used-Service-Unit

446

Grouped

IETF

Reports the amount of resources consumed during the current session. These resources may include time, data volume, or monetary value, providing essential metrics for charging and billing systems. This AVP is crucial for postpaid and prepaid systems to track usage and enforce policy controls dynamically. The AVP structure is defined as follows:

CC-Time (Optional, Unsigned32): Specifies the time (in seconds) consumed during the session.

CC-Money (Optional, Grouped): Represents the monetary value consumed, typically used for monetary-based charging. Contains:

  • Unit-Value: Value and currency details.

  • Currency-Code: ISO 4217 numeric code for currency.

CC-Total-Octets (Optional, Unsigned64): Indicates the total data volume consumed (in octets) during the session.

CC-Input-Octets (Optional, Unsigned64): Specifies the downlink data volume (in octets) received by the user equipment (UE).

CC-Output-Octets (Optional, Unsigned64): Specifies the uplink data volume (in octets) sent by the user equipment (UE).

Reporting-Reason (Optional, Multiple Allowed, Enumerated): Describes the triggering condition for reporting usage data. Enumerated Values:

  • THRESHOLD_REACHED (0): Reporting due to reaching a predefined quota threshold.

  • FINAL (1): Reporting at the end of the session.

  • QUOTA_EXHAUSTED (2): Reporting due to quota exhaustion before session ends.

  • VALIDITY_TIMEOUT (3): Reporting when the validity time expires.

  • OTHER_QUOTA_TYPE (4): Reporting for a different type of quota being used. 

 

Start innovating with Mobius

What's next? Let's talk!

Mobius Software

As a company you'll get:

  • Get started quickly

  • Support any business model

  • Join millions of businesses

Questions? websupport@mobius.com