From openSIPS

Development: OpenSIPS Script Preprocessor Design

Development -> Planning -> OpenSIPS Script Preprocessor Design

This page has been visited 2552 times.

Table of Content (hide)

  1. 1. Motivation
  2. 2. Often-Required Features
  3. 3. Directions Under Scrutiny
  4. 4. Confirmed Solutions
  5. 5. Have a Better Idea?

1.  Motivation

There 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?


There are two major inconveniences when working with external tools such as GNU m4:

2.  Often-Required Features

Below is a community-sourced summary of commonly required templating features to be used on top of opensips.cfg:

3.  Directions Under Scrutiny

We 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!


Currently, we're looking at the following directions:

4.  Confirmed Solutions

TBD

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!


Add Comment 
Sign as Author 
Enter code 567

Retrieved from https://www.opensips.org/Development/Design-Opensips-Script-Preprocessing
Page last modified on December 13, 2018, at 05:08 PM