<p>We're using version: kamailio 5.0.7 (x86_64/linux) 743c2d and pl_check() using TAILDROP algorithm is only triggered when the pipe counter is greater than "interval" *  "timer_interval".</p>
<p>Example:</p>
<pre><code>modparam("pipelimit", "timer_interval", 3)
modparam("pipelimit", "hash_size", 10)
modparam("pipelimit", "db_url", DBURL)
modparam("pipelimit", "reply_code", 503)
modparam("pipelimit", "reply_reason", "CPS Limit reached")

      if (!pl_check("$si", "TAILDROP", "20")) {
        pl_drop();
        exit;
      }
</code></pre>
<p>Result: pl_check is only triggered when "PIPE: id=10.0.0.2 load=0 counter=61"</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1671#issuecomment-430119372">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZeDCpxQ6s_LU2fo0JXXt_dJna4NNks5ulX-3gaJpZM4XRoX9">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZUFFUNRyqq-v-lVb-dicrVhwa4Buks5ulX-3gaJpZM4XRoX9.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"PERSON","message":"@rogelio-telnyx in #1671: We're using version: kamailio 5.0.7 (x86_64/linux) 743c2d and pl_check() using TAILDROP algorithm is only triggered when the pipe counter is greater than \"interval\" *  \"timer_interval\".\r\n\r\nExample:\r\n```\r\nmodparam(\"pipelimit\", \"timer_interval\", 3)\r\nmodparam(\"pipelimit\", \"hash_size\", 10)\r\nmodparam(\"pipelimit\", \"db_url\", DBURL)\r\nmodparam(\"pipelimit\", \"reply_code\", 503)\r\nmodparam(\"pipelimit\", \"reply_reason\", \"CPS Limit reached\")\r\n\r\n      if (!pl_check(\"$si\", \"TAILDROP\", \"20\")) {\r\n        pl_drop();\r\n        exit;\r\n      }\r\n```\r\n\r\nResult: pl_check is only triggered when \"PIPE: id=10.0.0.2 load=0 counter=61\""}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1671#issuecomment-430119372"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1671#issuecomment-430119372",
"url": "https://github.com/kamailio/kamailio/issues/1671#issuecomment-430119372",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [kamailio/kamailio] pipelimit module documentation error? (#1671)",
"sections": [
{
"text": "",
"activityTitle": "**Rogelio Perez**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@rogelio-telnyx",
"facts": [

]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1671,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/issues/1671#issuecomment-430119372"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 390497789\n}"
}
],
"themeColor": "26292E"
}
]</script>