How to get rate(cps) it which calls are hitting opensips

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to get rate(cps) it which calls are hitting opensips

aqsyounas
Hi, users.

I am new to opensips, just started playing with it. Please pardon me for my naive question, but I want cps in opensips.

I have tried the following snippet, but still calls went on.

if (is_method("INVITE")) {
                if (!rl_check("$si", "3", "RED")) {
                xlog("L_ERR","Cps limit reached [$fu/$tu/$ru/$ci]");
                sl_send_reply("403", "CPS Limit Exceeded");
                exit;
        };     
                setflag(ACC_DO); # do accounting
        }

Found at the following thread.
http://opensips.org/pipermail/users/2012-April/021478.html

Though this snippet is limiting the cps.(does not work for me) But I want is cps on over all opensips.

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.

Thanks for your help.



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to get rate(cps) it which calls are hitting opensips

Laszlo


On Thu, Mar 26, 2015 at 7:41 PM, Aqs Younas <[hidden email]> wrote:
Hi, users.

I am new to opensips, just started playing with it. Please pardon me for my naive question, but I want cps in opensips.

I have tried the following snippet, but still calls went on.

if (is_method("INVITE")) {
                if (!rl_check("$si", "3", "RED")) {
                xlog("L_ERR","Cps limit reached [$fu/$tu/$ru/$ci]");
                sl_send_reply("403", "CPS Limit Exceeded");
                exit;
        };     
                setflag(ACC_DO); # do accounting
        }

Found at the following thread.
http://opensips.org/pipermail/users/2012-April/021478.html

Though this snippet is limiting the cps.(does not work for me) But I want is cps on over all opensips.

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.

Thanks for your help.



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


With using $si you limiting the individual source IPs.
(the first example)

Also make sure that you set the timer_interval

--

Kind regards,
Laszlo Bekesi
http://voipfreak.net

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users