This example shows how to initiate credit reauthorization with sendCCUpdate.
In another example (Receive Graceful Service Termination - Redirect), the client was redirected to a top-up server to purchase more Time Quota. In the following snippet, the client application initiates the credit reauthorization by invoking sendCCUpdate. In this example, there are no UsedServiceUnit to report and the client requests the newly purchased minute of Time Quota.
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"); //Increment the CC-Request-Number for each additional update request. roChargingInfo.setCcRequestNumber(3); roChargingInfo.setServiceContextId("12345@example.com"); SubscriptionId subId = new SubscriptionId(); subId.setSubscriptionIdData("id0001"); subId.setSubscriptionIdType(SubscriptionIdType.END_USER_IMSI); roChargingInfo.setSubscriptionId("12345@example.com); MultipleServicesCreditControl mscc = new MultipleServicesCreditControl(); //Request additional quota in time units. RequestedServiceUnit rsu = new RequestedServiceUnit(); rsu.setCcTime(60); mscc.setRequestedServiceUnit(rsu); RoChargingResults roChargingResults = svc.sendCCUpdate(roChargingInfo);