[SR-Users] My wish

marius zbihlei marius.zbihlei at 1and1.ro
Mon Apr 12 12:15:50 CEST 2010


marius zbihlei wrote:
>
>>>
>>> Hello Alex,
>>>
>>> How about a syntax like
>>>
>>> modparam("*", "db_url", ...) ?
>>>
>>> meaning that it matches all modules that have a db_url param. Maybe 
>>> this
>>> will also benefit something like module specific log level(when will be
>>> implemented) and other common parameters.
>>
>> That would certainly solve the problem!
>>
>
>
> It seems that this is already implemented. Modparam function allows 
> for a regexp match on the module name. Unfortunately, I can't text it 
> right now, but browsing thru the code it seems that it supports the 
> same regexp expression like the rest of Ser. Maybe something like this 
> will work
>
> modparam(".*", "db_url", ...);
>
> Marius
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>

Hello Alex

I had the time to test the previous mail and it doesn't work. The reason 
is that the if  a regex match succeeds , than the parameter configured 
MUST exists in the module. I have created a patch that modifies this 
behavior and now the modparam statement succeeds if there is at least on 
module that can be configured with the desired param.

I have attached the patch.  And now the question : does it make sense to 
push it to master?! In my opinion the relaxed approach  is better that 
the greedy approach...

Marius

-------------- next part --------------
A non-text attachment was scrubbed...
Name: modparam_regex.patch
Type: text/x-diff
Size: 1769 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20100412/bfc4680b/attachment.patch>


More information about the sr-users mailing list