[OpenSIPS-Devel] [ opensips-Patches-3513177 ] Substitutions in configuration file

SourceForge.net noreply at sourceforge.net
Fri Mar 30 16:11:55 CEST 2012


Patches item #3513177, was opened at 2012-03-30 03:26
Message generated for change (Comment added) made by vladut-paiu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=3513177&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: trunk
>Status: Closed
>Resolution: Rejected
Priority: 5
Private: No
Submitted By: Nick Altmann (nikbyte)
>Assigned to: Vladut-Stefan Paiu (vladut-paiu)
Summary: Substitutions in configuration file

Initial Comment:
This patch gives very useful feature - support to perform substitutions inside the strings of config.
Work derived from the great parser enhancements made by Daniel-Constantin Mierla to the sip-router project.

For example

!subst
perform substitutions inside the strings of config
!subst offers an easy way to search and replace inside strings before cfg parsing. E.g.,:
!subst "/regexp/subst/flags"
flags is optional and can be: 'i' - ignore case; 'g' - global replacement
Example:
!subst "/DBPASSWD/xyz/"
modparam("acc", "db_url", "mysql://user:DBPASSWD@localhost/db")
will do the substitution of db password in db_url parameter value


----------------------------------------------------------------------

>Comment By: Vladut-Stefan Paiu (vladut-paiu)
Date: 2012-03-30 07:11

Message:
Hello,

We do not feel such a patch would be very useful.
You can always implement such functionality with a more advanced tool, like
m4, instead of implementing all of this subst logic into the OpenSIPS
parser.

Regards,
Vlad

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=3513177&group_id=232389



More information about the Devel mailing list