<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi William,<br>
      <br>
      There was a documentation issue, you can use rl_check() from
      failure route:<br>
         
<a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/2.3.x/ratelimit.html#idp5591568">http://www.opensips.org/html/docs/modules/2.3.x/ratelimit.html#idp5591568</a><br>
      <br>
      Best regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
  <a class="moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
    <div class="moz-cite-prefix">On 03/04/2018 01:52 PM, William Luke
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:2F168739-EAF6-4358-ADD2-00BABAF6E6AE@greenlightcrm.com">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      Hi there,
      <div><br>
      </div>
      <div>Hoping for some guidance. </div>
      <div><br>
      </div>
      <div>We have multiple carriers we place calls out to the PSTN
        over, and some have CPS limits which we check using rl_check and
        then choose a different carrier if we’re over the limit.</div>
      <div><br>
      </div>
      <div>This all works great.</div>
      <div><br>
      </div>
      <div>Sometimes calls fail with reasons that would mean we want to
        retry using a different carrier, so we need to handle this in
        the failure route.</div>
      <div><br>
      </div>
      <div>However the documentation states that rl_check can only be
        used in the request route, so I’m not sure how we can check for
        limits when a call has failed and a new carrier is being
        selected.</div>
      <div><br>
      </div>
      <div>We’ve a route that handles carrier selection and does the
        checking, and I’ve tried routing to that inside the failure
        route and it all appears to work, but I’m guessing something is
        going to break so wanted to know if there was a way to do what
        I’m looking to do?</div>
      <div><br>
      </div>
      <div>Many thanks,</div>
      <div><br>
      </div>
      <div>William<br>
        <div>
          <div>
            <div>
              <div style="font-family: UICTFontTextStyleBody; font-size:
                16px;"><span style="font-size: 7.5pt; font-family:
                  Arial, sans-serif; color: rgb(34, 34, 34);"><br>
                </span></div>
            </div>
          </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>