Troubleshooting routing scripts
Sometimes, it is hard to debug an existing script. We strongly encourage you to use a versioning system such as subversion or Git for your scripts. Always create a backup before editing a production script. Try to avoid changing the routing script (
opensips.cfg) as much as possible. Use the database for the daily configuration changes to subscribers, dialplans, and routes. It is usual to run the same script for years.
You can test the syntax of a script without running it using the following command:
It will show you the syntax errors and related lines. Some common syntax errors are as follows:
- A missing semi-column at the end of the line
- Missing brackets (
) and curly brackets (
- Command not available ...