The OCS simulator is a Diameter server that accepts connections and responds to every Credit-Control-Request
with a Credit-Control-Answer
.
This simulator supports either Diameter CCA or Diameter Ro depending on which script is used to start the simulator. The differences between the Diameter Ro variant and Diameter CCA variant are:
-
where credit control AVPs must be located (within a Multiple-Services-Credit-Control for Ro and on the message for CCA)
-
the log file name
-
the database properties file name.
Starting the simulator
Use the following command to start the simulator for Diameter Ro:
./ro-simulator.sh
Use the following command to start the simulator for Diameter CCA:
./dcca-simulator.sh
You can use the -i switch to set operations to be traced and written out (to the console in the default logging configuration) at the INFO log level.
|
Starting the simulator without any switches will cause it to use non-persistent mode with the rates and accounts loaded from default file locations.
Simulator modes
The OCS simulator can be run two different modes:
-
Non-persistent — Rates and accounts are read from a file at startup and never written back to the filesystem. All account updates are lost when the OCS simulator is stopped.
-
Persistent — A database is used. Data files must be provided to populate the tables with initial data. Account balances persist across simulator restarts.
Configuring the database
To control whether the database is started in-process or connected to using a socket, see the dcca-database.properties
file. This file contains comments that describe how to start and configure the hsqldb database.
Adding artificial latency
The simulator can be configured to introduce a delay before responding to a request, to better simulate a real online charging system. The delays introduced will be generated to have a normal distribution with the specified mean and standard deviation. As a rule of thumb, the standard deviation should be no more than 1/4 of the mean.
Switch | What it sets | Default |
---|---|---|
|
mean value of the artificially introduced latency, in ms |
|
|
standard deviation of the latency, in ms |
|
Setting other options
Switch | What it sets |
---|---|
|
Generates an account for every subscriber in the range(s) specified. Use hyphens to specify ranges, commas to separate them. For example: |
|
Sets the initial balance for accounts created using the |
|
Sets all charging operations to be traced and written out (to the console in the default logging configuration) at the |