Skip to content

Commit

Permalink
modules: readme files regenerated - modules ... [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
kamailio-dev authored and The Root committed Nov 20, 2018
1 parent 68653fa commit f62d0e1
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 34 deletions.
4 changes: 2 additions & 2 deletions src/modules/acc/README
Expand Up @@ -1246,9 +1246,9 @@ modparam("acc", "cdrs_table", "acc_cdrs")
* 1 - save seconds in time_attr and microseconds in time_exten.
* 2 - save seconds.milliseconds in time_attr.
* 3 - save formatted time according to time_format parameter, using
the output of localtime().
the output of localtime(). Used for cdr entries too.
* 4 - save formatted time according to time_format parameter, using
the output of gmtime().
the output of gmtime(). Used for cdr entries too.

Example 1.44. time_mode example
...
Expand Down
41 changes: 27 additions & 14 deletions src/modules/app_lua/README
Expand Up @@ -46,13 +46,14 @@ Daniel-Constantin Mierla

List of Examples

1.1. Set load parameter
1.2. Set register parameter
1.3. Set reload parameter
1.4. lua_dofile usage
1.5. lua_dostring usage
1.6. lua_run usage
1.7. lua_runstring usage
1.1. Build against LuaJIT libraries
1.2. Set load parameter
1.3. Set register parameter
1.4. Set reload parameter
1.5. lua_dofile usage
1.6. lua_dostring usage
1.7. lua_run usage
1.8. lua_runstring usage

Chapter 1. Admin Guide

Expand Down Expand Up @@ -120,6 +121,18 @@ Chapter 1. Admin Guide
running Kamailio with this module loaded:
* liblua5.1-dev - Lua devel library.

This module can be compiled against LuaJIT compiler (instead of
standard Lua). Then this library is needed:
* libluajit-5.1-dev - LuaJIT devel library.

To enable that, LUAJIT variable has to be set.

Example 1.1. Build against LuaJIT libraries
E.g: $ LUAJIT="yes" make modules modules=modules/app_lua

(Warning: LuaJIT version is 5.1, so scripts prepared for higher Lua
versions may not work with LuaJIT)

3. Parameters

3.1. load (string)
Expand All @@ -134,7 +147,7 @@ Chapter 1. Admin Guide

Default value is “null”.

Example 1.1. Set load parameter
Example 1.2. Set load parameter
...
modparam("app_lua", "load", "/usr/local/etc/kamailio/lua/myscript.lua")
...
Expand Down Expand Up @@ -178,7 +191,7 @@ modparam("app_lua", "load", "/usr/local/etc/kamailio/lua/myscript.lua")

Default value is “null”.

Example 1.2. Set register parameter
Example 1.3. Set register parameter
...
modparam("app_lua", "register", "sl")
...
Expand All @@ -190,7 +203,7 @@ modparam("app_lua", "register", "sl")

Default value is “0 (off)”.

Example 1.3. Set reload parameter
Example 1.4. Set reload parameter
...
modparam("app_lua", "reload", 1)
...
Expand All @@ -207,7 +220,7 @@ modparam("app_lua", "reload", 1)
Execute the Lua script stored in 'path'. The parameter can be a string
with pseudo-variables evaluated at runtime.

Example 1.4. lua_dofile usage
Example 1.5. lua_dofile usage
...
lua_dofile("/usr/local/etc/kamailio/lua/myscript.lua");
...
Expand All @@ -217,7 +230,7 @@ lua_dofile("/usr/local/etc/kamailio/lua/myscript.lua");
Execute the Lua script stored in parameter. The parameter can be a
string with pseudo-variables.

Example 1.5. lua_dostring usage
Example 1.6. lua_dostring usage
...
if(!lua_dostring("sr.log([[err]], [[----------- Hello World from $fU\n]])"))
{
Expand All @@ -232,7 +245,7 @@ if(!lua_dostring("sr.log([[err]], [[----------- Hello World from $fU\n]])"))
loaded at startup via parameter 'load'. Parameters can be strings with
pseudo-variables that are evaluated at runtime.

Example 1.6. lua_run usage
Example 1.7. lua_run usage
...
if(!lua_run("sr_append_fu_to_reply"))
{
Expand All @@ -248,7 +261,7 @@ lua_run("lua_funcx", "$rU", "2");
string with pseudo-variables. The script is executed in Lua context
specific to loaded Lua files at startup.

Example 1.7. lua_runstring usage
Example 1.8. lua_runstring usage
...
if(!lua_runstring("sr.log([[err]], [[----------- Hello World from $fU\n]])"))
{
Expand Down
39 changes: 23 additions & 16 deletions src/modules/pipelimit/README
Expand Up @@ -120,15 +120,16 @@ Chapter 1. Admin Guide
This module implements traffic limiting for SIP requests.

The module defines in an abstract mode the notion of 'pipe', which can
be a link to an IP address, to a network or a trunk. The associtiation
of traffic to a pipe is done in the config file, therefore, a pipe
could represent SIP traffic coming from a user or the flow of specific
SIP requests such as INVITE or REGISTER.
be a reference to an IP address, to a network or a trunk. The
associtiation of traffic to a pipe is done in the config file,
therefore, a pipe could represent SIP traffic coming from a user or the
flow of specific SIP requests such as INVITE or REGISTER.

Pipelimit started from ratelimit module, adding support for definition
of pipes limits in database and dynamic names. Complexity of keeping
everything in a module and make it dual mode functional resulted in a
new module which is focused on just traffic shaping policies.
new module which is focused on just traffic shaping policies, the
implementation of queues was discarded.

1.1. Algorithms

Expand All @@ -141,7 +142,8 @@ Chapter 1. Admin Guide
This is a trivial algorithm that imposes some risks when used in
conjunction with long timer intervals. At the start of each interval an
internal counter is reset and incremented for each incoming message.
Once the counter hits the configured limit pl_check returns an error.
Once the counter hits the configured limit pl_check() returns false
(negative value).

Random Early Detection Algorithm (RED)

Expand All @@ -160,8 +162,8 @@ Chapter 1. Admin Guide
This algorithm relies on information provided by network interfaces.
The total amount of bytes waiting to be consumed on all the network
interfaces is retrieved once every timer_interval seconds. If the
returned amount exceeds the limit specified in the modparam, pl_check
returns an error.
returned amount exceeds the limit specified in the modparam, pl_check()
returns false (negative value).

Feedback Algorithm (FEEDBACK)

Expand Down Expand Up @@ -277,12 +279,15 @@ modparam("pipelimit", "plp_algorithm_column", "name")

3.7. timer_interval (integer)

The initial length of a timer interval in seconds. All amounts of
messages have to be divided by this timer to get a messages per second
value.
The length of the timer interval in seconds. Counted messages are reset
each timer_interval, therefore the amounts of messages have to be
divided by this timer_interval value to get the messages per second
value. For example, if you want to allow an average of 10 messages per
second with a timer inteval of 10 seconds, then the limit value has to
be 100.

IMPORTANT: A too small value may lead to performance penalties due to
timer process overloading.
Note: A too small value may lead to performance penalties due to timer
process overloading.

Default value is 10.

Expand Down Expand Up @@ -333,8 +338,9 @@ kamcmd cfg.set_now_string pipelimit reply_reason "Limiting"
Check the current request against the 'name' pipe.

If algorithm and limit are provided, the function attempts to create a
new pipe of one with that name doesn't exit. If it exists, no changes
to algorithm and limit are done. Algorithm is case sensitive.
new pipe if one with that name doesn't exit. If it exists, no changes
to algorithm is done and the pipe limit is set to the 'limit' parameter
value, if this is greater than 0. Algorithm is case sensitive.

The pipe name can be provided via a pseudo variabile.

Expand All @@ -349,7 +355,8 @@ kamcmd cfg.set_now_string pipelimit reply_reason "Limiting"
* 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.
* limit - the integer or pseudovariable with the limit value per
timer_interval.

This function can be used from ANY_ROUTE.

Expand Down
3 changes: 3 additions & 0 deletions src/modules/sctp/README
Expand Up @@ -120,6 +120,9 @@ Chapter 1. Admin Guide
not changed and SCTP variable is not overwritten from command line,
then the SCTP support in core is enabled.

Note: it is recommended to use recent versions of libsctp (>1.0.10) and
kernel (>4.0.0) when enabling SCTP transport.

2. Dependencies

2.1. Kamailio Modules
Expand Down
8 changes: 6 additions & 2 deletions src/modules/topos/README
Expand Up @@ -84,7 +84,10 @@ Chapter 1. Admin Guide
The module is transparent for the configuration writer. It only needs
to be loaded (tune the parameters if needed).

It works for SIP MESSAGE requests.
It also works for SIP MESSAGE or other requests that do not create a
call dialog -- record_route() must be used for them as well, the
headers are not going to be in the messages sent to the network, they
are needed to know local addresses used to communicate with each side.

2. Dependencies

Expand All @@ -95,7 +98,8 @@ Chapter 1. Admin Guide

The following modules must be loaded before this module:
* rr module - server must perform record routing to ensure in-dialog
requests are encoded/decoded.
requests are encoded/decoded (it must be done for all initial
requests).
* database module - to store the data for topology stripping and
restoring.

Expand Down

0 comments on commit f62d0e1

Please sign in to comment.