|
@@ -6,11 +6,17 @@ Hendrik Scholz
|
|
|
|
|
|
Edited by
|
|
|
|
|
|
+Ovidiu Sas
|
|
|
+
|
|
|
+Edited by
|
|
|
+
|
|
|
Daniel-Constantin Mierla
|
|
|
|
|
|
- Copyright © 2010 Asipto.com
|
|
|
+ Copyright © 2013 VoIPEmbedded Inc.
|
|
|
+
|
|
|
+ Copyright © 2010 Asipto.com
|
|
|
|
|
|
- Copyright © 2006 Freenet Cityline GmbH
|
|
|
+ Copyright © 2006 Freenet Cityline GmbH
|
|
|
__________________________________________________________________
|
|
|
|
|
|
Table of Contents
|
|
@@ -48,6 +54,15 @@ Daniel-Constantin Mierla
|
|
|
5.5. pl_get_pid
|
|
|
5.6. pl_push_load
|
|
|
|
|
|
+ 6. RPC Commands
|
|
|
+
|
|
|
+ 6.1. pl.stats
|
|
|
+ 6.2. pl.set_pipe
|
|
|
+ 6.3. pl.get_pipes
|
|
|
+ 6.4. pl.set_pid
|
|
|
+ 6.5. pl.get_pid
|
|
|
+ 6.6. pl.push_load
|
|
|
+
|
|
|
List of Examples
|
|
|
|
|
|
1.1. Set db_url parameter
|
|
@@ -98,6 +113,15 @@ Chapter 1. Admin Guide
|
|
|
5.5. pl_get_pid
|
|
|
5.6. pl_push_load
|
|
|
|
|
|
+ 6. RPC Commands
|
|
|
+
|
|
|
+ 6.1. pl.stats
|
|
|
+ 6.2. pl.set_pipe
|
|
|
+ 6.3. pl.get_pipes
|
|
|
+ 6.4. pl.set_pid
|
|
|
+ 6.5. pl.get_pid
|
|
|
+ 6.6. pl.push_load
|
|
|
+
|
|
|
1. Overview
|
|
|
|
|
|
This module implements traffic limiting for SIP requests.
|
|
@@ -145,7 +169,7 @@ Chapter 1. Admin Guide
|
|
|
|
|
|
URL of the database server to be used.
|
|
|
|
|
|
- Default value is "mysql://kamailio:kamailiorw@localhost/kamailio".
|
|
|
+ Default value is “mysql://kamailio:kamailiorw@localhost/kamailio�.
|
|
|
|
|
|
Example 1.1. Set db_url parameter
|
|
|
...
|
|
@@ -156,7 +180,7 @@ modparam("pipelimit", "db_url", "dbdriver://username:password@dbhost/dbname")
|
|
|
|
|
|
Name of DB table where data definition for pipes is stores.
|
|
|
|
|
|
- Default value is "pl_pipes".
|
|
|
+ Default value is “pl_pipes�.
|
|
|
|
|
|
Example 1.2. Set plp_table_name parameter
|
|
|
...
|
|
@@ -167,7 +191,7 @@ modparam("pipelimit", "plp_table_name", "mypipes")
|
|
|
|
|
|
Name of 'pipeid' column.
|
|
|
|
|
|
- Default value is "pipeid".
|
|
|
+ Default value is “pipeid�.
|
|
|
|
|
|
Example 1.3. Set plp_pipeid_column parameter
|
|
|
...
|
|
@@ -178,7 +202,7 @@ modparam("pipelimit", "plp_pipeid_column", "name")
|
|
|
|
|
|
Name of 'limit' column.
|
|
|
|
|
|
- Default value is "limit".
|
|
|
+ Default value is “limit�.
|
|
|
|
|
|
Example 1.4. Set plp_limit_column parameter
|
|
|
...
|
|
@@ -189,7 +213,7 @@ modparam("pipelimit", "plp_limit_column", "name")
|
|
|
|
|
|
Name of 'algorithm' column.
|
|
|
|
|
|
- Default value is "algorithm".
|
|
|
+ Default value is “algorithm�.
|
|
|
|
|
|
Example 1.5. Set plp_algorithm_column parameter
|
|
|
...
|
|
@@ -209,7 +233,7 @@ modparam("pipelimit", "plp_algorithm_column", "name")
|
|
|
|
|
|
Example 1.6. Set timer_interval parameter
|
|
|
...
|
|
|
-modparam("ratelimit", "timer_interval", 5)
|
|
|
+modparam("pipelimit", "timer_interval", 5)
|
|
|
...
|
|
|
|
|
|
3.7. reply_code (integer)
|
|
@@ -220,13 +244,13 @@ modparam("ratelimit", "timer_interval", 5)
|
|
|
|
|
|
Example 1.7. Set reply_code parameter
|
|
|
...
|
|
|
-modparam("ratelimit", "reply_code", 505)
|
|
|
+modparam("pipelimit", "reply_code", 505)
|
|
|
...
|
|
|
|
|
|
This value can be modified at runtime using kamcmd
|
|
|
|
|
|
Example 1.8. Set reply_code parameter at runtime
|
|
|
-kamcmd cfg.set_now_int ratelimit reply_code 505
|
|
|
+kamcmd cfg.set_now_int pipelimit reply_code 505
|
|
|
|
|
|
3.8. reply_reason (string)
|
|
|
|
|
@@ -236,13 +260,13 @@ kamcmd cfg.set_now_int ratelimit reply_code 505
|
|
|
|
|
|
Example 1.9. Set reply_reason parameter
|
|
|
...
|
|
|
-modparam("ratelimit", "reply_reason", "Limiting")
|
|
|
+modparam("pipelimit", "reply_reason", "Limiting")
|
|
|
...
|
|
|
|
|
|
This value can be modified at runtime using kamcmd
|
|
|
|
|
|
Example 1.10. Set reply_reason parameter at runtime
|
|
|
-kamcmd cfg.set_now_string ratelimit reply_reason "Limiting"
|
|
|
+kamcmd cfg.set_now_string pipelimit reply_reason "Limiting"
|
|
|
|
|
|
4. Functions
|
|
|
|
|
@@ -400,3 +424,88 @@ kamcmd cfg.set_now_string ratelimit reply_reason "Limiting"
|
|
|
:pl_push_load:_reply_fifo_file_
|
|
|
0.85
|
|
|
_empty_line_
|
|
|
+
|
|
|
+6. RPC Commands
|
|
|
+
|
|
|
+ 6.1. pl.stats
|
|
|
+ 6.2. pl.set_pipe
|
|
|
+ 6.3. pl.get_pipes
|
|
|
+ 6.4. pl.set_pid
|
|
|
+ 6.5. pl.get_pid
|
|
|
+ 6.6. pl.push_load
|
|
|
+
|
|
|
+6.1. pl.stats
|
|
|
+
|
|
|
+ Lists the parameters and variabiles in the pipelimit module: pipe id,
|
|
|
+ pipe load and pipe couter.
|
|
|
+
|
|
|
+ Name: pl.stats
|
|
|
+
|
|
|
+ Parameters: none
|
|
|
+
|
|
|
+ RPC Command Format:
|
|
|
+ kamcmd pl.stats
|
|
|
+
|
|
|
+6.2. pl.set_pipe
|
|
|
+
|
|
|
+ Sets the pipe parameters for the given pipe id.
|
|
|
+
|
|
|
+ Name: pl.set_pipe
|
|
|
+
|
|
|
+ Parameters:
|
|
|
+ * pipe_id - pipe id.
|
|
|
+ * pipe_algorithm - the algorithm assigned to the given pipe id.
|
|
|
+ * pipe_limit - the limit assigned to the given pipe id.
|
|
|
+
|
|
|
+ RPC Command Format:
|
|
|
+ kamcmd pl.set_pipe 2 RED 10
|
|
|
+
|
|
|
+6.3. pl.get_pipes
|
|
|
+
|
|
|
+ Gets the list of in use pipes.
|
|
|
+
|
|
|
+ Name: pl.get_pipes
|
|
|
+
|
|
|
+ Parameters: none
|
|
|
+
|
|
|
+ RPC Command Format:
|
|
|
+ kamcmd pl.get_pipes
|
|
|
+
|
|
|
+6.4. pl.set_pid
|
|
|
+
|
|
|
+ Sets the PID Controller parameters for the Feedback Algorithm.
|
|
|
+
|
|
|
+ Name: pl.set_pid
|
|
|
+
|
|
|
+ Parameters:
|
|
|
+ * ki - the integral parameter.
|
|
|
+ * kp - the proportional parameter.
|
|
|
+ * kd - the derivative parameter.
|
|
|
+
|
|
|
+ RPC Command Format:
|
|
|
+ kamcmd pl.set_pid 0.5 0.5 0.5
|
|
|
+
|
|
|
+6.5. pl.get_pid
|
|
|
+
|
|
|
+ Gets the list of in use PID Controller parameters.
|
|
|
+
|
|
|
+ Name: pl.get_pid
|
|
|
+
|
|
|
+ Parameters: none
|
|
|
+
|
|
|
+ RPC Command Format:
|
|
|
+ kamcmd pl.get_pid
|
|
|
+
|
|
|
+6.6. pl.push_load
|
|
|
+
|
|
|
+ Force the value of the load parameter. This command is useful for
|
|
|
+ testing the Feedback algorithm.
|
|
|
+
|
|
|
+ Name: pl.push_load
|
|
|
+
|
|
|
+ Parameters:
|
|
|
+ * load - the forced value of load (it must be greater then 0.0 and
|
|
|
+ smaller then 1.0).
|
|
|
+
|
|
|
+ RPC Command Format:
|
|
|
+ kamcmd pl.push_load 0.85
|