<div dir="ltr"><div><div><div>Hi Daniel,<br><br></div>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?<br>

<br></div>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?<br><br></div>Best Regards and many thanks,<br>

Sebastian<br><div><div><div><div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 30, 2014 at 4:56 PM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hello,<div class=""><br>
    <br>
    <div>On 30/04/14 15:43, Sebastian Damm
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>Hi,<br>
              <br>
            </div>
            actually, I only need one limit for all users. I can exempt
            some calls based on IP from the limit. <br>
          </div>
        </div>
      </div>
    </blockquote></div>
    for all users should just work using one pipe.<br>
    <br>
    If you want per user, I already committed on master branch to have
    dynamic pipes, see:<br>
    <br>
<a href="http://kamailio.org/docs/modules/devel/modules/pipelimit.html#pipelimit.f.pl_check" target="_blank">http://kamailio.org/docs/modules/devel/modules/pipelimit.html#pipelimit.f.pl_check</a><br>
    <br>
    You should be able to just replace pipelimit from master in a 4.1
    branch clone.<br>
    <br>
    If you try it, let me know if works ok.<br>
    <br>
    Cheers,<br>
    Daniel<div><div class="h5"><br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div>Thanks for the input on how to implement it with the
            existing modules.<br>
            <br>
          </div>
          Best Regards,<br>
        </div>
        Sebastian<br>
        <div>
          <div>
            <div>
              <div class="gmail_extra"><br>
                <br>
                <div class="gmail_quote">On Tue, Apr 29, 2014 at 9:31
                  PM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>
                  wrote:<br>
                  <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                    <div bgcolor="#FFFFFF" text="#000000"> Hello,<br>
                      <br>
                      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.<br>
                      <br>
                      Right now you can probably get it with htable.<br>
                      - set a maximum lifetime for items to the period
                      you want to count<br>
                      - for each request you add an item with some
                      random key and value being the user<br>
                      - use $sthcv(...) to count the number of items
                      that have the value of the user<br>
                      <br>
                      Cheers,<br>
                      Daniel
                      <div>
                        <div><br>
                          <br>
                          <div>On 29/04/14 13:41, Sebastian Damm wrote:<br>
                          </div>
                        </div>
                      </div>
                      <blockquote type="cite">
                        <div>
                          <div>
                            <div dir="ltr">
                              <div>
                                <div>
                                  <div>Hi,<br>
                                    <br>
                                  </div>
                                  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.<br>
                                  <br>
                                </div>
                                Is there a module I can use? Or is this
                                generally a bad idea?<br>
                                <br>
                              </div>
                              Best Regards,<br>
                              Sebastian<br>
                              <div>
                                <div>
                                  <div>
                                    <div> </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                            <br>
                            <fieldset></fieldset><br></div></div></blockquote></div></blockquote></div></div></div></div></div></div></blockquote></div></div></div></blockquote></div><br></div></div>