[OpenSIPS-Users] rl_check, limit parameter as a variable
Bogdan-Andrei Iancu
bogdan at opensips.org
Fri May 10 02:17:38 EDT 2019
Johan, be bold :). I got good feedback from people migration 3K+ scripts
to 3.0 :)
Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
https://www.opensips-solutions.com
OpenSIPS Summit 2019
https://www.opensips.org/events/Summit-2019Amsterdam/
On 05/10/2019 09:15 AM, Johan De Clercq wrote:
> Well, I use very often avp’s to pass values to functions. Hence, for
> me, migrating a >1500 lines script is quite a hassle:-).
>
> Outlook voor iOS <https://aka.ms/o0ukef> downloaden
> ------------------------------------------------------------------------
> *Van:* Users <users-bounces at lists.opensips.org> namens Bogdan-Andrei
> Iancu <bogdan at opensips.org>
> *Verzonden:* vrijdag, mei 10, 2019 8:12 AM
> *Aan:* Alexey Kazantsev; OpenSIPS users mailling list
> *Onderwerp:* Re: [OpenSIPS-Users] rl_check, limit parameter as a variable
> Hi,
>
> Such issues, like (1) the confusion about the type of the value (string
> versus int) and (2) the ability to use variables for the function
> parameters, were all addressed with 3.0, hopefully making life easier
> for people writing OpenSIPS cfgs :).
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
> https://www.opensips-solutions.com
> OpenSIPS Summit 2019
> https://www.opensips.org/events/Summit-2019Amsterdam/
>
> On 05/08/2019 07:35 PM, Alexey Kazantsev via Users wrote:
> > Hi Ben!
> >
> > Sure, that was the clue! Thank you.
> >
> >
> > NOT working:
> >
> > cache_fetch("local", "incoming:ratelimit", $var(rl));
> > xlog("L_NOTICE", "cfg_line $cfg_line ; var(rl) is $var(rl)");
> > if (!rl_check("pipe_$rU", "$var(rl{s.int})", "SBT")) {
> >
> > NOT working:
> >
> > cache_fetch("local", "incoming:ratelimit", $(var(rl){s.int}));
> > xlog("L_NOTICE", "cfg_line $cfg_line ; var(rl) is $var(rl)");
> > if (!rl_check("pipe_$rU", "$var(rl)", "SBT")) {
> >
> > NOT working:
> >
> > cache_fetch("local", "incoming:ratelimit", $var(rl));
> > xlog("L_NOTICE", "cfg_line $cfg_line ; var(rl) is $var(rl)");
> > $var(rlim) = $(var(rl){s.int});
> > if (!rl_check("pipe_$rU", "$var(rl)", "SBT")) {
> >
> >
> > WORKING:
> >
> > cache_fetch("local", "incoming:ratelimit", $var(rl));
> > xlog("L_NOTICE", "cfg_line $cfg_line ; var(rl) is $var(rl)");
> > if (!rl_check("pipe_$rU", "$(var(rl){s.int})", "SBT")) {
> >
> >
> > -----------------------------------------------
> > BR, Alexey
> > http://alexeyka.zantsev.com/
> > _______________________________________________
> > Users mailing list
> > Users at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190510/07ab40e4/attachment-0001.html>
More information about the Users
mailing list