On 08/07/15 14:09, Fred Posner wrote:
I know in ratelimit, you can define a method within
queues... for
example, modparam("ratelimit", "queue", "3:INVITE") to
match on INVITE
method.
With pipelimit, is the method called from the config,
Yes, with pipelimit is supposed to have the conditions in config,
allowing to match on more than sip method, as needed, for example source
IP, user ids, etc...
Cheers,
Daniel
such as:
if(is_method("INVITE")) {
# Checking limit on INVITE
if (!pl_check("$au", "traildrop", "$var(limita)")) {
pl_drop();
exit;
}
}
if(is_method("REGISTER")) {
# Checking limit on REGISTER
if (!pl_check("$au", "traildrop", "$var(limitb)")) {
pl_drop();
exit;
}
}
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio -
http://www.asipto.com