<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 26, 2015 at 7:41 PM, Aqs Younas <span dir="ltr"><<a href="mailto:aqsyounas@gmail.com" target="_blank">aqsyounas@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hi, users.<br><br></div>I am new to opensips, just started playing with it. Please pardon me for my naive question, but I want cps in opensips. <br><br></div>I have tried the following snippet, but still calls went on.<br><br>if (is_method("INVITE")) {<br> if (!rl_check("$si", "3", "RED")) {<br> xlog("L_ERR","Cps limit reached [$fu/$tu/$ru/$ci]");<br> sl_send_reply("403", "CPS Limit Exceeded");<br> exit;<br> }; <br> setflag(ACC_DO); # do accounting<br> }<br><br>Found at the following thread.<br><a href="http://opensips.org/pipermail/users/2012-April/021478.html" target="_blank">http://opensips.org/pipermail/users/2012-April/021478.html</a><br><br></div>Though this snippet is limiting the cps.(does not work for me) But I want is cps on over all opensips.<br><br></div>Can anybody please tell me why this snippet is not working and how can i get overall cps on my box.I am using sipp for seding calls.<br><br></div>Thanks for your help.<br><br><div><div><div><br></div></div></div></div>
<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>
<br></blockquote></div><br>With using $si you limiting the individual source IPs.</div><div class="gmail_extra">Take a look at <a href="http://www.opensips.org/html/docs/modules/devel/ratelimit.html#id293757">http://www.opensips.org/html/docs/modules/devel/ratelimit.html#id293757</a></div><div class="gmail_extra">(the first example)</div><div class="gmail_extra"><br></div><div class="gmail_extra">Also make sure that you set the timer_interval</div><h3 class="" style="color:rgb(0,0,0);font-family:Helvetica,Arial"><span style="font-family:arial,sans-serif;font-size:small;font-weight:normal;color:rgb(34,34,34)">--</span><br></h3><div class="gmail_extra"><div class="gmail_signature"><div dir="ltr"><div><div>Kind regards,<br></div>Laszlo Bekesi<br></div><a href="http://voipfreak.net" target="_blank">http://voipfreak.net</a><br></div></div>
</div></div>