use of net.java.slee.resource.diameter.cca.events.avp.CcRequestType in project charging-server by RestComm.
the class DiameterChargingServerSbb method buildCCInfo.
private CreditControlInfo buildCCInfo(RoCreditControlRequest ccr, String endUserId, SubscriptionIdType endUserType, ArrayList<CreditControlUnit> ccUnits) {
// Build Credit Control Info Request to ABMF
CreditControlInfo ccInfo = new CreditControlInfo();
ccInfo.setEventTimestamp(System.currentTimeMillis());
CcRequestType type = ccr.getCcRequestType();
ccInfo.setEventType(type.toString());
if (type == CcRequestType.EVENT_REQUEST) {
ccInfo.setRequestedAction(ccr.getRequestedAction());
}
ccInfo.setRequestNumber((int) ccr.getCcRequestNumber());
ccInfo.setSessionId(ccr.getSessionId());
ccInfo.setSubscriptionId(endUserId);
ccInfo.setSubscriptionIdType(endUserType);
ccInfo.setCcUnits(ccUnits);
// Iterate CCR to capture needed AVPs
for (DiameterAvp avp : ccr.getAvps()) {
fetchDataFromAvp(avp, ccInfo);
}
return ccInfo;
}
Aggregations