<div dir="ltr">An alternative option would be to leverage cachedb_local and opensips-cli to implement your list of accounts and rate limits. It has the advantage of using the internal opensips cache service and is probably your most high performance option, with the CLI you can automate data refreshes using basic cron scripts or anything you fancy!<div><br></div><div><a href="https://www.opensips.org/Documentation/Script-CoreFunctions-3-1#toc4">https://www.opensips.org/Documentation/Script-CoreFunctions-3-1#toc4</a><br></div><div><a href="https://www.opensips.org/Documentation/Interface-CoreMI-3-0#toc15">https://www.opensips.org/Documentation/Interface-CoreMI-3-0#toc15</a><br></div><div><a href="https://www.opensips.org/Documentation/Tutorials-KeyValueInterface">https://www.opensips.org/Documentation/Tutorials-KeyValueInterface</a><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 24 Jan 2021 at 14:56, Ovidiu Sas <<a href="mailto:osas@voipembedded.com">osas@voipembedded.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">There are no db queries, unless explicitly enabled for distributed<br>
rate limiting, in which case memcache or redis can be used.<br>
<br>
-ovidiu<br>
<br>
On Sun, Jan 24, 2021 at 1:57 AM Schneur Rosenberg<br>
<<a href="mailto:rosenberg11219@gmail.com" target="_blank">rosenberg11219@gmail.com</a>> wrote:<br>
><br>
> Maybe use memcache, it's global and it won't create a bottleneck like a database query would.<br>
><br>
> Scott (Schneur)<br>
><br>
> On Thu, Jan 21, 2021, 05:43 Ovidiu Sas <<a href="mailto:osas@voipembedded.com" target="_blank">osas@voipembedded.com</a>> wrote:<br>
>><br>
>> Take a look at the ratelimit module:<br>
>> <a href="https://opensips.org/docs/modules/3.1.x/ratelimit.html" rel="noreferrer" target="_blank">https://opensips.org/docs/modules/3.1.x/ratelimit.html</a><br>
>><br>
>> -ovidiu<br>
>><br>
>> On Wed, Jan 20, 2021 at 10:01 PM Alexander Perkins<br>
>> <<a href="mailto:alexanderhenryperkins@gmail.com" target="_blank">alexanderhenryperkins@gmail.com</a>> wrote:<br>
>> ><br>
>> > Hi All.  Is there a way to limit the calls per second by pulling the information from a database? I was looking at the call_control module and that seems to be a global value. but I would need something that I can control at the call level (I will be handling different accounts that have different limits).<br>
>> ><br>
>> > Thanks, All.  Any help is appreciated.<br>
>> ><br>
>> > Alex<br>
>> > _______________________________________________<br>
>> > Users mailing list<br>
>> > <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
>> > <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
>><br>
>><br>
>><br>
>> --<br>
>> VoIP Embedded, Inc.<br>
>> <a href="http://www.voipembedded.com" rel="noreferrer" target="_blank">http://www.voipembedded.com</a><br>
>><br>
>> _______________________________________________<br>
>> Users mailing list<br>
>> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
>> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
<br>
-- <br>
VoIP Embedded, Inc.<br>
<a href="http://www.voipembedded.com" rel="noreferrer" target="_blank">http://www.voipembedded.com</a><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>

<br>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt;text-align:justify"><font size="3" face="Verdana"><span style="font-size:8px;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"></span></font></p><div><img src="https://www.x-on.co.uk/email/footer/banner-awards-itspa-techeast.jpg"></div><div><br></div><div><div><div><font size="4"><b><sup><font face="Verdana">0333 332 0000  |  <a href="https://www.x-on.co.uk" target="_blank">x-on.co.uk</a>  |  <sub> </sub></font></sup></b></font><font size="4"><b><sub><sup><font face="Verdana"><a href="https://www.linkedin.com/company/x-on" target="_blank"><img src="http://www.x-on.co.uk//images/icon/linkedin.png" width="24" height="24"></a>  <a href="https://www.facebook.com/XonTel" target="_blank"><img src="http://www.x-on.co.uk//images/icon/facebook.png" width="24" height="24"></a>  <a href="https://twitter.com/xonuk" target="_blank"><img src="http://www.x-on.co.uk//images/icon/twitter.png" width="24" height="24"></a></font></sup></sub> </b></font><b style="font-size:large"><sup><font face="Verdana">  |  <a href="https://www.x-on.co.uk/service/surgery-connect/coronavirus.htm" target="_blank">Coronavirus</a></font></sup></b><br><p><span style="font-family:Verdana;font-size:8px"><a href="http://www.itspa.org.uk/itspa-awards" target="_blank">THE ITSPA AWARDS 2020</a> AND Best ITSP - Mid Market, Best Software and Best Vertical Solution are trade marks of the Internet Telephony Services Providers' Association, used under licence.</span></p><p><span style="font-size:6.0pt;font-family:Verdana;color:black">X-on
is a trading name of Storacall Technology Ltd a limited company registered in
England and Wales.<br>
Registered Office : Avaland House, 110 London Road, Apsley, Hemel Hempstead,
Herts, HP3 9SD. Company Registration No. 2578478.<br>
The information in this e-mail is confidential and for use by the addressee(s)
only. If you are not the intended recipient, please notify X-on immediately on <span>+44(0)333 332 0000</span> and delete the<br>message from your computer. If you are not a named addressee you must not use,
disclose, disseminate, distribute, copy, print or reply to this email. </span><span style="font-size:6.0pt;font-family:Verdana;color:black">Views
or opinions expressed by an individual<br>within this email may not necessarily
reflect the views of X-on or its associated companies. Although X-on routinely
screens for viruses, addressees should scan this email and any attachments<br>for
viruses. X-on makes no representation or warranty as to the absence of viruses
in this email or any attachments.</span></p>





<p><span style="font-size:6.0pt;font-family:Verdana;color:black"></span><font size="2"><span style="font-size:6.0pt;font-family:Verdana;color:black"></span></font></p></div></div></div>