Module: kamailio
Branch: master
Commit: 69dfb0faac87307ab2bb746b4e10d25a0279de70
URL: https://github.com/kamailio/kamailio/commit/69dfb0faac87307ab2bb746b4e10d25…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2017-05-31T09:46:18+02:00
modules: readme files regenerated - pipelimit ... [skip ci]
---
Modified: src/modules/pipelimit/README
---
Diff: https://github.com/kamailio/kamailio/commit/69dfb0faac87307ab2bb746b4e10d25…
Patch: https://github.com/kamailio/kamailio/commit/69dfb0faac87307ab2bb746b4e10d25…
---
diff --git a/src/modules/pipelimit/README b/src/modules/pipelimit/README
index 980ad07c86..2dda0031a7 100644
--- a/src/modules/pipelimit/README
+++ b/src/modules/pipelimit/README
@@ -351,7 +351,7 @@ kamcmd cfg.set_now_string pipelimit reply_reason "Limiting"
ratelimit module for details on each algorithm.
* limit - the integer or pseudovariable with the limit value.
- This function can be used from REQUEST_ROUTE.
+ This function can be used from ANY_ROUTE.
Example 1.12. pl_check usage
...
@@ -419,7 +419,8 @@ with unexpected retcode=$var(check_result)\n");
* min - the minimum value of "Retry-After" header.
* max - the maximum value of "Retry-After" header.
- This function can be used from REQUEST_ROUTE.
+ This function can be used from
+ REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE|ONSEND_ROUTE.
Example 1.13. pl_drop usage
...
Module: kamailio
Branch: master
Commit: 06648b9ce868307eb487ced9bd3d61f249246a73
URL: https://github.com/kamailio/kamailio/commit/06648b9ce868307eb487ced9bd3d61f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-05-31T09:32:52+02:00
pipelimit: updates to documentation for cfg functions
---
Modified: src/modules/pipelimit/doc/pipelimit_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/06648b9ce868307eb487ced9bd3d61f…
Patch: https://github.com/kamailio/kamailio/commit/06648b9ce868307eb487ced9bd3d61f…
---
diff --git a/src/modules/pipelimit/doc/pipelimit_admin.xml b/src/modules/pipelimit/doc/pipelimit_admin.xml
index 148b8d14b8..db7129afc7 100644
--- a/src/modules/pipelimit/doc/pipelimit_admin.xml
+++ b/src/modules/pipelimit/doc/pipelimit_admin.xml
@@ -376,7 +376,7 @@ modparam("pipelimit", "reply_reason", "Limiting")
</para></listitem>
</itemizedlist>
<para>
- This function can be used from REQUEST_ROUTE.
+ This function can be used from ANY_ROUTE.
</para>
<example>
<title><function>pl_check</function> usage</title>
@@ -461,7 +461,7 @@ with unexpected retcode=$var(check_result)\n");
</listitem>
</itemizedlist>
<para>
- This function can be used from REQUEST_ROUTE.
+ This function can be used from REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE|ONSEND_ROUTE.
</para>
<example>
<title><function>pl_drop</function> usage</title>
Module: kamailio
Branch: master
Commit: c4315a4755c555ac9a5c65649625e7678c470ca8
URL: https://github.com/kamailio/kamailio/commit/c4315a4755c555ac9a5c65649625e76…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2017-05-31T09:31:47+02:00
modules: readme files regenerated - ratelimit ... [skip ci]
---
Modified: src/modules/ratelimit/README
---
Diff: https://github.com/kamailio/kamailio/commit/c4315a4755c555ac9a5c65649625e76…
Patch: https://github.com/kamailio/kamailio/commit/c4315a4755c555ac9a5c65649625e76…
---
diff --git a/src/modules/ratelimit/README b/src/modules/ratelimit/README
index 78648295ea..3982bd554a 100644
--- a/src/modules/ratelimit/README
+++ b/src/modules/ratelimit/README
@@ -51,7 +51,7 @@ Hendrik Scholz
6. Functions
6.1. rl_check([pvar])
- 6.2. rl_check_pipe([pipe_no])
+ 6.2. rl_check_pipe(pipe_no)
7. RPC Commands
@@ -103,7 +103,7 @@ Chapter 1. Admin Guide
6. Functions
6.1. rl_check([pvar])
- 6.2. rl_check_pipe([pipe_no])
+ 6.2. rl_check_pipe(pipe_no)
7. RPC Commands
@@ -325,7 +325,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
6. Functions
6.1. rl_check([pvar])
- 6.2. rl_check_pipe([pipe_no])
+ 6.2. rl_check_pipe(pipe_no)
6.1. rl_check([pvar])
@@ -334,8 +334,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
type, and then the pipe will be identified based on the matched queue.
If a pipe number is provided as a parameter, then the given pipe number
will be used for identifying the ratelimit algorithm. The pipe number
- must be provided via a pseudovariable. It is recommended to provide the
- pipe number via an integer pseudovariable.
+ must be provided as number or via a pseudovariable.
The method will return an error code if the limit for the matched
algorithm is reached.
@@ -344,7 +343,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
* pvar - the pseudovariable holding the pipe id to be used by
ratelimit.
- This function can be used from REQUEST_ROUTE.
+ This function can be used from ANY_ROUTE.
Example 1.4. rl_check usage
...
@@ -353,7 +352,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
append_to_reply("Retry-After: 5\r\n");
sl_send_reply("503","Limiting");
exit;
- };
+ }
...
# use pipe no 1 for the current method
# set int pvar to 1
@@ -362,25 +361,14 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
append_to_reply("Retry-After: 5\r\n");
sl_send_reply("503","Limiting");
exit;
- };
-...
- # use pipe no 1 for the current method
- # set str pvar to 1
- $var(p) = "1";
- if (!rl_check("$var(p)") {
- append_to_reply("Retry-After: 5\r\n");
- sl_send_reply("503","Limiting");
- exit;
- };
+ }
...
-6.2. rl_check_pipe([pipe_no])
+6.2. rl_check_pipe(pipe_no)
- Check the current request against the matched ratelimit algorithm. If
- no parameter is provided, the queue will be matched based on method
- type, and then the pipe will be identified based on the matched queue.
- If a pipe number is provided as a parameter, then the given pipe number
- will be used for identifying the ratelimit algorithm.
+ Check the current request against the matched ratelimit algorithm of
+ the pipe provided as parameter. The parameter can be provided as number
+ or variable.
The method will return an error code if the limit for the matched
algorithm is reached.
@@ -392,19 +380,12 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
Example 1.5. rl_check_pipe usage
...
- # perform queue/pipe match for current method
- if (!rl_check_pipe()) {
- append_to_reply("Retry-After: 5\r\n");
- sl_send_reply("503","Limiting");
- exit;
- };
-...
# use pipe no 1 for the current method
if (!rl_check_pipe("1") {
append_to_reply("Retry-After: 5\r\n");
sl_send_reply("503","Limiting");
exit;
- };
+ }
...
7. RPC Commands
Module: kamailio
Branch: master
Commit: 44cc202959bd32e1a0c6e7926edce32cc8cb5f3f
URL: https://github.com/kamailio/kamailio/commit/44cc202959bd32e1a0c6e7926edce32…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-05-31T09:18:15+02:00
ratelimit: updates to documentation
---
Modified: src/modules/ratelimit/doc/ratelimit_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/44cc202959bd32e1a0c6e7926edce32…
Patch: https://github.com/kamailio/kamailio/commit/44cc202959bd32e1a0c6e7926edce32…
---
diff --git a/src/modules/ratelimit/doc/ratelimit_admin.xml b/src/modules/ratelimit/doc/ratelimit_admin.xml
index bdfec2b8ac..911da3fdf1 100644
--- a/src/modules/ratelimit/doc/ratelimit_admin.xml
+++ b/src/modules/ratelimit/doc/ratelimit_admin.xml
@@ -283,8 +283,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
then the pipe will be identified based on the matched queue. If a pipe number
is provided as a parameter, then the given pipe number will be used for
identifying the ratelimit algorithm.
- The pipe number must be provided via a pseudovariable. It is recommended to
- provide the pipe number via an integer pseudovariable.
+ The pipe number must be provided as number or via a pseudovariable.
</para>
<para>The method will return an error code if the limit for the matched
algorithm is reached.
@@ -297,7 +296,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
</para></listitem>
</itemizedlist>
<para>
- This function can be used from REQUEST_ROUTE.
+ This function can be used from ANY_ROUTE.
</para>
<example>
<title><function>rl_check</function> usage</title>
@@ -308,7 +307,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
append_to_reply("Retry-After: 5\r\n");
sl_send_reply("503","Limiting");
exit;
- };
+ }
...
# use pipe no 1 for the current method
# set int pvar to 1
@@ -317,30 +316,19 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
append_to_reply("Retry-After: 5\r\n");
sl_send_reply("503","Limiting");
exit;
- };
-...
- # use pipe no 1 for the current method
- # set str pvar to 1
- $var(p) = "1";
- if (!rl_check("$var(p)") {
- append_to_reply("Retry-After: 5\r\n");
- sl_send_reply("503","Limiting");
- exit;
- };
+ }
...
</programlisting>
</example>
</section>
<section>
<title>
- <function moreinfo="none">rl_check_pipe([pipe_no])</function>
+ <function moreinfo="none">rl_check_pipe(pipe_no)</function>
</title>
<para>
- Check the current request against the matched ratelimit algorithm. If no
- parameter is provided, the queue will be matched based on method type, and
- then the pipe will be identified based on the matched queue. If a pipe number
- is provided as a parameter, then the given pipe number will be used for
- identifying the ratelimit algorithm.
+ Check the current request against the matched ratelimit algorithm of the
+ pipe provided as parameter. The parameter can be provided as
+ number or variable.
</para>
<para>The method will return an error code if the limit for the matched
algorithm is reached.
@@ -358,19 +346,12 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
<title><function>rl_check_pipe</function> usage</title>
<programlisting format="linespecific">
...
- # perform queue/pipe match for current method
- if (!rl_check_pipe()) {
- append_to_reply("Retry-After: 5\r\n");
- sl_send_reply("503","Limiting");
- exit;
- };
-...
# use pipe no 1 for the current method
if (!rl_check_pipe("1") {
append_to_reply("Retry-After: 5\r\n");
sl_send_reply("503","Limiting");
exit;
- };
+ }
...
</programlisting>
</example>
Hi @kamailio-sync!
Help us secure your GitHub account by verifying your email address (sr-dev(a)lists.kamailio.org). This will let you receive notifications and password resets from GitHub.
Click the link below to verify your email address:
https://github.com/users/kamailio-sync/emails/32326566/confirm_verification…
You’re receiving this email because you recently created a new GitHub account or added a new email address. If this wasn’t you, please ignore this email.
---
Sent with <3 by GitHub.
GitHub, Inc. 88 Colin P Kelly Jr Street
San Francisco, CA 94107