Thanks Daniel and Alex,

I will submit a request for it. It will definitely be a helpful addition as it helps people implement various overload control mechanism where many of them require tuning the rate. In the meantime I will do as Alex suggested to use my own counters to keep track of messages and limit them properly.

Cheers,
Alireza


On Fri, Aug 15, 2014 at 10:23 AM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
Hello,


On 14/08/14 18:49, AliReza Khoshgoftar Monfared wrote:
Hi list,

A quick question,

What is the best way to limit the rate of the kamailio,
Say I want it to process only 200 INVITEs per second

I know this can be done using ratelimit module, but what if I want to change this rate dynamically? say, in an overload control scenario, I am getting a recommended rate piggybacked in my replies, and I read it, then how can I change the messge processing rate of kamailio in runtime inside my script?

Is there a way to change the rate using ratelimit but inside script as messages come?

The RPC function (rl.set_pipe) does it, but can I call it inside my script?
you can use exec module to execute an external command (kamctl ... or kamcmd ...). Also, utils or some embedded interpreter can be used to make http requests (to xmlrpc).

On the other hand, pipelimit (which is intended to be more dynamic), got the option to define pipes dinammicaly. Adding support to change the limit should be easy -- I will look into it if nobody else sends a patch meanwhile (and could be better to add a feature request on tracker, not to forget about it) -- however, it is only in devel version.

Cheers,
Daniel

--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA



_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users