Rating Session

Rating Session

The rating session is a Lua object that is used to handle all communication with the OCS for N2IWF processing.

As the network session progresses through the N2IWF states, a rating session may be opened in order to use real-time rating of that session.

Attributes

The rating session should only be modified using its methods. Direct access to its attributes is not recommended.

Methods

Note that as the rating session is a Lua object, its methods should be accessed using the colon operator, e.g.:

rating_session:request_number ()

Getter / Setter Functions

Many rating session functions operate as both getters and setters for billing information.

When called without parameters, the current value of the appropriate element is returned, if any.

They may be alternatively be provided with a single parameter in order to set the appropriate element.

Function Parameter and
Return Type
Description
root_open Boolean Whether the root Diameter session is open (i.e. no TERMINATE_REQUEST sent and last root Result-Code AVP value was 2xxx).
mscc_open Boolean Whether the Multiple-Services-Credit-Control session is open (i.e. no TERMINATE_REQUEST sent and last Multiple-Services-Credit-Control Result-Code AVP value was 2xxx).
last_rc Integer The last effective Result-Code AVP value from the OCS interaction.
last_rc_class Integer The class of the last effective Result-Code AVP from the OCS interaction.
last_rc_root Integer The last Result-Code AVP at the Diameter root from the OCS interaction.
last_rc_mscc Integer The last Result-Code AVP within the Multiple-Services-Credit-Control from the OCS interaction.
last_received Boolean Whether the last OCS interaction received a response from the OCS.
last_gsu Integer The last Granted-Service-Units CC-Time/CC-Service-Specific-Units AVP value from the OCS.
last_rsu Integer The last Requested-Service-Units CC-Time/CC-Service-Specific-Units AVP value sent to the OCS.
last_origin_host Integer The last Origin-Host AVP value from the OCS.
request_number Integer The last Request-Number AVP value sent to the OCS.
request_type Integer The last Request-Type AVP value sent to the OCS.
requested_action Integer The last Requested-Action AVP value sent to the OCS.
service_context_id Integer The last Service-Context-Id AVP value sent to the OCS.
service_identifier Integer The last Service-Identifier AVP value sent to the OCS.
rating_group Integer The last Rating-Group AVP value sent to the OCS.
session_id Integer The Session-Id AVP value for this rating session with the OCS.

begin / continue / finish

These functions are used to start, continue, or finish a rating session on the OCS, respectively.

These functions take no parameters and return nothing.