[OpenSIPS-Users] Storing modules parameters on AVP, as much as I can
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Thu Jul 23 09:37:44 CEST 2009
Hi Ricardo,
For 1) you can simply use M4 plus some perl script.
in you opensips.m4 file, put the params you want to load via DB as m4
macros (defines). using a small perl script you can generate the
rules.m4 file (the file containing the definitions) for DB content:
------------------------
| parama | value |
------------------------
| debug | 3 |
|log_stderror| no |
------------------------
going into rules.m4 :
define(`debug', `3')
define(`log_stderror', `no')
So, at a restart, run the script to generate the M4 definition from DB,
and run m4 to generate the final cfg file...
Just an idea how to do it now :)
Regards,
Bogdan
Ricardo Martins wrote:
> Hi Bogdan.
>
> The first option would be enough. I don't think that's an issue a
> restarting procedure just after changing parameters. DanB just wrote
> me indicating an script generator solution. Do you think that would be
> possible to use another solution?
>
> About the second option, I know that I can do it with fr_timer_avp or
> fr_inv_timer_avp, right?
>
> Regards, Ricardo.
>
>
> Bogdan-Andrei Iancu escreveu:
>> Hi Ricardo,
>>
>> there are things here:
>>
>> 1) how to set the value of the parameters (via DB, instead of
>> statically hardcoding in cfg)
>>
>> 2) dynamic changing of the module params without restart.
>>
>> What case are you refering at?
>>
>> Regards,
>> Bogdan
>>
>> Ricardo Martins wrote:
>>> Hi all! Do anybody knows if there is a trick to store the modules
>>> parameters on database/avps? I want to give the opensips
>>> administrator all the flexibility I can without having to edit cfg
>>> text file.
>>>
>>> I know that there is some specific parameters where you can do that
>>> like fr_inv_timer or fr_timer for tm module but I'm talking about
>>> storing other parameters that don't have an specific avp enable mode
>>> like T1 and T2, for example.
>>>
>>> Do anybody has any clue?
>>>
>>> Regards! Ricardo.
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>
>>
>
>
More information about the Users
mailing list