Hi,
I'm looking for a solution to limit the number of call initiations or OPTIONS packets or REGISTER packets per user. Neither pike, nor pipelimit or ratelimit give me the possibility to do this. Limiting it based on the source IP is not an option in our case.
Is there a module I can use? Or is this generally a bad idea?
Best Regards, Sebastian http://www.sipgate.co.uk
Hello,
do you need with different limits for each user and method? Considering to add a default limit and algorithm for dynamic pipes that could be added at runtime, without prior definition.
Right now you can probably get it with htable. - set a maximum lifetime for items to the period you want to count - for each request you add an item with some random key and value being the user - use $sthcv(...) to count the number of items that have the value of the user
Cheers, Daniel
On 29/04/14 13:41, Sebastian Damm wrote:
Hi,
I'm looking for a solution to limit the number of call initiations or OPTIONS packets or REGISTER packets per user. Neither pike, nor pipelimit or ratelimit give me the possibility to do this. Limiting it based on the source IP is not an option in our case.
Is there a module I can use? Or is this generally a bad idea?
Best Regards, Sebastian
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
Hi,
actually, I only need one limit for all users. I can exempt some calls based on IP from the limit.
Thanks for the input on how to implement it with the existing modules.
Best Regards, Sebastian
On Tue, Apr 29, 2014 at 9:31 PM, Daniel-Constantin Mierla <miconda@gmail.com
wrote:
Hello,
do you need with different limits for each user and method? Considering to add a default limit and algorithm for dynamic pipes that could be added at runtime, without prior definition.
Right now you can probably get it with htable.
- set a maximum lifetime for items to the period you want to count
- for each request you add an item with some random key and value being
the user
- use $sthcv(...) to count the number of items that have the value of the
user
Cheers, Daniel
On 29/04/14 13:41, Sebastian Damm wrote:
Hi,
I'm looking for a solution to limit the number of call initiations or OPTIONS packets or REGISTER packets per user. Neither pike, nor pipelimit or ratelimit give me the possibility to do this. Limiting it based on the source IP is not an option in our case.
Is there a module I can use? Or is this generally a bad idea?
Best Regards, Sebastian
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
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
Hello,
On 30/04/14 15:43, Sebastian Damm wrote:
Hi,
actually, I only need one limit for all users. I can exempt some calls based on IP from the limit.
for all users should just work using one pipe.
If you want per user, I already committed on master branch to have dynamic pipes, see:
http://kamailio.org/docs/modules/devel/modules/pipelimit.html#pipelimit.f.pl...
You should be able to just replace pipelimit from master in a 4.1 branch clone.
If you try it, let me know if works ok.
Cheers, Daniel
Thanks for the input on how to implement it with the existing modules.
Best Regards, Sebastian
On Tue, Apr 29, 2014 at 9:31 PM, Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com> wrote:
Hello, do you need with different limits for each user and method? Considering to add a default limit and algorithm for dynamic pipes that could be added at runtime, without prior definition. Right now you can probably get it with htable. - set a maximum lifetime for items to the period you want to count - for each request you add an item with some random key and value being the user - use $sthcv(...) to count the number of items that have the value of the user Cheers, Daniel On 29/04/14 13:41, Sebastian Damm wrote:
Hi, I'm looking for a solution to limit the number of call initiations or OPTIONS packets or REGISTER packets per user. Neither pike, nor pipelimit or ratelimit give me the possibility to do this. Limiting it based on the source IP is not an option in our case. Is there a module I can use? Or is this generally a bad idea? Best Regards, Sebastian _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -http://www.asipto.com http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> -http://www.linkedin.com/in/miconda _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
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
Hi Daniel,
my last mail was probably not really clear. I don't want a pipe for all users together, but one for each user. What I wanted to say is, I don't need different limits for some users, they all share the same limits. I have implemented the htable version now, and it's working as expected (when considering the garbage collector timing). Could the performance decrease, if the garbage collector has to clean thousands of entries from the hash every 20 seconds?
With your new solution, I guess there would quite a few thousand pipes in memory (since they don't get destroyed) in our scenario. Up to how many pipes is Kamailio able to handle?
Best Regards and many thanks, Sebastian
On Wed, Apr 30, 2014 at 4:56 PM, Daniel-Constantin Mierla <miconda@gmail.com
wrote:
Hello,
On 30/04/14 15:43, Sebastian Damm wrote:
Hi,
actually, I only need one limit for all users. I can exempt some calls based on IP from the limit.
for all users should just work using one pipe.
If you want per user, I already committed on master branch to have dynamic pipes, see:
http://kamailio.org/docs/modules/devel/modules/pipelimit.html#pipelimit.f.pl...
You should be able to just replace pipelimit from master in a 4.1 branch clone.
If you try it, let me know if works ok.
Cheers, Daniel
Thanks for the input on how to implement it with the existing modules.
Best Regards, Sebastian
On Tue, Apr 29, 2014 at 9:31 PM, Daniel-Constantin Mierla < miconda@gmail.com> wrote:
Hello,
do you need with different limits for each user and method? Considering to add a default limit and algorithm for dynamic pipes that could be added at runtime, without prior definition.
Right now you can probably get it with htable.
- set a maximum lifetime for items to the period you want to count
- for each request you add an item with some random key and value being
the user
- use $sthcv(...) to count the number of items that have the value of the
user
Cheers, Daniel
On 29/04/14 13:41, Sebastian Damm wrote:
Hi,
I'm looking for a solution to limit the number of call initiations or OPTIONS packets or REGISTER packets per user. Neither pike, nor pipelimit or ratelimit give me the possibility to do this. Limiting it based on the source IP is not an option in our case.
Is there a module I can use? Or is this generally a bad idea?
Best Regards, Sebastian