The following steps are given to test IOT usage charge calculation and CDR loading. All steps should be executed in OCOMC server.
STEPS:
1.) Purchase usage products and discounts for the account. Below products and discount can be used for testing.
Product:
- IoT Central Manager Installation Fee
- IoT Central Manager Monthly Fee
Discount:
- IoT Central Manager X Message (5KB/Message) Usage Fee
2.) Create CDR file with below format. The CDR file should have ".data" as the filename extension.
NOTE: The TENANT_ID field should be the network id of the account's IOT service.
Attribute (Data Field) |
Description |
TENANT_ID |
Login of the customer |
TIMESTAMP |
Start date of CDR |
SESSION_ID |
Unique identifier for each CDR |
PRODUCT_ID |
Product Id of customer |
COST_FACTOR |
Cost Factor |
BILLING_FACTOR |
Billing factor |
ATTRS |
Volume to charge (in KB) |
Sample:

3.) Move the CDR file to the OCOMC input folder /opt/rmsuser/opt/ocomc/data/ocomc_input
Command: mv <cdr_file.data> /opt/rmsuser/opt/ocomc/data/ocomc_input

4.) Check the OCOMC input folder. The CDR file should be removed once it is processed by OCOMC.

5.) After around 2 minutes, run below query in the database to confirm that the CDR has been loaded.
|
select unix2date(e.created_t),eb.quantity, unix2date(e.start_t), eb.amount from pin.account_t a, pin.event_t e, pin.event_bal_impacts_t eb where a.poid_id0=e.account_obj_id0 and e.poid_id0=eb.obj_id0 and eb.impact_type=16384 and a.account_no='<SERVICE_ACCOUNT_NO>'; |
6.) Run billing for the account.
Upon billing, the IOT usage charge will be calculated based on the number of messages of the account at the end of the cycle.
The formula below show the IOT message calculation.
| (Number of Messages) = (Aggregate KB value) / 5 |
7.) Run invoicing for the account.