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