WebSphere brand IBM WebSphere IP Multimedia Subsystem Connector, Version 6.2

Class RoChargingInfo

The RoChargingInfo class includes all of the basic informational elements needed to manage Session, Event or Immediate Event for online charging.

Usage

The RoChargingInfo class includes all of the basic informational elements needed to manage online charging for Events or Sessions. The online client (Charging Trigger Function (CTF)) requests resource allocation and reports credit control usage information to the Online Charging System (OCS). For online charging, the Diameter Credit Control Application (DCCA), defined in RFC 4006, is used with extensions based on the 3GPP IMS specifications. The following are three cases for control of user credit for online charging:
  • Immediate Event Charging (IEC) - the Credit Control Request (CCR) contains a CC-Requested-Type of "EVENT_REQUEST". This request is used to make an immediate credit or debit to the subscriber's account.
  • Event Charging with Unit Reservation (ECUR) - a reservation is made for a single event transaction as thought it were a session transaction. The CCR request contains a CC-Request-Type set to INITIAL for the reservation; then, sends a request type set to TERMINATION_REQUEST when the transaction is successfully delivered.
  • Session Charging with Unit Reservation (SCUR) - is used for credit control of sessions and uses the CC_Request-Type set to INITIAL_REQUEST, UPDATE_REQUEST, or TERMINATION_REQUEST.
The RoChargingInfo class, a general purpose class, provides a data container for all individual and grouped Attribute Value Pair (AVP) information that is required for a CCR request. In some cases the definition of the AVP includes grouped AVP members that are typically not included in the CCR. This conflict between the AVP definition and the CCR definition is handled in the following way:
  • The RoChargingInfo class is constructed based on AVPs that are defined with a consistent AVP structure. They do not hold different definitions for different applications. However, many of the fields are optional, and are not appropriate for the CCR request. The actual format of the content and specific AVPs that are to be included in the CCR will be defined between the Application that sends the CCR and the Server that receives and interprets the CCR request.
  • The RoChargingInfo allows for you to send all optional AVPs defined in the Augmented Mackus-Naur Form (ABNF), but it also allows you to send some AVPs that are not recommended for the CCR request. You should only set the fields that the OCS is expecting in each CCR request. The Diameter Enabler verifies that the minimum required information is included in the RoChargingInfo object that is passed through the Web service request. However, it will allow any of the additional fields to be set. It is up to the application developer to verify the contents required to satisfy the OCS beyond those defined in the specifications. Setting fields without an understanding of what is required by the OCS will cause inconsistent results.
  • Conversely, when the Diameter Enabler receives a Credit Control Answer (CCA) response, it also allows additional AVPs to be included in the frame. The Diameter Enabler verifies the minimum requirement of the frame and then passes the results back to the application. If the minimum ABNF requirements are not met, the Diameter Enabler returns an Error message to the OCS, will post a message in the logs, and will return an exception back to the application. If the OCS returns a CCA that holds optional non-mandatory AVPs that are recognized, their values will be set in the RoChargingResults. However, if there are AVPs that are not recognized, these AVPs will be discarded by the Diameter Enabler and only the recognized AVP data will be returned to the Application.
Note: If the OCS has defined a custom set of AVPs or custom framing in either what it expects for the CCR or what it returns in the CCA, then the application must be written to use the Raw interface. The Raw interface allows custom AVPs and framing to be used to override the high level APIs provided for the Ro transactions.

Example

RoChargingInfo roChargingInfo = new RoChargingInfo();

		//Set the Session-Id to a unique identifier.
		roChargingInfo.setSessionId("FQDNServerName:servicexyz:session00001");
		//Set the Destination-Realm of the OCS, which should match a route name in the Diameter_Ro.properties file.
		roChargingInfo.setDestinationRealm("emulators.example.com");
		//Set the CC-Request-Number to 0 for an initial request.
		roChargingInfo.setCcRequestNumber(0);
		roChargingInfo.setServiceContextId("12345@example.com");

		//Set the subscription id to identify the end user's subscription with the OCS.
		SubscriptionId subId = new SubscriptionId();
		subId.setSubscriptionIdData("id0001");
		subId.setSubscriptionIdType(SubscriptionIdType.END_USER_IMSI);
		roChargingInfo.setSubscriptionId(subId);

		MultipleServicesCreditControl mscc = new MultipleServicesCreditControl();

		//Request quota in time Units
		RequestedServiceUnit rsu = new RequestedServiceUnit();
		rsu.setCcTime(60);
		mscc.setRequestedServiceUnit(rsu);
		roChargingInfo.setMultipleServicesCreditControl(mscc);

Set methods

Method Name Type Example values/comments

setSessionId()

String

Sets the SessionId that is unique for this session.

Example:
roChargingInfo.setSessionId("sipclient.example.com:33041;23432;893");

setOriginHost()

String

The fully qualified domain name of the host initiating this request.
Note: This value is overridden by all Web service requests except sendCCRaw().

setOriginRealm()

String

The fully qualified domain name of the realm where this request originated.
Note: This value is overridden by all Web service requests except sendCCRaw().

setDestinationRealm()

String

Holds the administration domain that recognizes the OCS.

Example:
roChargingInfo.setDestinationRealm("example.com");
Note: This value will be used to route the request to the proper OCS.

setAuthApplicationID()

Integer

The value for the Credit Control Application is 4.
Note: This value will be overridden if using a non-raw method.

setServiceContextId()

String

The specific request document that this request follows:

For IMS charging: "32260@3gpp.org"

Example:
roChargingInfo.setServiceContextId("32260@3gpp.org");																								

setCCRequestType()

Integer

This Enumeration contains the following:
  1. Initial Request
  2. Update Request
  3. Termination Request
  4. Event Request
Note: This value will be overridden if using a non-raw method.

setCCRequestNumber()

Integer

Indicates the numbered request within a session. This should be set to 0 for Request Types of Initial and Event. It should be incremented by one for each subsequent request within a session. It is the caller's responsibility to set the proper number.

setDestinationHost()

String

The fully qualified domain name of the Destination Host. This is generally not specified when using realm routing.

setUserName()

String

Name of the subscriber.

setOriginStateId()

Integer

Holds the value to track the incremented value of possible times the client has loss the state or possible reboot has occurred.

setEventTimestamp()

Long

Holds the event value for time and MAY be included in a CCR message to record the time that the reported event occurred, in milliseconds since January 1, 1970 00:00 UTC. This timestamp is converted to the SNTP time format when sending a request.
Note: This time is based on Java time.
Example:
roAccountingInfo.setEventTimestamp(new Long(system.currentTimeMillis()));

setSubscriptionId()

SubscriptionId

Grouped AVP used to specify the end user, and the format in which the data specifying the end user is presented.

For additional information on creating and populating the SubscriptionId, refer to the Javadoc.

setTerminationCause()

Integer

The session was terminated for one of several reasons.
  1. LOGOUT
  2. SERVICE_NOT_PROVIDED
  3. BAD_ANSWER
  4. ADMINISTRATIVE
  5. LINK_BROKEN
  6. AUTH_EXPIRED
  7. USER_MOVED
  8. SESSION_TIMEOUT

setRequestedAction()

Integer

This value defines the type of action if the CCRequestType is EVENT.
  1. Direct Debiting
  2. Refund Account
  3. Check Balance
  4. Price Enquiry

setMultipleServicesIndicator()

Integer

The following values are defined for the Multiple-Services-Indicator AVP:
0: MULTIPLE_SERVICES_NOT_SUPPORTED
The client does not support independent credit-control of multiple services within a session or sub-session
1: MULTIPLE_SERVICES_SUPPORTED
The client supports independent credit-control of multiple services within a session or sub-session

setMultipleServicesCreditControl()

MultipleServicesCreditControl

Contains all fields for quota management. (Refer to Javadoc.)

setUserEquipmentInfo()

UserEquipmentInfo

Contains information about the equipment being used by the subscriber. (Refer to Javadoc.)

setServiceInfo()

ServiceInfo

Holds service-specific 3 GPP accounting and charging information. (Refer to Javadoc.)




Terms of use
(C) Copyright IBM Corporation 2009. All Rights Reserved.