Module: sip-router
Branch: master
Commit: 24e76b1932fa8c4e1136ad82cb582a97c50244c4
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=24e76b1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Oct 17 09:42:13 2014 +0200
pipelimit: enhanced docs for pl_check() function
- documented the algorithm and limit parameters
---
modules/pipelimit/README | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/modules/pipelimit/README b/modules/pipelimit/README
index 094622b..9f4caf1 100644
--- a/modules/pipelimit/README
+++ b/modules/pipelimit/README
@@ -308,7 +308,11 @@ kamcmd cfg.set_now_string pipelimit reply_reason "Limiting"
* 2 if pipe has NOP algorithm
Meaning of the parameters is as follows:
- * name - the pseudovariable holding the pipe name.
+ * name - the string or pseudovariable with the pipe name.
+ * algorithm - the string or pseudovariable with the algorithm. The
+ values can be: taildrop, red, network or feedback - see readme of
+ ratelimit module for details on each algorithm.
+ * limit - the integer or pseudovariable with the limit value.
This function can be used from REQUEST_ROUTE.
@@ -347,6 +351,13 @@ with unexpected retcode=$var(check_result)\n");
exit;
}
...
+ # perform pipe match for authenticated user
+ $var(limit) = 20;
+ if (!pl_check("$au", "traildrop", "$var(limit)")) {
+ pl_drop();
+ exit;
+ }
+...
4.2. pl_drop([ [min ], max ])
There appear to be some git merge droppings in modules/pv/pv_trans.h
that prevent successful compilation:
CC (gcc) [M pv.so] pv.o
In file included from pv.c:40:
pv_trans.h:38: error: expected identifier before ‘<<’ token
In file included from pv.c:40:
pv_trans.h:44:9: error: invalid suffix "f441f..." on integer constant
make[1]: *** [pv.o] Error 1
make: *** [install-modules] Error 1
--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
Please be kind to the English language:
http://www.entrepreneur.com/article/232906