WebSphere brand IBM WebSphere IP Multimedia Subsystem Connector, Version 6.2

Receive Graceful Service Termination - Redirect

This example shows the receiving of a graceful service termination request to redirect to a top-up server

In the following snippet, the client application retrieves the RoChargingResults object returned by the sendCCUpdate method. The client examines key pieces of information, such as the GrantedServiceUnit and CostInformation. In this example, the Online Charging System (OCS) also returns a Final-Unit-Indication, indicating that the final allocation of quota has transpired. After the final used units are reported via a sendCCUpdate, the client is to be redirected to a top-up server to purchase more quota.

Example

RoChargingResults roChargingResults = svc.sendCCInitial(roChargingInfo);

		MultipleServicesCreditControl mscc = roResult.getMultipleServicesCreditControl();
			
		GrantedServiceUnit gsu = mscc.getGrantedServiceUnit();
		Integer grantedTimeUnits = gsu.getCcTime();
			
		CostInformation costInfo = roResult.getCostInformation();
		
		String costUnit = costInfo.getCostUnit();
		Integer currencyCode = costInfo.getCurrencyCode();
		
		UnitValue unitValue = costInfo.getUnitValue();
		Integer exponent = unitValue.getExponent();
		Long valueDigits = unitValue.getValueDigits();

		FinalUnitIndication finalInd = roResult.getMultipleServicesCreditControl().getFinalUnitIndication();
		Integer finalAction = finalInd.getFinalUnitAction();  //Example value = REDIRECT
		RedirectServer redirServer = finalInd.getRedirectServer();
		Integer addressType = redirServer.getRedirectAddressType();  //Example Value = 0 (IPV4_ADDRESS)
		String address = redirServer.getRedirectServerAddress(); //Example Value = An IPV4 address of a top-up server.
		
		//The client calls sendCCUpdate to report the final used service units, incrementing the CC-Request-Number by 1.
		//Use the redirect server to purchase an additional minute of Time Quota.



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