<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <tt>Hello, Max!<br>
      <br>
      If you want to limit to 50 CPS, you should use:<br>
      if (!rl_check("$avp(carriername)", "50", "RED"))<br>
      <br>
      I will update the docs to reflect this.<br>
      <br>
      Best regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 06/07/2017 01:07 PM, Max Mühlbronner
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:DB5PR01MB147833625D169EAAB3BA96D699C80@DB5PR01MB1478.eurprd01.prod.exchangelabs.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;"
        dir="ltr">
        <p><span>Hi,</span></p>
        <p><span><br>
          </span></p>
        <p><span>just a small question regarding the ratelimit module. I
            am confused by the documentation:<br>
          </span></p>
        <p><span><br>
          </span></p>
        <p><span>rl_check():<br>
          </span></p>
        <p><span><br>
          </span></p>
        <p><i><span>"Note that the limit should be specified as
              per-second, not per-timer_interval."</span></i></p>
        <p><br>
        </p>
        <p><br>
        </p>
        <p>But at the timer_interval modparam it says:</p>
        <p><i><br>
          </i></p>
        <p><i>"<span>All amounts of messages have to be divided by this
              timer to get a messages per second value.
            </span>"</i></p>
        <p><br>
        </p>
        <p><br>
        </p>
        <p><br>
        </p>
        <p>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:</p>
        <p><br>
        </p>
        <div>if (!rl_check("$avp(carriername)", "50", "RED")) {<br>
        </div>
        ...<br>
        <p><br>
        </p>
        <p>Or</p>
        <p><br>
        </p>
        <div>if (!rl_check("$avp(carriername)", "500", "RED")) {<br>
        </div>
        <p><br>
        </p>
        <p><br>
        </p>
        <p><br>
        </p>
        <p><br>
        </p>
        <p>Thanks.</p>
        <p><br>
        </p>
        <p>BR<br>
        </p>
        <p><br>
        </p>
        <div id="Signature">
          <div id="divtagdefaultwrapper" dir="ltr" style="font-size:
            12pt; color: rgb(0, 0, 0); font-family:
            Calibri,Arial,Helvetica,sans-serif,"EmojiFont","Apple
            Color Emoji","Segoe UI
            Emoji",NotoColorEmoji,"Segoe UI
            Symbol","Android Emoji",EmojiSymbols;">
            <p><span lang="fr"><font color="black" size="3"
                  face="Calibri,Arial,Helvetica,sans-serif"><span
                    dir="ltr" id="divtagdefaultwrapper"
                    style="font-size:12pt"></span></font></span></p>
            <font color="black" size="3"
              face="Calibri,Arial,Helvetica,sans-serif"><font
                face="Calibri,Arial,Helvetica,sans-serif">
                <div style="margin:0"><font color="#222222" size="1"
                    face="Arial"><span style="font-size:11px;
                      font-weight:normal"><span
                        style="background-color:white"></span></span></font></div>
              </font></font>
            <p class="x_MsoNormal" style="margin-bottom:13.5pt"><span
                style="color:#1F497D">Max Mühlbronner<br>
                ------<br>
                42com Telecommunication GmbH<b><br>
                </b>Straße der Pariser Kommune 12-16<br>
                10243 Berlin<br>
                <br>
                Fon: +49-(0)30-2434299-28<br>
                Fax: +49-(0)30-2434299-99<br>
                E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:mm@42com.com">mm@42com.com</a><br>
                Web: </span><u><span style="color:blue"><a
                    href="http://www.42com.com/" target="_blank"
                    id="LPNoLP" moz-do-not-send="true"><span
                      style="color:blue">www.42com.com</span></a></span></u></p>
            <p class="x_MsoNormal"><span style="font-size:10.0pt;
                color:#1F497D"><br>
              </span><span style="font-size:9.0pt; color:#1F497D">Firmenangaben/Company
                information:<br>
                Handelsregister/Commercial register: Amtsgericht Berlin
                HRB 99071 B<br>
                Umsatzsteuer-ID/VAT-ID: DE223812306<br>
                Geschäftsführer/CEO: Thomas Reinig, Alexander Reinig<br>
                <br>
                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.<br>
                <br>
              </span><span style="font-size:9.0pt; color:#1F497D"
                lang="EN-US">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.</span><span style="color:#1F497D"
                lang="EN-US"></span></p>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>