ScriptForge allows you to write applications that run during specific system events. Currently, scripting functionality is supported in the routing engine, where it runs alongside the call setup process. Requests to your application are handled with a messaging bus which will queue applications that can't be processed fast enough. Applications that run in the routing engine must be completed quickly to avoid high PDD.
See ScriptForge API for details on scripts and API reference.
For speed enhancement, variables in your application may be present between messages, but don't assume this behaviour. The application is automatically distributed across multiple nodes; active variables are not persistent. Use the datastore class if persistence is required across messages. The memory of your application may be limited (default to 100MB). Using more than the allocated amount may cause your application to crash.
CPU (Time Limit)¶
There are no hardcoded CPU restrictions placed on any applications, though its run time is limited to two seconds by default.
If a message is not processed in time, or fails during processing, it will reset to an unconsumed state, making it available for further processing. This mechanism is in place to eliminate lost messages with redundancy.
Applications can run across multiple zones or data centers. By default, one process is allowed per script. If you find your application is too intensive or having difficulty scaling to business requirements, greater resource allocation may be required. See Scaling and Load Balancing for details.
Programming environments are locked down to prevent human error from changing too much. ConnexCS provides classes and help agents to assist clients with more specific functionality. Also, the Knowledge Base contains information about leveraging this availability.
Creating a new script¶
Create a customized script and assign it to a specific customer.
Build the new script¶
Script Forgefrom Developer under the side menu.
- Add a script by clicking
Fill in the script's name and type, then click
Select your script from the list.
- Enter the code of your script
- Click the green arrow to
Save and Run.
- The results will be shown onscreen.
If script shows an error, add this then run the script again:
Assign the Script to a customer¶
To assign scripts to customers:
- Select Customer > [customer]
- Navigate to Routing
Select a rate card from the table.
Go to ScriptForge
- Select the script
- Set the Timeout to specify how long it will run before timing out
- The Timeout Action is entered manually and must be formatted as
[sip response code] [sip response message].