import ultra.rtbs;
consume {
// Initial reservation request
ReserveUnitReq req = udrCreate(ReserveUnitReq);
req.sessionDescription = "";
req.merchantAccount = udrCreate(TpMerchantAccountID);
req.merchantAccount.AccountID = 1732380001;
req.merchantAccount.MerchantID = "OSA Merchant-001 (ET-NJ)";
req.correlationID = udrCreate(TpCorrelationID);
req.correlationID.CorrelationID = 10;
req.correlationID.CorrelationType = 1;
req.user = udrCreate(TpAddress);
req.user.AddrString = "8082340211";
req.user.Name = "Name";
req.user.Plan = "P_ADDRESS_PLAN_E164";
req.user.Presentation = "P_ADDRESS_PRESENTATION_UNDEFINED";
req.user.Screening = "P_ADDRESS_SCREENING_UNDEFINED";
req.user.SubAddressString = "Subaddresssss";
// Application Description
req.applicationDescription = udrCreate(TpApplicationDescription);
req.applicationDescription.Text = "description";
req.applicationDescription.AppInformation = listCreate
(TpAppInformation);
TpAppInformation appInfo = udrCreate(TpAppInformation);
appInfo.Timestamp = "2008-06-01 00:00";
listAdd(req.applicationDescription.AppInformation, appInfo);
// Charging Parameters
req.chargingParameters = listCreate(TpChargingParameter);
TpChargingParameter param = udrCreate(TpChargingParameter);
param.ParameterID = 2;
param.ParameterValue = udrCreate(TpChargingParameterValue);
param.ParameterValue.StringValue = "OSA";
listAdd(req.chargingParameters, param);
// Volume
req.volumes = listCreate(TpVolume);
TpVolume volume = udrCreate(TpVolume);
volume.Unit = 3;
volume.Amount = udrCreate(TpAmount);
volume.Amount.Exponent = 1;
volume.Amount.Number = 6;
listAdd(req.volumes, volume);
// User Object to be associated to response
req.UserObject = input;
// Pass to RTBS
udrRoute(req);
} |