1. Adding an Extension to the Botstream Dial Plan
The configuration for the Botstream dial plan is stored in default.xml, located in the /usr/local/freeswitch/conf/dialplan/ directory.
To configure the Botstream dial plan, you need to create extensions for each destination number in default.xml. Below is an example of an extension configured for the destination number 6600:
<!-- Botsream agent assist test --> |
To create a new destination number, add a new extension. Replace the expression value (condition tag) with your desired destination number.
2. Preparing the call_params JSON
The call_params value is a Base64-encoded JSON string that contains configuration details.
Below is a sample call_params JSON structure with the required parameters
|
{ "bot_inactivity_limit":0 } |
Steps to Encode the JSON String:
You can use the base64 library in Python to encode a JSON string.
To Encode run:
echo <call-params-json-string>|python3 -m base64 -e |
Example:
echo '{"campaign":"Test"}'|python3 -m base64 -e |
Verify by Decoding:
echo <encoded-string>|python3 -m base64 -d |
Example:
echo 'eyJjYW1wYWlnbiI6IlRlc3QifQo='|python3 -m base64 -d |
3. Updating the Dial Plan
Once you have updated the call_params, reload the XML values by running the following command:
fs_cli -x "reloadxml" |
This command will enable Botstream to reload the XML configuration and apply the updated settings.