Hello, I am trying to get the current rate limit value using $rl_count, but it is giving the following error. ERROR:ratelimit:pv_get_rl_count: invalid name WARNING:core:do_assign: no value in right expression at /etc/opensips/opensips_proxy.cfg:598 4024438929 SCRIPT:CCLIMIT:INFO: rl_limit for cps_90761 = 0
Here is the code $json(call_details/tg_cps) = 0; # Default to 0 ... if ($avp(maxcps) != NULL && $avp(maxcps) > 0) { if (!rl_check("cps_$avp(trunk_group)", "$avp(maxcps)")) { xlog("L_NOTICE", "$rU SCRIPT:CPSLIMIT:DBG: Max $avp(maxcps) cps reached for trunk group $avp(trunk_group) \n"); $avp(error_reason) = $avp(error_reason) + $avp(trunk_group) + " CPS limit reached."; send_reply("403", "Max CPS limit reached"); exit; } } $json(call_details/tg_cps) = $rl_count("cps_$avp(trunk_group)"); xlog("L_INFO", "$rU SCRIPT:CCLIMIT:INFO: rl_limit for cps_$avp(trunk_group) = $json(call_details/tg_cps) \n"); >From the command opensipsctl fifo rl_list | grep cps_90761, I get PIPE:: id=cps_90761 algorithm=TAILDROP limit=2 counter=0 What am I missing? Regards, Pat Burke
_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users