Router Configuration

Navigate to /usr/local/epi/scripts/py directory in any one of the botstream instances.

Activate the python virtual environment by using the following command.


source venv/bin/activate

Set queue configuration


Open set_queue_config.py file to change the queue configuration


The following is the sample configuration

{
"event_name": "set_queue_params",
"event_data": {
                "dial_timeout": 30,
                "enable_firing_calls": True,
        "working_hours": "0000-1850",
        "cps_percent" : 0.7
}
}

The above configuration will enable the queue, set the working hours from 12AM to 6:50PM, set the CPS to 70% and dial timeout to 30 seconds.


Set the configuration using the below command

python set_queue_config.py


Get queue configuration


Run get_queue_config.py to get the queue configuration


Sample get queue config request message

{
"event_name": "get_queue_params",
"event_data": {}
}


Notes


The above set and get NATS requests are sent to <cluster_id>.botstream.queue subject

Verify the cluster ID, tenant ID, and nats_url in the config.py file in the same directory if you get any issues while running the above commands.


If you use set queue configuration to set the CPS, you can confirm the change by looking at the CPS column in the Router table in the botstream monitor.