Diameter Gy Interface

Gy is another diameter interface between PCEF and OCS  having application id  14 for charging application. So fist we will understand what is PCEF and OCS.  PCEF full form is Policy and Charging Enforcement Function. This component is located inside GGSN or PGW. Gy interface is for online charging.  For policy there is another interface called Gx , that we will discuss in another tutorial. For charging PCEF interacts with the OCS, sends the charging events to OCS and receives events and answers. OCS is online charging system, this a node which have subscriber profile for charging. E.g is a subscribe is roaming in a country,  he will request for data from GGSN. GGSN will query to the OCS with IMSI and roaming details over Gy. If subscriber is allowed for data then OCS will allocate bytes to the IMSI with validity time.  The charging application specification is give in diameter standard  4006.  Following section describes call flow GTP and Diameter messages for charging over Gy interface.

Gy interface messages:

Gy uses two messages over Diameter protocol, Credit control request (CCR) and Credit Control Answer (CCA).  For accessing the data , a data session is created , update and terminated for a device. Following are the details for Gy messages.

Gy Credit control request and answer (CCR/CCA):

GGSN or PGW sends this message to the OCS. Command code for CCR is 271 with R bit set as this is a request message. When a Create PDP context request arrives at GGSN. GGSN sends a CCR message to the OCS with CC Request Type diameter AVP value as INITIAL_REQUEST with IMSI and a unique session id. There are other parameter (e.g Requested octets) as well , but here we will mentions parameters those are sufficient for understanding of call flow. Once OCS receive  the request , it validates and if subscriber is allowed to use data , OCS send CCA (R bit cleared in command code 272). CCA have octets allocated and validity time for the allocated data bundle.

After the above step device starts consuming data , now there are three events are possible. One is all allocated data has been consumed , validity time has been expired or pdp session has been closed by the network.  For former two cases , GGSN sends he CCR again with consumed octets with CC Request Type diameter AVP value as UPDATE_REQUEST. If still OCS can allocated date then again CCA comes over Gy interface with new allocated octets.  This sequence goes on , until all data is consumed or PDP is deleted by the network.

If  PDP is deleted by the network GGSN sends a CCR with CC Request Type diameter AVP value as TERMINATION_REQUEST with consumed data. So that OCS can update data usage for a subscriber. After this data session is  completed.


Leave a Reply

Your email address will not be published. Required fields are marked *