[OpenSIPS-Users] RFC: text pre-processing in OpenSIPS cfg file

Pauba, Kevin L KLPauba at west.com
Wed Apr 11 17:43:44 CEST 2012


My opinion is to stick with M4.   Where's the added value in re-implementing a small subset of M4's capability into OpenSIPs?  I would rather that development effort be directed toward enhancing OpenSIPs even more.

Leaning m4 can make the management of multiple configurations a breeze -- I support four different environments (development, QA, pre-production and production) across 5 geo-redundant data centers all with a single .m4 file.  The use of m4 has _greatly_ simplifies the logic that I have to maintain.  After learning m4, you can apply that knowledge to other projects (code generators).

Granted, the quoting in m4 takes a bit getting used to but I feel that any sufficiently powerful macro language would have to have something similar.  If not, it wouldn't be sufficiently powerful enough for my uses.

Thanks

From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
Sent: Tuesday, April 10, 2012 10:50 AM
To: users at lists.opensips.org
Subject: [OpenSIPS-Users] RFC: text pre-processing in OpenSIPS cfg file

Hi,

I'm bringing here a discussion started on devel list, as I would like to get more opinions on the matter.

The discussion started around the decision if makes sense to have MACRO substitution (as text pre-processing) directly in OpenSIPS, considering that right now M4 is heavenly used for this (as additional tool to opensips).

So, the debate was : have built-in text pre-processing versus using M4 as text processor

Pros for M4:
    - no effort to develop extra stuff - just install M4
    - can do really complex things (more than only macros, ifdef, include, etc)
    - you can use it or not
    - easy to integrate with start / stop scripts
Against for M4:
    - need to be installed and integrated
    - you may have a mismatch for the line number (if errors reported in cfg) between the .m4 file and .cfg file

Pros for buit-in:
    - you do no need to install M4 at all (everything comes packet)
    - you may get accurate reporting on errors (for line in cfg)
Against for M4:
    - more devel work to re-implement macros, ifdef, etc


Now, I would like to get your opinions on that (you as opensips users), to see if we stick to using M4 for cfg pre-processing or there is a real need to have this functionality as built-in.

Thanks and regards,
Bogdan



--

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer

http://www.opensips-solutions.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120411/a119a710/attachment.htm>


More information about the Users mailing list