Module: sip-router
Branch: master
Commit: 928dab69601e1bb56e3abbc81a1ed55d77e8b298
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=928dab6…
Author: Ovidiu Sas <osas(a)voipembedded.com>
Committer: Ovidiu Sas <osas(a)voipembedded.com>
Date: Mon Dec 17 15:06:49 2012 -0500
modules/db_flatstore: replace mi command flat_rotate with rpc command flatstore.k_rotate
---
modules/db_flatstore/Makefile | 2 +-
modules/db_flatstore/km_flat_mi.c | 41 -------------------------------
modules/db_flatstore/km_flat_mi.h | 35 --------------------------
modules/db_flatstore/km_flatstore_mod.c | 35 ++++++++++++++++----------
4 files changed, 23 insertions(+), 90 deletions(-)
diff --git a/modules/db_flatstore/Makefile b/modules/db_flatstore/Makefile
index 5b063bc..6b008b2 100644
--- a/modules/db_flatstore/Makefile
+++ b/modules/db_flatstore/Makefile
@@ -10,6 +10,6 @@ LIBS=
DEFS += -DSER_MOD_INTERFACE
SERLIBPATH=../../lib
-SER_LIBS=$(SERLIBPATH)/srdb2/srdb2 $(SERLIBPATH)/srdb1/srdb1 $(SERLIBPATH)/kmi/kmi
+SER_LIBS=$(SERLIBPATH)/srdb2/srdb2 $(SERLIBPATH)/srdb1/srdb1
include ../../Makefile.modules
diff --git a/modules/db_flatstore/km_flat_mi.c b/modules/db_flatstore/km_flat_mi.c
deleted file mode 100644
index 2200148..0000000
--- a/modules/db_flatstore/km_flat_mi.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * $Id$
- *
- * Flatstore module MI interface
- *
- * Copyright (C) 2006 Voice Sistem SRL
- *
- * This file is part of Kamailio, a free SIP server.
- *
- * Kamailio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version
- *
- * Kamailio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "flatstore_mod.h"
-#include "km_flatstore_mod.h"
-#include "km_flat_mi.h"
-
-
-struct mi_root* mi_flat_rotate_cmd(struct mi_root* cmd_tree, void* param)
-{
- struct mi_root *rpl_tree;
-
- rpl_tree = init_mi_tree( 200, MI_OK_S, MI_OK_LEN);
- if(rpl_tree == NULL)
- return rpl_tree;
-
- *km_flat_rotate = time(0);
-
- return rpl_tree;
-}
diff --git a/modules/db_flatstore/km_flat_mi.h b/modules/db_flatstore/km_flat_mi.h
deleted file mode 100644
index 6dbfc33..0000000
--- a/modules/db_flatstore/km_flat_mi.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * $Id$
- *
- * Flatstore module MI interface
- *
- * Copyright (C) 2006 Voice Sistem RL
- *
- * This file is part of Kamailio, a free SIP server.
- *
- * Kamailio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version
- *
- * Kamailio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef _KM_FLAT_MI_H_
-#define _KM_FLAT_MI_H_
-
-#include "../../lib/kmi/mi.h"
-
-#define MI_FLAT_ROTATE "flat_rotate"
-
-struct mi_root* mi_flat_rotate_cmd(struct mi_root* cmd, void* param);
-
-#endif /* _KM_FLAT_MI_H_ */
-
diff --git a/modules/db_flatstore/km_flatstore_mod.c b/modules/db_flatstore/km_flatstore_mod.c
index 5f377a0..41b6775 100644
--- a/modules/db_flatstore/km_flatstore_mod.c
+++ b/modules/db_flatstore/km_flatstore_mod.c
@@ -30,8 +30,8 @@
#include "../../sr_module.h"
#include "../../mem/shm_mem.h"
#include "../../lib/srdb1/db.h"
+#include "../../rpc_lookup.h"
#include "km_flatstore.h"
-#include "km_flat_mi.h"
#include "km_flatstore_mod.h"
#include "flatstore_mod.h"
@@ -74,14 +74,7 @@ static param_export_t params[] = {
{0, 0, 0}
};
-
-/*
- * Exported parameters
- */
-static mi_export_t mi_cmds[] = {
- { MI_FLAT_ROTATE, mi_flat_rotate_cmd, MI_NO_INPUT_FLAG, 0, 0 },
- { 0, 0, 0, 0, 0}
-};
+static rpc_export_t k_rpc_methods[];
struct kam_module_exports km_exports = {
"db_flatstore",
@@ -89,7 +82,7 @@ struct kam_module_exports km_exports = {
cmds,
params, /* module parameters */
0, /* exported statistics */
- mi_cmds, /* exported MI functions */
+ NULL, /* exported MI functions */
0, /* exported pseudo-variables */
0, /* extra processes */
km_mod_init, /* module initialization function */
@@ -101,9 +94,8 @@ struct kam_module_exports km_exports = {
int km_mod_init(void)
{
- if(register_mi_mod(km_exports.name, mi_cmds)!=0)
- {
- LM_ERR("failed to register MI commands\n");
+ if (rpc_register_array(k_rpc_methods)!=0) {
+ LM_ERR("failed to register RPC commands\n");
return -1;
}
@@ -156,3 +148,20 @@ int db_flat_bind_api(db_func_t *dbb)
return 0;
}
+/* rpc function documentation */
+static const char *rpc_k_rotate_doc[2] = {
+ "Close and reopen flatrotate files during log rotation.", 0
+};
+
+/* rpc function implementations */
+static void rpc_k_rotate(rpc_t *rpc, void *c)
+{
+ *km_flat_rotate = time(0);
+ return;
+}
+
+static rpc_export_t k_rpc_methods[] = {
+ {"flatstore.k_rotate", rpc_k_rotate, rpc_k_rotate_doc, 0},
+ {0, 0, 0, 0},
+};
+
Module: sip-router
Branch: master
Commit: 53b6903007caf13ea9543be6c545a4d9cd6d437f
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=53b6903…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: Mon Dec 17 21:10:48 2012 +0100
blst Update docbook XML to "book" from "section"
Trying to standardize the documentation into one format
---
modules/blst/README | 39 ++++++++++++++++++---------------------
modules/blst/doc/blst.xml | 10 +++++-----
2 files changed, 23 insertions(+), 26 deletions(-)
diff --git a/modules/blst/README b/modules/blst/README
index 06923b6..c84f9aa 100644
--- a/modules/blst/README
+++ b/modules/blst/README
@@ -1,4 +1,4 @@
-1. Blst Module
+Blst Module
Andrei Pelinescu-Onciul
@@ -7,25 +7,22 @@ Andrei Pelinescu-Onciul
Copyright � 2007 iptelorg GmbH
__________________________________________________________________
- 1.1. Overview
- 1.2. Functions
+ List of Examples
- 1.2.1. blst_add([timeout])
- 1.2.2. blst_add_retry_after(min, max)
- 1.2.3. blst_del()
- 1.2.4. blst_is_blacklisted()
- 1.2.5. blst_set_ignore([flags])
- 1.2.6. blst_rpl_set_ignore([flags])
- 1.2.7. blst_clear_ignore([flags])
- 1.2.8. blst_rpl_clear_ignore([flags])
+ 1. blst_add usage
+ 2. blst_add_retry_after usage
+ 3. blst_del usage
+ 4. blst_is_blacklisted usage
+ 5. blst_set_ignore usage
+ 6. blst_clear_ignore usage
-1.1. Overview
+1. Overview
This module exports blacklist related functions to the script.
-1.2. Functions
+2. Functions
-1.2.1. blst_add([timeout])
+2.1. blst_add([timeout])
Adds the source of the current message to the blacklist for timeout
seconds. If timeout is missing or 0 it uses the default blacklist
@@ -39,7 +36,7 @@ else
blst_add(); # use default blacklist timeout
...
-1.2.2. blst_add_retry_after(min, max)
+2.2. blst_add_retry_after(min, max)
Adds the source of the current message to the blacklist for the time
interval specified in the Retry-After header. If the Retry-After header
@@ -57,7 +54,7 @@ if (msg_status==503){ # blacklist 503 source for Retry-After seconds
}
...
-1.2.3. blst_del()
+2.3. blst_del()
Removes the source of the current message from the blacklist. If the
address is not present in the blacklist at the time of the call it
@@ -68,7 +65,7 @@ if (msg_status==503){ # blacklist 503 source for Retry-After seconds
blst_del();
...
-1.2.4. blst_is_blacklisted()
+2.4. blst_is_blacklisted()
Returns true if the source of the current message is blacklisted.
@@ -80,7 +77,7 @@ if (msg_status==503){ # blacklist 503 source for Retry-After seconds
}
...
-1.2.5. blst_set_ignore([flags])
+2.5. blst_set_ignore([flags])
Set errors that will not be taken into account when deciding whether to
blacklist a destination for the current message or a local reply to the
@@ -111,11 +108,11 @@ Note
Example 5. blst_set_ignore usage
blst_set_ignore(6); # ignore send and connect errors
-1.2.6. blst_rpl_set_ignore([flags])
+2.6. blst_rpl_set_ignore([flags])
See function blst_set_ignore([flags]).
-1.2.7. blst_clear_ignore([flags])
+2.7. blst_clear_ignore([flags])
Clears blacklist ignore flags previously set by the corresponding
blst_set_ignore(...) or blst_rpl_set_ignore(...) functions.
@@ -125,6 +122,6 @@ Note
Example 6. blst_clear_ignore usage
blst_clear_ignore(4); # ignore connect errors
-1.2.8. blst_rpl_clear_ignore([flags])
+2.8. blst_rpl_clear_ignore([flags])
See function blst_clear_ignore([flags]).
diff --git a/modules/blst/doc/blst.xml b/modules/blst/doc/blst.xml
index a912cae..c11e0ec 100644
--- a/modules/blst/doc/blst.xml
+++ b/modules/blst/doc/blst.xml
@@ -2,8 +2,9 @@
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<section id="blst" xmlns:xi="http://www.w3.org/2001/XInclude">
- <sectioninfo>
+<book id="blst" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <bookinfo>
+ <title>Blst Module</title>
<authorgroup>
<author>
<firstname>Andrei</firstname>
@@ -18,9 +19,8 @@
<year>2007</year>
<holder>iptelorg GmbH</holder>
</copyright>
- </sectioninfo>
+ </bookinfo>
- <title>Blst Module</title>
<section id="blst.overview">
<title>Overview</title>
@@ -31,5 +31,5 @@
<xi:include href="functions.xml"/>
-</section>
+</book>
Module: sip-router
Branch: master
Commit: 1e0ee74dae6da3a962f46f8d3305368c0754d56d
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1e0ee74…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: Mon Dec 17 20:56:25 2012 +0100
auth_identity Moving to "book"
---
modules/auth_identity/README | 121 +++++++++-----------------
modules/auth_identity/doc/auth_identity.xml | 9 +-
2 files changed, 47 insertions(+), 83 deletions(-)
diff --git a/modules/auth_identity/README b/modules/auth_identity/README
index 6502427..154a40e 100644
--- a/modules/auth_identity/README
+++ b/modules/auth_identity/README
@@ -1,4 +1,4 @@
-1. SIP Authenticated Identity Module
+The Auth_identity module
Gergely Kovacs
@@ -7,56 +7,19 @@ Gergely Kovacs
Copyright � 2007 Iptel.org
__________________________________________________________________
- 1.1. Overview
- 1.2. Dependencies
- 1.3. Compilation
- 1.4. Installation And Running
- 1.5. Parameters
+ List of Examples
- 1.5.1. privatekey_path (string)
- 1.5.2. certificate_path (string)
- 1.5.3. certificate_url (string)
- 1.5.4. msg_timeout (integer)
- 1.5.5. auth_validity_time (integer)
- 1.5.6. callid_cache_limit (integer)
- 1.5.7. certificate_cache_limit (integer)
- 1.5.8. cainfo_path (string)
- 1.5.9. accept_pem_certs ([0|1])
+ 1. Set privatekey_path parameter
+ 2. Set certificate_path parameter
+ 3. Set certificate_url parameter
+ 4. Set msg_timeout parameter
+ 5. Set auth_validity_time parameter
+ 6. Set auth_validity_time parameter
+ 7. Set certificate_cache_limit parameter
+ 8. Set cainfo_path parameter
+ 9. Set accept_pem_certs parameter
- 1.6. Functions
-
- 1.6.1. auth_date_proc()
-
- 1.6.1.1. Dependencies
-
- 1.6.2. auth_add_identity()
-
- 1.6.2.1. Dependencies
-
- 1.6.3. vrfy_check_date()
-
- 1.6.3.1. Dependencies
-
- 1.6.4. vrfy_get_certificate()
-
- 1.6.4.1. Dependencies
-
- 1.6.5. vrfy_check_certificate()
-
- 1.6.5.1. Dependencies
-
- 1.6.6. vrfy_check_msgvalidity()
-
- 1.6.6.1. Dependencies
-
- 1.6.7. vrfy_check_callid()
-
- 1.6.7.1. Dependencies
-
- 1.7. Authorizer service examples
- 1.8. Verifier service examples
-
-1.1. Overview
+1. Overview
Auth Identity module provides functionalities for securely identifying
originators of SIP messages. This module has two basic service:
@@ -70,11 +33,11 @@ Gergely Kovacs
* verifier does not support the subjectAltName extension of
certificates
-1.2. Dependencies
+2. Dependencies
This module does not depend any other module.
-1.3. Compilation
+3. Compilation
This module needs the following headers and libraries:
* OpenSSL (version 0.9.8 or higher) for cryptographic functions
@@ -83,7 +46,7 @@ Gergely Kovacs
If you'd like to use TLS module too then use the corresponding LIB line
in auth_identity's Makefile
-1.4. Installation And Running
+4. Installation And Running
the Authorizer service needs to make the public key, which conveyed in
a certificate, available over HTTPS or HTTP for verifiers. The domain
@@ -91,9 +54,9 @@ Gergely Kovacs
certificate must be the same. This service needs access to the private
key too.
-1.5. Parameters
+5. Parameters
-1.5.1. privatekey_path (string)
+5.1. privatekey_path (string)
Note: this parameter is for authorizer service.
@@ -107,7 +70,7 @@ Gergely Kovacs
modparam("auth_identity","privatekey_path","/etc/ssl/private/key.pem")
...
-1.5.2. certificate_path (string)
+5.2. certificate_path (string)
Note: this parameter is for authorizer service.
@@ -121,7 +84,7 @@ modparam("auth_identity","privatekey_path","/etc/ssl/private/key.pem")
modparam("auth_identity","certificate_path","/var/www/ssl/mycert.pem")
...
-1.5.3. certificate_url (string)
+5.3. certificate_url (string)
Note: this parameter is for authorizer service.
@@ -136,7 +99,7 @@ modparam("auth_identity","certificate_path","/var/www/ssl/mycert.pem")
modparam("auth_identity","certificate_url","https://foo.bar/mycert.der")
...
-1.5.4. msg_timeout (integer)
+5.4. msg_timeout (integer)
Note: this parameter is for authorizer service.
@@ -151,7 +114,7 @@ modparam("auth_identity","certificate_url","https://foo.bar/mycert.der")
modparam("auth_identity","msg_timeout",600)
...
-1.5.5. auth_validity_time (integer)
+5.5. auth_validity_time (integer)
Note: this parameter is for verifier service.
@@ -166,7 +129,7 @@ modparam("auth_identity","msg_timeout",600)
modparam("auth_identity","auth_validity_time",3600)
...
-1.5.6. callid_cache_limit (integer)
+5.6. callid_cache_limit (integer)
Note: this parameter is for verifier service.
@@ -183,7 +146,7 @@ modparam("auth_identity","auth_validity_time",3600)
modparam("auth_identity","callid_cache_limit",32768)
...
-1.5.7. certificate_cache_limit (integer)
+5.7. certificate_cache_limit (integer)
Note: this parameter is for verifier service.
@@ -198,7 +161,7 @@ modparam("auth_identity","callid_cache_limit",32768)
modparam("auth_identity","certificate_cache_limit",4096)
...
-1.5.8. cainfo_path (string)
+5.8. cainfo_path (string)
Note: this parameter is for verifier service.
@@ -213,7 +176,7 @@ modparam("auth_identity","certificate_cache_limit",4096)
modparam("auth_identity","cainfo_path","/etc/ssl/certs/ca-certificates.crt")
...
-1.5.9. accept_pem_certs ([0|1])
+5.9. accept_pem_certs ([0|1])
Note: this parameter is for verifier service.
@@ -226,9 +189,9 @@ modparam("auth_identity","cainfo_path","/etc/ssl/certs/ca-certificates.crt")
modparam("auth_identity","accept_pem_certs",1)
...
-1.6. Functions
+6. Functions
-1.6.1. auth_date_proc()
+6.1. auth_date_proc()
Note: this function is for authorizer service.
@@ -239,11 +202,11 @@ modparam("auth_identity","accept_pem_certs",1)
authentication service (set by certificate_path parameter) has been
expired.
-1.6.1.1. Dependencies
+6.1.1. Dependencies
No dependencies
-1.6.2. auth_add_identity()
+6.2. auth_add_identity()
Note: this function is for authorizer service.
@@ -259,22 +222,22 @@ modparam("auth_identity","accept_pem_certs",1)
Call-ID, CSeq, Date, Contact) and body after auth_add_identity()'s been
called
-1.6.2.1. Dependencies
+6.2.1. Dependencies
auth_date_proc() must be called before
-1.6.3. vrfy_check_date()
+6.3. vrfy_check_date()
Note: this function is for verifier service.
Checks Date header of the incoming message whether falls in validity
time (set by auth_validity_time parameter)
-1.6.3.1. Dependencies
+6.3.1. Dependencies
No dependencies
-1.6.4. vrfy_get_certificate()
+6.4. vrfy_get_certificate()
Note: this function is for verifier service.
@@ -283,11 +246,11 @@ modparam("auth_identity","accept_pem_certs",1)
parameter). If the required certificate is not found there then this
function downloads it.
-1.6.4.1. Dependencies
+6.4.1. Dependencies
No dependencies
-1.6.5. vrfy_check_certificate()
+6.5. vrfy_check_certificate()
Note: this function is for verifier service.
@@ -295,23 +258,23 @@ modparam("auth_identity","accept_pem_certs",1)
subject and the domain part of the URL are the same) and adds it to
certificate table.
-1.6.5.1. Dependencies
+6.5.1. Dependencies
vrfy_get_certificate() must be called before
-1.6.6. vrfy_check_msgvalidity()
+6.6. vrfy_check_msgvalidity()
Note: this function is for verifier service.
Assembles digest-string from the message, create SHA1 hash and compares
it with the decrypted value of Identity header.
-1.6.6.1. Dependencies
+6.6.1. Dependencies
vrfy_get_certificate() must be called before and
vrfy_check_certificate() should be called before
-1.6.7. vrfy_check_callid()
+6.7. vrfy_check_callid()
Note: this function is for verifier service.
@@ -321,11 +284,11 @@ modparam("auth_identity","accept_pem_certs",1)
has not been replayed then adds it to callid table (which size is set
by callid_cache_limit parameter).
-1.6.7.1. Dependencies
+6.7.1. Dependencies
This function should be called for the last time.
-1.7. Authorizer service examples
+7. Authorizer service examples
...
route[INIT]
@@ -368,7 +331,7 @@ route[OUTBOUND]
}
...
-1.8. Verifier service examples
+8. Verifier service examples
...
route[INIT]
diff --git a/modules/auth_identity/doc/auth_identity.xml b/modules/auth_identity/doc/auth_identity.xml
index b73b06b..e730afa 100644
--- a/modules/auth_identity/doc/auth_identity.xml
+++ b/modules/auth_identity/doc/auth_identity.xml
@@ -9,8 +9,9 @@
]
>
-<section id="auth_identity" xmlns:xi="http://www.w3.org/2001/XInclude">
- <sectioninfo>
+<book id="auth_identity" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <bookinfo>
+ <title>The Auth_identity module</title>
<authorgroup>
<author>
<firstname>Gergely</firstname>
@@ -25,7 +26,7 @@
<year>2007</year>
<holder>Iptel.org</holder>
</copyright>
- </sectioninfo>
+ </bookinfo>
<title>SIP Authenticated Identity Module</title>
@@ -221,4 +222,4 @@ route[VERIFY]
...
]]></programlisting>
</section>
-</section>
+</book>
Module: sip-router
Branch: master
Commit: 502675ecb60f6943ca4fa8480b057a4bfef9dc2b
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=502675e…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: Mon Dec 17 20:40:33 2012 +0100
xmlrpc: Modify docbook format to book and add title
---
modules/xmlrpc/README | 94 ++++++++++++++++++++++------------------
modules/xmlrpc/doc/xmlrpc.xml | 9 ++--
2 files changed, 57 insertions(+), 46 deletions(-)
diff --git a/modules/xmlrpc/README b/modules/xmlrpc/README
index 7c049a2..b77e4c6 100644
--- a/modules/xmlrpc/README
+++ b/modules/xmlrpc/README
@@ -1,3 +1,5 @@
+The XMLRPC Module
+
Jan Janak
iptelorg GmbH
@@ -5,33 +7,24 @@ Jan Janak
Copyright � 2005 iptelorg GmbH
__________________________________________________________________
- 1.1. Design Goals
- 1.2. Overview of Operation
- 1.3. XML-RPC Implementation
-
- 1.3.1. Requests
- 1.3.2. Replies
- 1.3.3. Type Conversion
- 1.3.4. Limitations
- 1.3.5. Interoperability Problems
-
- 1.4. Client Examples
- 1.5. Parameters
+ List of Tables
- 1.5.1. route (string)
- 1.5.2. autoconversion (string)
- 1.5.3. escape_cr (integer)
- 1.5.4. double_lf_to_crlf (integer)
- 1.5.5. mode (integer)
- 1.5.6. url_skip (str)
- 1.5.7. url_match (str)
+ 1. Data Type Conversion
- 1.6. Functions
+ List of Examples
- 1.6.1. dispatch_rpc()
- 1.6.2. xmlrpc_reply(code, reason)
+ 1.
+ 2. Set route parameter
+ 3. Set the autoconversion parameter
+ 4. Set the escape_cr parameter
+ 5. Set the double_lf_to_crlf parameter
+ 6. Set the mode parameter
+ 7. Set url_skip parameter
+ 8. Set url_match parameter
+ 9. dispatch_rpc usage
+ 10. xmlrpc_reply usage
-1.1. Design Goals
+1. Design Goals
* Implemented as a module.
* API independent of transport protocols.
@@ -42,7 +35,7 @@ Jan Janak
* Easy and straightforward implementation of management functions in
SER modules.
-1.2. Overview of Operation
+2. Overview of Operation
This module implements the XML-RPC transport and encoding interface for
ser RPCs.
@@ -283,7 +276,13 @@ if (method == "POST" || method == "GET") {
break;
};
-1.3. XML-RPC Implementation
+3. XML-RPC Implementation
+
+ 3.1. Requests
+ 3.2. Replies
+ 3.3. Type Conversion
+ 3.4. Limitations
+ 3.5. Interoperability Problems
The purpose of the functions of this module is to convert XML-RPC
document carried in the body of HTTP requests into data returned by the
@@ -298,7 +297,7 @@ if (method == "POST" || method == "GET") {
server and for each function it can return the documentation string
describing the function.
-1.3.1. Requests
+3.1. Requests
Requests processed by the module are standard XML-RPC requests encoded
in bodies of HTTP requests.
@@ -322,7 +321,7 @@ Content-Length: 112
all export RPC functions, prepare the context for the function and
execute it.
-1.3.2. Replies
+3.2. Replies
The module will always generate 200 OK. Other response codes and
classes are reserved for SER. The status code of the XML-RPC reply,
@@ -405,7 +404,7 @@ Content-Length: 276
This is probably the most common scenario.
-1.3.3. Type Conversion
+3.3. Type Conversion
The data types of the RPC API are converted to the data types of
XML-RPC and vice versa. Table 1, "Data Type Conversion" shows for each
@@ -434,7 +433,7 @@ Content-Length: 276
</member>
</struct>
-1.3.4. Limitations
+3.4. Limitations
SER xmlrpc modules does not implement all data types allowed in
XML-RPC. As well it does not implement arrays and nested structures.
@@ -443,7 +442,7 @@ Content-Length: 276
need all the bells and whistles of XML-RPC. Parsing and interpreting
nested structures is complex and we try to avoid it.
-1.3.5. Interoperability Problems
+3.5. Interoperability Problems
Due to a bug in Python xmlrpclib there is an interoperability problem
with basic clients using it: by default an xmlrpclib client expects the
@@ -484,7 +483,7 @@ route[XMLRPC]{
CRLF conversion (using the double_lf_to_crlf modules parameter) and
replace CRLF with LFLF in the client queries.
-1.4. Client Examples
+4. Client Examples
* examples/xmlrpc_test.pl (basic perl application that builds and
sends an XMLRPC request from its commandline parameters).
@@ -495,9 +494,17 @@ route[XMLRPC]{
* serweb (php application that can use the XML-RPC interface to call
ser functions).
-1.5. Parameters
+5. Parameters
+
+ 5.1. route (string)
+ 5.2. autoconversion (string)
+ 5.3. escape_cr (integer)
+ 5.4. double_lf_to_crlf (integer)
+ 5.5. mode (integer)
+ 5.6. url_skip (str)
+ 5.7. url_match (str)
-1.5.1. route (string)
+5.1. route (string)
Name of the route called for XMLRPC messages.
@@ -515,7 +522,7 @@ route[XMLRPC]{
Example 2. Set route parameter
modparam("xmlrpc", "route", "route_for_xmlrpcs")
-1.5.2. autoconversion (string)
+5.2. autoconversion (string)
Enable or disable automatic parameter type conversion globally, for all
the methods parameters. If on, a type mismatch in a method parameter
@@ -532,7 +539,7 @@ modparam("xmlrpc", "route", "route_for_xmlrpcs")
Example 3. Set the autoconversion parameter
modparam("xmlrpc", "autoconversion", 1)
-1.5.3. escape_cr (integer)
+5.3. escape_cr (integer)
Enable CR ('\r') escaping in replies. If enabled each '\r' in the
xmlrpc reply will be replaced with "
", according to the xml spec.
@@ -545,7 +552,7 @@ modparam("xmlrpc", "autoconversion", 1)
Example 4. Set the escape_cr parameter
modparam("xmlrpc", "escape_cr", 1)
-1.5.4. double_lf_to_crlf (integer)
+5.4. double_lf_to_crlf (integer)
When enabled double LFs ('\n\n') in the input xmlrpc strings will be
replaced with CR LF ('\r\n'). This makes LF LF behave like an escape
@@ -563,7 +570,7 @@ modparam("xmlrpc", "escape_cr", 1)
Example 5. Set the double_lf_to_crlf parameter
modparam("xmlrpc", "double_lf_to_crlf", 1)
-1.5.5. mode (integer)
+5.5. mode (integer)
When set to 1, xmlrpc module does not register to core the callback
functions for non-SIP messages. Useful when other module register a
@@ -575,7 +582,7 @@ modparam("xmlrpc", "double_lf_to_crlf", 1)
Example 6. Set the mode parameter
modparam("xmlrpc", "mode", 1)
-1.5.6. url_skip (str)
+5.6. url_skip (str)
Regular expression to match the HTPP URL. If there is match, then
xmlrpc route is not executed.
@@ -587,7 +594,7 @@ modparam("xmlrpc", "mode", 1)
modparam("xmlrpc", "url_skip", "^/sip")
...
-1.5.7. url_match (str)
+5.7. url_match (str)
Regular expression to match the HTTP URL. If there is no match, then
xmlrpc route is not executed. This check is done after url_skip, so if
@@ -601,9 +608,12 @@ modparam("xmlrpc", "url_skip", "^/sip")
modparam("xmlrpc", "url_match", "^/RPC2")
...
-1.6. Functions
+6. Functions
+
+ 6.1. dispatch_rpc()
+ 6.2. xmlrpc_reply(code, reason)
-1.6.1. dispatch_rpc()
+6.1. dispatch_rpc()
This function processes an XMLRPC request, found in the body of the
request.
@@ -630,7 +640,7 @@ route[XMLRPC]{
dispatch_rpc();
}
-1.6.2. xmlrpc_reply(code, reason)
+6.2. xmlrpc_reply(code, reason)
This function can be called from the config script to directly generate
an XML-RPC reply.
diff --git a/modules/xmlrpc/doc/xmlrpc.xml b/modules/xmlrpc/doc/xmlrpc.xml
index 3a0c785..67c76f8 100644
--- a/modules/xmlrpc/doc/xmlrpc.xml
+++ b/modules/xmlrpc/doc/xmlrpc.xml
@@ -2,8 +2,9 @@
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<section id="xmlrpc" xmlns:xi="http://www.w3.org/2001/XInclude">
- <sectioninfo>
+<book id="xmlrpc" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <bookinfo>
+ <title>The XMLRPC Module</title>
<authorgroup>
<author>
<firstname>Jan</firstname>
@@ -18,7 +19,7 @@
<year>2005</year>
<holder>iptelorg GmbH</holder>
</copyright>
- </sectioninfo>
+ </bookinfo>
<section id="xmlrpc.design">
@@ -758,4 +759,4 @@ route[XMLRPC]{
<xi:include href="params.xml"/>
<xi:include href="functions.xml"/>
-</section>
+</book>