[OpenSIPS-Users] ratelimit (cps/timer_interval)

Max Mühlbronner max.muehlbronner at 42com.com
Wed Jun 7 08:56:55 EDT 2017


Cool, thanks.



BR


Max Mühlbronner
------
42com Telecommunication GmbH
Straße der Pariser Kommune 12-16
10243 Berlin

Fon: +49-(0)30-2434299-28
Fax: +49-(0)30-2434299-99
E-Mail: mm at 42com.com
Web: www.42com.com<http://www.42com.com/>

Firmenangaben/Company information:
Handelsregister/Commercial register: Amtsgericht Berlin HRB 99071 B
Umsatzsteuer-ID/VAT-ID: DE223812306
Geschäftsführer/CEO: Thomas Reinig, Alexander Reinig

Diese E-Mail enthält Informationen von 42com Telecommunication GmbH. Diese sind möglicherweise vertraulich und ausschließlich für den Adressaten bestimmt. Sollten Sie diese elektronische Nachricht irrtümlicherweise erhalten haben, so informieren Sie uns bitte unverzüglich telefonisch oder per E-Mail.

This message is intended only for the use of the individual or entity to which it is addressed. If you have received this message by mistake, please notify us immediately.

________________________________
Von: Users <users-bounces at lists.opensips.org> im Auftrag von Răzvan Crainea <razvan at opensips.org>
Gesendet: Mittwoch, 7. Juni 2017 14:08:44
An: users at lists.opensips.org
Betreff: Re: [OpenSIPS-Users] ratelimit (cps/timer_interval)

Hello, Max!

If you want to limit to 50 CPS, you should use:
if (!rl_check("$avp(carriername)", "50", "RED"))

I will update the docs to reflect this.

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com<http://www.opensips-solutions.com>

On 06/07/2017 01:07 PM, Max Mühlbronner wrote:

Hi,


just a small question regarding the ratelimit module. I am confused by the documentation:


rl_check():


"Note that the limit should be specified as per-second, not per-timer_interval."



But at the timer_interval modparam it says:


"All amounts of messages have to be divided by this timer to get a messages per second value. "




So which one is true, e.g. if i want to limit to 50 cps (and the default timer_interval is 10 seconds) would i just do something like:


if (!rl_check("$avp(carriername)", "50", "RED")) {
...


Or


if (!rl_check("$avp(carriername)", "500", "RED")) {





Thanks.


BR


Max Mühlbronner
------
42com Telecommunication GmbH
Straße der Pariser Kommune 12-16
10243 Berlin

Fon: +49-(0)30-2434299-28
Fax: +49-(0)30-2434299-99
E-Mail: mm at 42com.com<mailto:mm at 42com.com>
Web: www.42com.com<http://www.42com.com/>

Firmenangaben/Company information:
Handelsregister/Commercial register: Amtsgericht Berlin HRB 99071 B
Umsatzsteuer-ID/VAT-ID: DE223812306
Geschäftsführer/CEO: Thomas Reinig, Alexander Reinig

Diese E-Mail enthält Informationen von 42com Telecommunication GmbH. Diese sind möglicherweise vertraulich und ausschließlich für den Adressaten bestimmt. Sollten Sie diese elektronische Nachricht irrtümlicherweise erhalten haben, so informieren Sie uns bitte unverzüglich telefonisch oder per E-Mail.

This message is intended only for the use of the individual or entity to which it is addressed. If you have received this message by mistake, please notify us immediately.



_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto: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/20170607/5ea01b7c/attachment-0001.html>


More information about the Users mailing list