WebSphere brand IBM WebSphere IP Multimedia Subsystem Connector, Version 6.2

Class RfAccountingInfo

The RfAccountingInfo class includes all of the basic informational elements needed to manage an Accounting Session or Event for offline charging.

Usage

The RfAccountingInfo class is a simple representation of the Diameter Accounting Request (ACR) command and includes all of the basic informational elements needed to manage an Accounting Session or Event. The Web service client creates an instance of RfAccountingInfo and must set all required fields before initiating a Web service request.

Depicted in the example and described in the Get and Set Methods tables:
  • The sessionId must be set to a globally unique identifier for the accounting session.
  • For a single session, the record number for the start request is zero. The record numbers for the interims are 1 through n (where there are n interim messages). The record number for the stop is n+1 (the final message of the session).
  • The destinationRealm should align with a realm defined in the routing table of Diameter_Rf.properties. This determines the Charging Collection Function (CCF) to which the Diameter packet will be sent.
  • The userName should be included by the Web service client, if known, and uniquely identifies the user in which accounting will be performed at the CCF.
  • All other member values are consumed by the CCF and are used to manage the accounting session or to generate Charging Data Records (CDRs). Optional parameters should only be set as needed to ensure the correct generation of CDRs.

Example

RfAccountingInfo acctInfo = new RfAccountingInfo();
acctInfo.setSessionId("example.example.com:44321;23433;821;0AB3F12");
acctInfo.setAccountingRecordNumber(0);
acctInfo.setDestinationRealm("example.com");
acctInfo.setUserName("alice@example.com");
RfAccountingResult results = service.startRfAccountingInfo(acctInfo);

Get methods

Method Type Returns Description
getSessionId String sessionId

The sessionId that is unique for this session.

Example:
String sessionId = acctInfo.getSessionId();
getAccountingRecordNumber int accountingRecordNumber

Identifies an accounting message within a session.

For a typical single session, the record number for the start is zero, the record number for the interims are 1 through n (where there are n interim messages), and the record number for the stop is n+1 (the final message of the session).

getUserName String userName

The private user identity if available in the node.

Example:
String username = acctInfo.getUserName();
getAcctInterimInterval int acctInterimInterval

The amount of time in seconds whereby the server wishes to receive updates from the application client. It is the responsibility of the client to provide an interim message at the end of each interval. The client may set this field as a hint to the server.

getDestinationRealm String destinationRealm

The administration domain that recognizes the CCF.

Example:
String destinationRealm = acctInfo.getDestinationRealm();
getEventTimestamp long eventTimestamp

The event value for time and MAY be included in ACR and ACA messages to record the time that the reported event occurred. This is specified as milliseconds since January 1, 1970 00:00 UTC.

Example:
long eventTimestamp = acctInfo.getEventTimestamp();
getOriginStateId int originStateId

Holds the value of our Origin-State-Id.

Example:
int originStateId = acctInfo.getOriginStateId();
getServiceInformation serviceInformation serviceInformation

Service-specific 3GPP accounting information.

Set methods

Method Parameter Name Type Description
setSessionId sessionId String

Sets the Session-Id for this message. The Session-Id is unique for a given session. The same Session-Id value should be used in every message of that session.

Example:
rfAccountingInfo.setSessionId("sipclient.example.com:33041;23432;893);
setAccountingRecordNumber accountingRecordNumber int

Identifies an accounting message within a session.

For a typical single session, the record number for the start is zero, the record number for the interims are 1 through n (where there are n interim messages), and the record number for the stop is n+1 (the final message of the session).

setUserName userName String

The private user identity if available in the node.

setAcctInterimInterval acctInterimInterval int

The amount of time in seconds whereby the server wishes to receive updates from the application client. It is the responsibility of the client to provide an interim message at the end of each interval. The client may set this field as a hint to the server.

setDestinationRealm destinationRealm String

The administration domain that recognizes the CCF.

setEventTimestamp eventTimestamp long

The event value for time and MAY be included in ACR and ACA messages to record the time that the reported event occurred, in milliseconds since January 1, 1970 00:00 UTC.

Example:
rfAccountingInfo.setEventTimestamp(System.currentTimeMillis());
setOriginStateId originStateId int

Sets the value of our Origin-State-Id. Note that by setting this, your application will indicate to the server that the Origin State has changed (meaning that he will void any existing sessions). And, once you have set it, you must use the same value for all messages that you initiate. Therefore, if you use this method, you must have complete knowledge of the applications running, and they must be well coordinated.

Example:
rfAccountingInfo.setOriginStateId(356777);
setServiceInformation serviceInformation serviceInformation

Service-specific 3GPP accounting information.




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