Hi Ovidiu,<div><br></div><div>Some of my subscribers use dialers which has an average cps of 100. In this case, does it still make sense to limit the rate of each subscriber? If it is, is there a way to implement it, considering there are limited number of pipes that can be used with opensips?</div>
<div><br></div><div>Thanks!</div><div><br></div><div>Regards,</div><div>Ronald<br><br><div class="gmail_quote">On Sat, Feb 26, 2011 at 1:09 AM, Ovidiu Sas <span dir="ltr">&lt;<a href="mailto:osas@voipembedded.com">osas@voipembedded.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello Bogdan,<br>
<br>
Just for the record, I am not against having more flexibility in<br>
building scripts and new features (like dynamic creation of pipes) are<br>
more then welcome.  In my previous replies I was just pointing out<br>
that ratelimit-ing basic accounts and small trunks doesn&#39;t add more<br>
protection for the server itself or better subscriber management.<br>
Setting a ratelimit for a SIP account that has a channel limit of two<br>
is an overkill, IMHO.<br>
Ratelimit-ing really makes sense for large SIP trunks and whole SIP<br>
traffic (server protection).<br>
<br>
<br>
Regards,<br>
<font color="#888888">Ovidiu Sas<br>
</font><div><div></div><div class="h5"><br>
On Fri, Feb 25, 2011 at 11:59 AM, Bogdan-Andrei Iancu<br>
&lt;<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>&gt; wrote:<br>
&gt; Hi Ovidiu,<br>
&gt;<br>
&gt; actually we were flirting for some time with extending the ratelimit module<br>
&gt; to allow dynamic creation of  pipes - this will give you more flexibility in<br>
&gt; scripting and scenarios (like dynamic number of trunke, DB provisioning,<br>
&gt; etc).....But this was a bit postponed as there are other more important<br>
&gt; things to do and resources are limited ;)<br>
&gt;<br>
&gt; Regards,<br>
&gt; Bogdan<br>
&gt;<br>
&gt; Ovidiu Sas wrote:<br>
&gt;&gt;<br>
&gt;&gt; There are two different things:<br>
&gt;&gt;  a. channel limitation or concurrent call limit;<br>
&gt;&gt;  b. ratelimit or cps limitation (cps = cals per second).<br>
&gt;&gt;<br>
&gt;&gt; With the dialog module, you limit _only_ the number of concurrent<br>
&gt;&gt; calls (a).  How fast will a SIP trunk be saturated is up to the cps.<br>
&gt;&gt; If you have a limit of 30 calls and the calls are coming in at a rate<br>
&gt;&gt; of 1 cps, in 30s you will reach your limit.  If the calls are coming<br>
&gt;&gt; in at a rate of 15 cps, you will reach the limit in 2s.<br>
&gt;&gt;<br>
&gt;&gt; With the ratelimit module, you limit _only_ the number of calls per<br>
&gt;&gt; second that are processed.<br>
&gt;&gt; If you set a cps limit of 5 cps and your incoming traffic is 100cps,<br>
&gt;&gt; then every second the first 5 calls will go through and the next 95<br>
&gt;&gt; will be rejected (based on TAILDROP algorithm).  If the traffic is<br>
&gt;&gt; steady for 10s, then you will have 10x5=50 active calls and 10x95=950<br>
&gt;&gt; rejected calls due to cps limitation.<br>
&gt;&gt;<br>
&gt;&gt; Now, if you combine both (30 channels max and 5cps limit for incoming<br>
&gt;&gt; traffic at 100 cps), during the first 6s you will saturate the trunk<br>
&gt;&gt; (by accepting the first 5 calls and rejecting the other 95 every<br>
&gt;&gt; second) and all calls after that will be rejected.<br>
&gt;&gt;<br>
&gt;&gt; Hope this helps.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Ovidiu Sas<br>
&gt;&gt; On Wed, Feb 23, 2011 at 12:51 PM, Ronald Cepres &lt;<a href="mailto:rbcepres@gmail.com">rbcepres@gmail.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Wed, Feb 23, 2011 at 6:10 AM, Ovidiu Sas &lt;<a href="mailto:osas@voipembedded.com">osas@voipembedded.com</a>&gt;<br>
&gt;&gt;&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; If a virtual PRI is set up (23 channels for NA or 30 channels for<br>
&gt;&gt;&gt;&gt; Europe), again the cps doesn&#39;t really count.  As soon as the virtual<br>
&gt;&gt;&gt;&gt; PRI is maxed out (in terms of channels) all subsequent calls will be<br>
&gt;&gt;&gt;&gt; rejected (and the cps will be 0).<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi Ovidiu,<br>
&gt;&gt;&gt; Does that mean that if i have a concurrent call limit of 30 for a user<br>
&gt;&gt;&gt; and<br>
&gt;&gt;&gt; he bursts 500 cps, he still wouldn&#39;t exceed 30 cps?<br>
&gt;&gt;&gt; By the way, I use a method similar to the one posted in the tutorials to<br>
&gt;&gt;&gt; limit concurrent calls<br>
&gt;&gt;&gt; (link: <a href="http://www.opensips.org/Resources/DocsTutConcurrentCalls" target="_blank">http://www.opensips.org/Resources/DocsTutConcurrentCalls</a>)<br>
&gt;&gt;&gt; Thanks!<br>
&gt;&gt;&gt; Regards,<br>
&gt;&gt;&gt; Ronald<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; Users mailing list<br>
&gt;&gt;&gt; <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
&gt;&gt;&gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Users mailing list<br>
&gt;&gt; <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
&gt;&gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Bogdan-Andrei Iancu<br>
&gt; OpenSIPS eBootcamp - 28th February 2011<br>
&gt; OpenSIPS solutions and &quot;know-how&quot;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
&gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div>