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:
opensips –c
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 ...
Get Building Telephony Systems with OpenSIPS - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.