Module: sip-router
Branch: master
Commit: 5919b3b6c4078db7675c71d98f671feb58c68a2a
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5919b3b…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: Thu Dec 20 08:46:24 2012 +0100
ctl Updating documentation
---
modules/ctl/README | 103 +++++++++++++-----------
modules/ctl/doc/ctl.xml | 24 +++---
modules/ctl/doc/{params.xml => ctl_params.xml} | 0
modules/ctl/doc/{rpc.xml => ctl_rpc.xml} | 0
4 files changed, 68 insertions(+), 59 deletions(-)
diff --git a/modules/ctl/README b/modules/ctl/README
index 4b5fa8a..0a60dff 100644
--- a/modules/ctl/README
+++ b/modules/ctl/README
@@ -1,4 +1,4 @@
-1. Ctl Module
+The Ctl Module
Andrei Pelinescu-Onciul
@@ -7,40 +7,36 @@ Andrei Pelinescu-Onciul
Copyright � 2009 iptelorg GmbH
__________________________________________________________________
- 1.1. Overview
- 1.2. BINRPC
- 1.3. Parameters
-
- 1.3.1. binrpc (string)
- 1.3.2. mode (integer)
- 1.3.3. user (integer or string)
- 1.3.4. group (integer or string)
- 1.3.5. fifo (integer)
- 1.3.6. autoconversion (integer)
- 1.3.7. binrpc_max_body_size (integer)
- 1.3.8. binrpc_struct_max_body_size (integer)
-
- 1.4. SIP-router RPC Functions
-
- 1.4.1. ctl.listen
- 1.4.2. ctl.connections
- 1.4.3. ctl.who
-
-1.1. Overview
-
- This module implements the binrpc transport interface for SER rpcs. It
- supports various transports over which it speaks binrpc: Unix datagram
- sockets, Unix stream sockets, UDP and TCP. It also supports a backward
- compatible FIFO interface (using the old ser FIFO protocol).
-
- By default (if no parameters are changed from the config file) it uses
- a Unix stream socket under /tmp: /tmp/ser_ctl. This socket is also the
+ List of Examples
+
+ 1. sercmd example usage
+ 2. Set binrpc parameter
+ 3. Set mode parameter
+ 4. Set user parameter
+ 5. Set group parameter
+ 6. Set fifo parameter
+ 7. Set the autoconversion parameter
+ 8. Set the binrpc_max_body_size parameter
+ 9. Set the binrpc_struct_max_body_size parameter
+ 10. print usage
+ 11. ctl.connections usage
+ 12. ctl.who usage
+
+1. Overview
+
+ This module implements the binrpc transport interface for Kamailio
+ RPCs. It supports various transports over which it speaks binrpc: Unix
+ datagram sockets, Unix stream sockets, UDP and TCP. It also supports a
+ backward compatible FIFO interface (using the old Kamailio FIFO
+ protocol).
+
+ By default (if no parameters are changed in the config file) it uses a
+ Unix stream socket under /tmp: /tmp/ser_ctl. This socket is also the
default for sercmd.
- In general it's used in conjunction with sercmd. sercmd it's a unix
- tool for invoking ser/sip-router rpcs. It can be used both in
- interactive mode (supports tab-completion and history) or command line
- mode.
+ In general it's used in conjunction with sercmd. sercmd is a Unix tool
+ for invoking Kamailio RPC functions. It can be used both in interactive
+ mode (supports tab-completion and history) or command line mode.
Example 1. sercmd example usage
$ sercmd ps
@@ -58,7 +54,7 @@ $ sercmd ps
See utils/sercmd/EXAMPLES for more examples.
-1.2. BINRPC
+2. BINRPC
binrpc is a ser proprietary binary protocol for invoking rpcs. It was
designed such that it would minimize the packet sizes and it would be
@@ -67,9 +63,18 @@ $ sercmd ps
The binrpc encoding format is fully documented inside
modules/ctl/binrpc.h.
-1.3. Parameters
+3. Parameters
-1.3.1. binrpc (string)
+ 3.1. binrpc (string)
+ 3.2. mode (integer)
+ 3.3. user (integer or string)
+ 3.4. group (integer or string)
+ 3.5. fifo (integer)
+ 3.6. autoconversion (integer)
+ 3.7. binrpc_max_body_size (integer)
+ 3.8. binrpc_struct_max_body_size (integer)
+
+3.1. binrpc (string)
Specifies the transport used for the binrpc protocol. The following
transport protocol are supported: Unix datagram sockets, Unix stream
@@ -114,7 +119,7 @@ modparam("ctl", "binrpc", "localhost:3000") # udp
modparam("ctl", "binrpc", "tcp:3012") # tcp any , port 3012
modparam("ctl", "binrpc", "udp:*:3012") # udp any , port 3012
-1.3.2. mode (integer)
+3.2. mode (integer)
Permissions used for the created Unix sockets or for the fifo.
@@ -123,7 +128,7 @@ modparam("ctl", "binrpc", "udp:*:3012") # udp any , port 3012
Example 3. Set mode parameter
modparam("ctl", "mode", 0600) # permissions
-1.3.3. user (integer or string)
+3.3. user (integer or string)
Username or uid used for the created Unix sockets or for the fifo.
@@ -132,7 +137,7 @@ modparam("ctl", "mode", 0600) # permissions
Example 4. Set user parameter
modparam("ctl", "user", "andrei")
-1.3.4. group (integer or string)
+3.4. group (integer or string)
Group name or gid used for the created Unix sockets or for the fifo.
@@ -141,7 +146,7 @@ modparam("ctl", "user", "andrei")
Example 5. Set group parameter
modparam("ctl", "group", 100)
-1.3.5. fifo (integer)
+3.5. fifo (integer)
fifo used for the obsolete fifo protocol. The fifo protocol can be run
over a real fifo, over UDP or over TCP. Format:
@@ -160,7 +165,7 @@ modparam("ctl", "fifo", "/tmp/ser_fifo2")
modparam("ctl", "fifo", "udp:*:2050") # fifo protocol over udp
modparam("ctl", "fifo", "tcp:*:2050") # fifo over tcp
-1.3.6. autoconversion (integer)
+3.6. autoconversion (integer)
Enable or disable automatic type conversion globally, for all the
methods parameters. If on, a type mismatch in a method parameter will
@@ -177,7 +182,7 @@ modparam("ctl", "fifo", "tcp:*:2050") # fifo over tcp
Example 7. Set the autoconversion parameter
modparam("ctl", "autoconversion", 1)
-1.3.7. binrpc_max_body_size (integer)
+3.7. binrpc_max_body_size (integer)
Set the size of binrpc buffer for RPC reply. Value represents
kilobytes.
@@ -187,7 +192,7 @@ modparam("ctl", "autoconversion", 1)
Example 8. Set the binrpc_max_body_size parameter
modparam("ctl", "binrpc_max_body_size", 10)
-1.3.8. binrpc_struct_max_body_size (integer)
+3.8. binrpc_struct_max_body_size (integer)
Set the size of binrpc structure buffer for RPC reply. Value represents
kilobytes.
@@ -197,9 +202,13 @@ modparam("ctl", "binrpc_max_body_size", 10)
Example 9. Set the binrpc_struct_max_body_size parameter
modparam("ctl", "binrpc_struct_max_body_size", 3)
-1.4. SIP-router RPC Functions
+4. SIP-router RPC Functions
+
+ 4.1. ctl.listen
+ 4.2. ctl.connections
+ 4.3. ctl.who
-1.4.1. ctl.listen
+4.1. ctl.listen
List all the sockets on which the ctl module listens.
@@ -209,7 +218,7 @@ modparam("ctl", "binrpc_struct_max_body_size", 3)
# note: the above command is equivalent with sercmd listen
-1.4.2. ctl.connections
+4.2. ctl.connections
Returns the number of open binrpc connections (to the ctl module).
@@ -217,7 +226,7 @@ modparam("ctl", "binrpc_struct_max_body_size", 3)
$ sercmd ctl.connections
1
-1.4.3. ctl.who
+4.3. ctl.who
List open binrpc connections (to the ctl module).
diff --git a/modules/ctl/doc/ctl.xml b/modules/ctl/doc/ctl.xml
index 21e2760..80a0d77 100644
--- a/modules/ctl/doc/ctl.xml
+++ b/modules/ctl/doc/ctl.xml
@@ -8,8 +8,9 @@
]>
-<section id="ctl" xmlns:xi="http://www.w3.org/2001/XInclude">
- <sectioninfo>
+<book id="ctl" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <bookinfo>
+ <title>The Ctl Module</title>
<authorgroup>
<author>
<firstname>Andrei</firstname>
@@ -24,27 +25,26 @@
<year>2009</year>
<holder>iptelorg GmbH</holder>
</copyright>
- </sectioninfo>
+ </bookinfo>
- <title>Ctl Module</title>
<section id="ctl.overview">
<title>Overview</title>
<para>
- This module implements the binrpc transport interface for &ser; rpcs.
+ This module implements the binrpc transport interface for &kamailio; RPCs.
It supports various transports over which it speaks binrpc:
Unix datagram sockets, Unix stream sockets, UDP and TCP.
It also supports a backward compatible FIFO interface (using the old
- ser FIFO protocol).
+ &kamailio; FIFO protocol).
</para>
<para>
- By default (if no parameters are changed from the config file) it uses
+ By default (if no parameters are changed in the config file) it uses
a Unix stream socket under /tmp: /tmp/&ctlsocket;. This socket is also the
default for &sercmd;.
</para>
<para>
- In general it's used in conjunction with &sercmd;. &sercmd; it's a unix
- tool for invoking ser/sip-router rpcs. It can be used both in
+ In general it's used in conjunction with &sercmd;. &sercmd; is a Unix
+ tool for invoking &kamailio; RPC functions. It can be used both in
interactive mode (supports tab-completion and history) or command
line mode.
<example>
@@ -83,8 +83,8 @@ $ &sercmd; ps
</para>
</section>
- <xi:include href="params.xml"/>
- <xi:include href="rpc.xml"/>
+ <xi:include href="ctl_params.xml"/>
+ <xi:include href="ctl_rpc.xml"/>
-</section>
+</book>
diff --git a/modules/ctl/doc/params.xml b/modules/ctl/doc/ctl_params.xml
similarity index 100%
rename from modules/ctl/doc/params.xml
rename to modules/ctl/doc/ctl_params.xml
diff --git a/modules/ctl/doc/rpc.xml b/modules/ctl/doc/ctl_rpc.xml
similarity index 100%
rename from modules/ctl/doc/rpc.xml
rename to modules/ctl/doc/ctl_rpc.xml
Module: sip-router
Branch: master
Commit: 8b967b4b96765057bb0b8f62ee1dd5b04442b52d
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8b967b4…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: Thu Dec 20 08:41:00 2012 +0100
counters Updating documentation to "book" from "section"
Renaming files to avoid collission when aggregating documentation.
---
modules/counters/README | 81 +++++++++++---------
modules/counters/doc/counters.xml | 16 ++--
.../doc/{functions.xml => counters_functions.xml} | 0
.../doc/{params.xml => counters_params.xml} | 0
modules/counters/doc/{rpc.xml => counters_rpc.xml} | 0
5 files changed, 52 insertions(+), 45 deletions(-)
diff --git a/modules/counters/README b/modules/counters/README
index 8b3b32c..6a25a45 100644
--- a/modules/counters/README
+++ b/modules/counters/README
@@ -1,4 +1,4 @@
-1. Counters Module
+Counters Module
Andrei Pelinescu-Onciul
@@ -7,35 +7,31 @@ Andrei Pelinescu-Onciul
Copyright � 2010 iptelorg GmbH
__________________________________________________________________
- 1.1. Overview
- 1.2. Parameters
+ List of Examples
- 1.2.1. script_counter
- 1.2.2. script_cnt_grp_name
+ 1. Create a new script_counter
+ 2. Set script_cnt_grp_name in the config file
+ 3. cnt_inc usage
+ 4. cnt_add usage
+ 5. cnt_reset usage
+ 6. cnt.get grp counter_name usage
+ 7. cnt.reset grp name usage
+ 8. cnt.grps_list usage
+ 9. cnt.var_list group usage
+ 10. cnt.var_list group usage
+ 11. cnt.help grp name usage
- 1.3. Functions
-
- 1.3.1. cnt_inc([group.]name)
- 1.3.2. cnt_add([group.]name, number)
- 1.3.3. cnt_reset([group.]name)
-
- 1.4. counters RPC Functions
-
- 1.4.1. cnt.get group counter_name
- 1.4.2. cnt.reset group counter_name
- 1.4.3. cnt.grps_list
- 1.4.4. cnt.var_list group
- 1.4.5. cnt.grp_get_all
- 1.4.6. cnt.help group counter_name
-
-1.1. Overview
+1. Overview
This module exports counters/statistics manipulating script functions
and RPCs.
-1.2. Parameters
+2. Parameters
-1.2.1. script_counter
+ 2.1. script_counter
+ 2.2. script_cnt_grp_name
+
+2.1. script_counter
Define a new counter that can be used from the script. The declaration
might include a group in front of the counter name, separated with '.'.
@@ -46,25 +42,29 @@ Andrei Pelinescu-Onciul
is "custom script counter". The format of the declaration is:
[group.]name[( |:)description].
- Example 1. Create a new script_counter
+ Example 1. Create a new script_counter
modparam("counters", "script_counter", "foo") # script.foo
modparam("counters", "script_counter", "test.bar") # test.bar
modparam("counters", "script_counter", "baz example counter") # script.baz
modparam("counters", "script_counter", "test.x:another example") # test.x
-1.2.2. script_cnt_grp_name
+2.2. script_cnt_grp_name
Group name that will be used for the counters defined via the
script_counter module parameter which do not have a specified group.
Default: "script".
- Example 2. Set script_cnt_grp_name in the config file
+ Example 2. Set script_cnt_grp_name in the config file
modparam("counters", "script_cnt_grp_name", "my_counters")
-1.3. Functions
+3. Functions
+
+ 3.1. cnt_inc([group.]name)
+ 3.2. cnt_add([group.]name, number)
+ 3.3. cnt_reset([group.]name)
-1.3.1. cnt_inc([group.]name)
+3.1. cnt_inc([group.]name)
Increments the counter group.name. The counter must be defined using
the script_counter module parameter. If the group name is missing, the
@@ -82,7 +82,7 @@ route {
...
}
-1.3.2. cnt_add([group.]name, number)
+3.2. cnt_add([group.]name, number)
Adds number the counter group.name. The counter must be defined using
the script_counter module parameter. If the group name is missing, the
@@ -97,7 +97,7 @@ route {
...
}
-1.3.3. cnt_reset([group.]name)
+3.3. cnt_reset([group.]name)
Resets the counter group.name. The counter must be defined using the
script_counter module parameter. If the group name is missing, the
@@ -113,30 +113,37 @@ route {
...
}
-1.4. counters RPC Functions
+4. counters RPC Functions
+
+ 4.1. cnt.get group counter_name
+ 4.2. cnt.reset group counter_name
+ 4.3. cnt.grps_list
+ 4.4. cnt.var_list group
+ 4.5. cnt.grp_get_all
+ 4.6. cnt.help group counter_name
-1.4.1. cnt.get group counter_name
+4.1. cnt.get group counter_name
Get the value of the counter identified by group.counter_name.
Example 6. cnt.get grp counter_name usage
$ sercmd cnt.get script foo
-1.4.2. cnt.reset group counter_name
+4.2. cnt.reset group counter_name
Resets the counter identified by group.counter_name.
Example 7. cnt.reset grp name usage
$ sercmd cnt.reset script foo
-1.4.3. cnt.grps_list
+4.3. cnt.grps_list
Lists all the declared counter groups.
Example 8. cnt.grps_list usage
$ sercmd cnt.grps_list
-1.4.4. cnt.var_list group
+4.4. cnt.var_list group
Lists all the names of all the counters belonging to the specified
group.
@@ -144,14 +151,14 @@ route {
Example 9. cnt.var_list group usage
$ sercmd cnt.var_list script
-1.4.5. cnt.grp_get_all
+4.5. cnt.grp_get_all
Lists all the counter names and their values in the specified group.
Example 10. cnt.var_list group usage
$ sercmd cnt.grp_get_all script
-1.4.6. cnt.help group counter_name
+4.6. cnt.help group counter_name
Displays the counter description.
diff --git a/modules/counters/doc/counters.xml b/modules/counters/doc/counters.xml
index dd9bae3..ca84a63 100644
--- a/modules/counters/doc/counters.xml
+++ b/modules/counters/doc/counters.xml
@@ -9,8 +9,9 @@
]
>
-<section id="counters" xmlns:xi="http://www.w3.org/2001/XInclude">
- <sectioninfo>
+<book id="counters" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <bookinfo>
+ <title>Counters Module</title>
<authorgroup>
<author>
<firstname>Andrei</firstname>
@@ -25,9 +26,8 @@
<year>2010</year>
<holder>iptelorg GmbH</holder>
</copyright>
- </sectioninfo>
+ </bookinfo>
- <title>Counters Module</title>
<section id="cnts.overview">
<title>Overview</title>
@@ -37,9 +37,9 @@
</para>
</section>
- <xi:include href="params.xml"/>
- <xi:include href="functions.xml"/>
- <xi:include href="rpc.xml"/>
+ <xi:include href="counters_params.xml"/>
+ <xi:include href="counters_functions.xml"/>
+ <xi:include href="counters_rpc.xml"/>
-</section>
+</book>
diff --git a/modules/counters/doc/functions.xml b/modules/counters/doc/counters_functions.xml
similarity index 100%
rename from modules/counters/doc/functions.xml
rename to modules/counters/doc/counters_functions.xml
diff --git a/modules/counters/doc/params.xml b/modules/counters/doc/counters_params.xml
similarity index 100%
rename from modules/counters/doc/params.xml
rename to modules/counters/doc/counters_params.xml
diff --git a/modules/counters/doc/rpc.xml b/modules/counters/doc/counters_rpc.xml
similarity index 100%
rename from modules/counters/doc/rpc.xml
rename to modules/counters/doc/counters_rpc.xml