Module: sip-router
Branch: master
Commit: 0f4c425c133dbec19386e73be43bdccdbc77f256
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0f4c425…
Author: Henning Westerholt <henning.westerholt(a)1und1.de>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Thu Oct 8 14:50:31 2009 +0200
pdb(sr): add missing doc Makefile, fix include for pdb_admin.xml, regenerate docs
---
modules/pdb/README | 143 +++++++++++++++++++++++++----------------
modules/pdb/doc/Makefile | 4 +
modules/pdb/doc/pdb_admin.xml | 9 +++
3 files changed, 101 insertions(+), 55 deletions(-)
diff --git a/modules/pdb/README b/modules/pdb/README
index 47e7f8a..af034bf 100644
--- a/modules/pdb/README
+++ b/modules/pdb/README
@@ -11,36 +11,36 @@ Henning Westerholt
1&1 Internet AG
<henning.westerholt(a)1und1.de>
- Copyright 2009 1&1 Internet AG
+ Copyright � 2009 1&1 Internet AG
Revision History
- Revision $Revision: 4863 $ $Date: 2008-09-05 13:11:33 +0200
- (Fri, 05 Sep 2008) $
- __________________________________________________________
+ Revision $Revision: 4863 $ $Date: 2008-09-05 13:11:33 +0200 (Fri, 05
+ Sep 2008) $
+ __________________________________________________________________
Table of Contents
1. Admin Guide
- 1.1. Overview
- 1.2. Dependencies
+ 1. Overview
+ 2. Dependencies
- 1.2.1. Kamailio Modules
- 1.2.2. External Libraries or Applications
+ 2.1. Kamailio Modules
+ 2.2. External Libraries or Applications
- 1.3. Exported Parameters
+ 3. Exported Parameters
- 1.3.1. timeout (integer)
- 1.3.2. server (string)
+ 3.1. timeout (integer)
+ 3.2. server (string)
- 1.4. Exported Functions
+ 4. Exported Functions
- 1.4.1. pdb_query (string query, string dstavp)
+ 4.1. pdb_query (string query, string dstavp)
- 1.5. MI Commands
+ 5. MI Commands
- 1.5.1. pdb_status
- 1.5.2. pdb_activate
- 1.5.3. pdb_deactivate
+ 5.1. pdb_status
+ 5.2. pdb_activate
+ 5.3. pdb_deactivate
List of Examples
@@ -53,31 +53,60 @@ Henning Westerholt
Chapter 1. Admin Guide
-1.1. Overview
+ Table of Contents
+
+ 1. Overview
+ 2. Dependencies
+
+ 2.1. Kamailio Modules
+ 2.2. External Libraries or Applications
+
+ 3. Exported Parameters
+
+ 3.1. timeout (integer)
+ 3.2. server (string)
+
+ 4. Exported Functions
+
+ 4.1. pdb_query (string query, string dstavp)
- The pdb module allows Kamailio to send queries to a list of
- servers and store the answer in an AVP. The idea is to ask all
- servers in parallel and use the first answer, that comes back.
- A timeout for the query can be defined in milliseconds. The
- queying can be activated and deactivated using FIFO commands.
+ 5. MI Commands
-1.2. Dependencies
+ 5.1. pdb_status
+ 5.2. pdb_activate
+ 5.3. pdb_deactivate
-1.2.1. Kamailio Modules
+1. Overview
- The module depends on the following modules (in the other words
- the listed modules must be loaded before this module):
+ The pdb module allows Kamailio to send queries to a list of servers and
+ store the answer in an AVP. The idea is to ask all servers in parallel
+ and use the first answer, that comes back. A timeout for the query can
+ be defined in milliseconds. The queying can be activated and
+ deactivated using FIFO commands.
+
+2. Dependencies
+
+ 2.1. Kamailio Modules
+ 2.2. External Libraries or Applications
+
+2.1. Kamailio Modules
+
+ The module depends on the following modules (in the other words the
+ listed modules must be loaded before this module):
* none
-1.2.2. External Libraries or Applications
+2.2. External Libraries or Applications
- The following libraries or applications must be installed
- before running Kamailio with this module loaded:
+ The following libraries or applications must be installed before
+ running Kamailio with this module loaded:
* none
-1.3. Exported Parameters
+3. Exported Parameters
-1.3.1. timeout (integer)
+ 3.1. timeout (integer)
+ 3.2. server (string)
+
+3.1. timeout (integer)
This is the timeout in milliseconds for the pdb_query function.
@@ -88,28 +117,29 @@ Chapter 1. Admin Guide
modparam("pdb", "timeout", 10)
...
-1.3.2. server (string)
+3.2. server (string)
- This is the list of servers to be used by the pdb_query
- function. Queries will be sent in parallel to all servers
- configured in this list. This parameter is mandatory.
+ This is the list of servers to be used by the pdb_query function.
+ Queries will be sent in parallel to all servers configured in this
+ list. This parameter is mandatory.
Example 1.2. Set server parameter
...
-modparam("pdb", "server",
"localhost:10001,host.name:10001,192.168.1.
-7:10002")
+modparam("pdb", "server",
"localhost:10001,host.name:10001,192.168.1.7:10002")
...
-1.4. Exported Functions
+4. Exported Functions
+
+ 4.1. pdb_query (string query, string dstavp)
-1.4.1. pdb_query (string query, string dstavp)
+4.1. pdb_query (string query, string dstavp)
- Sends the query string to all configured servers and stores the
- answer in dstavp. If it takes more than the configured timeout,
- false is returned. Pseudo-variables or AVPs can be used for the
- query string. The answer must consist of the null terminated
- query string followed by a two byte integer value in network
- byte order. The integer value will be stored in the given AVP.
+ Sends the query string to all configured servers and stores the answer
+ in dstavp. If it takes more than the configured timeout, false is
+ returned. Pseudo-variables or AVPs can be used for the query string.
+ The answer must consist of the null terminated query string followed by
+ a two byte integer value in network byte order. The integer value will
+ be stored in the given AVP.
Example 1.3. pdb_query usage
...
@@ -120,9 +150,13 @@ if (!pdb_query("$rU", "$avp(i:82)"))
cr_route("$avp(i:82)", "$rd", "$rU", "$rU",
"call_id");
...
-1.5. MI Commands
+5. MI Commands
+
+ 5.1. pdb_status
+ 5.2. pdb_activate
+ 5.3. pdb_deactivate
-1.5.1. pdb_status
+5.1. pdb_status
Prints the status of the module. This can either be "active" or
"deactivated".
@@ -132,21 +166,20 @@ cr_route("$avp(i:82)", "$rd", "$rU",
"$rU", "call_id");
kamctl fifo pdb_status
...
-1.5.2. pdb_activate
+5.2. pdb_activate
- Activates the module. This is the default after loading the
- module.
+ Activates the module. This is the default after loading the module.
Example 1.5. pdb_activate usage
...
kamctl fifo pdb_activate
...
-1.5.3. pdb_deactivate
+5.3. pdb_deactivate
- Deactivates the module. No more queries are performed until it
- is activated again. As long as the module is deactivated, the
- pdb_query function will return -1.
+ Deactivates the module. No more queries are performed until it is
+ activated again. As long as the module is deactivated, the pdb_query
+ function will return -1.
Example 1.6. pdb_deactivate usage
...
diff --git a/modules/pdb/doc/Makefile b/modules/pdb/doc/Makefile
new file mode 100644
index 0000000..7a0d755
--- /dev/null
+++ b/modules/pdb/doc/Makefile
@@ -0,0 +1,4 @@
+docs = pdb.xml
+
+docbook_dir = ../../../docbook
+include $(docbook_dir)/Makefile.module
diff --git a/modules/pdb/doc/pdb_admin.xml b/modules/pdb/doc/pdb_admin.xml
index 468fda4..7076328 100644
--- a/modules/pdb/doc/pdb_admin.xml
+++ b/modules/pdb/doc/pdb_admin.xml
@@ -1,3 +1,12 @@
+<?xml version="1.0" encoding='ISO-8859-1'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+
+<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
+%docentities;
+
+]>
+
<chapter>
<title>&adminguide;</title>