Development |
Development -> Planning -> OpenSIPS Script Preprocessor DesignThis page has been visited 2834 times. Table of Content (hide) 1. MotivationThere is not a shade of doubt that real-life systems based on OpenSIPS require a templating language or a preprocessor to be used in order to generate the opensips.cfg file. When you have to deploy almost identical opensips.cfg files to tens of servers which only differ by a few IP addresses, ports, unique IDs, etc., having a macro to encompass these variable pieces of text goes a long way. But why isn't a solution like the GNU m4 preprocessor (which offers the above) the perfect fit for this task?
2. Often-Required FeaturesBelow is a community-sourced summary of commonly required templating features to be used on top of opensips.cfg:
3. Directions Under ScrutinyWe ultimately require a C library or framework which would allow us to build the above features directly into the OpenSIPS scripting language. This way, OpenSIPS will be able to internally preprocess the "opensips.cfg" file without breaking the line numbering or introducing additional cumbersome files to work with!
4. Confirmed SolutionsTBD 5. Have a Better Idea?If you have ideas which help solve the core problems, we are here to listen! Please feel free to reply below, or on the users mailing list thread! |