[sr-dev] git:master: sanity Minor README updates
Olle E. Johansson
oej at edvina.net
Thu Dec 20 21:00:27 CET 2012
Module: sip-router
Branch: master
Commit: d36d4de28ad52763ef4e637393997bca44dc6fea
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d36d4de28ad52763ef4e637393997bca44dc6fea
Author: Olle E. Johansson <oej at edvina.net>
Committer: Olle E. Johansson <oej at edvina.net>
Date: Thu Dec 20 20:56:17 2012 +0100
sanity Minor README updates
---
modules/sanity/README | 74 ++++++++++---------
modules/sanity/doc/sanity.xml | 34 +++++----
.../doc/{functions.xml => sanity_functions.xml} | 0
.../sanity/doc/{params.xml => sanity_params.xml} | 2 +-
4 files changed, 60 insertions(+), 50 deletions(-)
diff --git a/modules/sanity/README b/modules/sanity/README
index 6956733..90e7ca3 100644
--- a/modules/sanity/README
+++ b/modules/sanity/README
@@ -1,4 +1,4 @@
-1. Sanity Module
+The Sanity Module - SIP syntax checking
Nils Ohlmeier
@@ -7,38 +7,35 @@ Nils Ohlmeier
Copyright © 2006 iptelorg GmbH
__________________________________________________________________
- 1.1. Overview
- 1.2. Dependencies
- 1.3. Parameters
+ List of Examples
- 1.3.1. default_checks (integer)
- 1.3.2. uri_checks (integer)
- 1.3.3. proxy_require (string)
- 1.3.4. autodrop (integer)
+ 1. Set default_checks parameter
+ 2. Set uri_checks parameter
+ 3. Set proxy_require parameter
+ 4. Set autodrop parameter
+ 5. sanity_check usage
+ 6. sanity_check usage with parameter
+ 7. sanity_check usage with two parameters
- 1.4. Functions
-
- 1.4.1. sanity_check([msg_checks [, uri_checks]])
-
-1.1. Overview
+1. Overview
This module aims to implement several sanity checks on incoming
requests which are suggested or even required by a RFC, but are not
- available yet in the core of SIP-router.
+ available yet in the core of Kamailio.
- These checks are not required by SIP-router itself for its
- functionality. But on the other side it makes not much sence if a
- broken request traverses through a SIP network if it is rejected sooner
- or later by a SIP device any way. As every sanity check cost extra
- performance because of additional parsing and evaluation it is with
- this module now up to the SIP-router adminstrator which checks should
- be done on which request.
+ These checks are not required by Kamailio itself for its functionality.
+ But on the other side it makes not much sence if a broken request
+ traverses through a SIP network if it is rejected sooner or later by a
+ SIP device any way. As every sanity check cost extra performance
+ because of additional parsing and evaluation it is with this module now
+ up to the Kamailio adminstrator which checks should be done on which
+ request.
The following checks are available:
* ruri sip version - (1) - checks if the SIP version in the request
URI is supported, currently only 2.0.
* ruri scheme - (2) - checks if the URI scheme of the request URI is
- supported (sip[s]|tel[s]) by SIP-router.
+ supported (sip[s]|tel[s]) by Kamailio
* required headers - (4) -checks if the minimum set of required
headers to, from, cseq, callid and via is present in the request.
* via sip version - (8) - not working because parser fails already
@@ -57,19 +54,24 @@ Nils Ohlmeier
header are present in the list of the extensions from the module
parameter proxy_require.
* parse uri's - (1024) - checks if the specified URIs are present and
- parseable by the SIP-router parsers
+ parseable by the Kamailio parsers
* digest credentials (2048) Check all instances of digest credentials
in a message. The test checks whether there are all required digest
parameters and have meaningful values.
-1.2. Dependencies
+2. Dependencies
The following modules must be loaded before this module:
* sl - Stateless replies.
-1.3. Parameters
+3. Parameters
-1.3.1. default_checks (integer)
+ 3.1. default_checks (integer)
+ 3.2. uri_checks (integer)
+ 3.3. proxy_require (string)
+ 3.4. autodrop (integer)
+
+3.1. default_checks (integer)
This parameter determines which of the checks from the sanity module
are executed if no parameter was given to the sanity_check function
@@ -87,7 +89,7 @@ Nils Ohlmeier
modparam("sanity", "default_checks", 1)
...
-1.3.2. uri_checks (integer)
+3.2. uri_checks (integer)
This parameter determines which URIs are going to be checked if the
'parse uri' will be executed.
@@ -100,19 +102,19 @@ modparam("sanity", "default_checks", 1)
modparam("sanity", "uri_checks", 3)
...
-1.3.3. proxy_require (string)
+3.3. proxy_require (string)
- This parameter sets the list of supported extensions for this
- SIP-router. The value is expected as a comma separated list of
- extensions. This list is separated into single tokens. Each token from
- a proxy require header will be compared to the tokens from this list.
+ This parameter sets the list of supported extensions for this Kamailio.
+ The value is expected as a comma separated list of extensions. This
+ list is separated into single tokens. Each token from a proxy require
+ header will be compared to the tokens from this list.
Example 3. Set proxy_require parameter
...
modparam("sanity", "proxy_require", "foo, bar")
...
-1.3.4. autodrop (integer)
+3.4. autodrop (integer)
This parameter controls whether the module drops automatically or not
the SIP message if the sanity checks fail. Default value is 1 (auto
@@ -126,9 +128,11 @@ modparam("sanity", "proxy_require", "foo, bar")
modparam("sanity", "autodrop", 1)
...
-1.4. Functions
+4. Functions
+
+ 4.1. sanity_check([msg_checks [, uri_checks]])
-1.4.1. sanity_check([msg_checks [, uri_checks]])
+4.1. sanity_check([msg_checks [, uri_checks]])
This function makes a row of sanity checks over the given SIP request.
The behavior of the function is also controlled by 'autodrop'
diff --git a/modules/sanity/doc/sanity.xml b/modules/sanity/doc/sanity.xml
index 56127b5..8ba8e32 100644
--- a/modules/sanity/doc/sanity.xml
+++ b/modules/sanity/doc/sanity.xml
@@ -1,9 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
-<section id="options" xmlns:xi="http://www.w3.org/2001/XInclude">
- <sectioninfo>
+<!-- Include general documentation entities -->
+<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
+%docentities;
+
+]>
+
+<book id="options" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <bookinfo>
+ <title>The Sanity Module - SIP syntax checking</title>
<authorgroup>
<author>
<firstname>Nils</firstname>
@@ -18,24 +25,23 @@
<year>2006</year>
<holder>iptelorg GmbH</holder>
</copyright>
- </sectioninfo>
+ </bookinfo>
- <title>Sanity Module</title>
<section id="sanity.overview">
<title>Overview</title>
<para>
This module aims to implement several sanity checks on incoming
requests which are suggested or even required by a RFC, but are
- not available yet in the core of SIP-router.
+ not available yet in the core of &kamailio;.
</para>
<para>
- These checks are not required by SIP-router itself for its functionality.
+ These checks are not required by &kamailio; itself for its functionality.
But on the other side it makes not much sence if a broken
request traverses through a SIP network if it is rejected sooner
or later by a SIP device any way. As every sanity check cost extra
performance because of additional parsing and evaluation it
- is with this module now up to the SIP-router adminstrator which checks
+ is with this module now up to the &kamailio; adminstrator which checks
should be done on which request.
</para>
<para>
@@ -50,7 +56,7 @@
<listitem>
<para>
ruri scheme - (2) - checks if the URI scheme of the request URI is
- supported (sip[s]|tel[s]) by SIP-router.
+ supported (sip[s]|tel[s]) by &kamailio;
</para>
</listitem>
<listitem>
@@ -105,7 +111,7 @@
<listitem>
<para>
parse uri's - (1024) - checks if the specified URIs are present and
- parseable by the SIP-router parsers
+ parseable by the &kamailio; parsers
</para>
</listitem>
<listitem>
@@ -133,6 +139,6 @@
</para>
</section>
- <xi:include href="params.xml"/>
- <xi:include href="functions.xml"/>
-</section>
+ <xi:include href="sanity_params.xml"/>
+ <xi:include href="sanity_functions.xml"/>
+</book>
diff --git a/modules/sanity/doc/functions.xml b/modules/sanity/doc/sanity_functions.xml
similarity index 100%
rename from modules/sanity/doc/functions.xml
rename to modules/sanity/doc/sanity_functions.xml
diff --git a/modules/sanity/doc/params.xml b/modules/sanity/doc/sanity_params.xml
similarity index 99%
rename from modules/sanity/doc/params.xml
rename to modules/sanity/doc/sanity_params.xml
index 037b6f9..7e2d961 100644
--- a/modules/sanity/doc/params.xml
+++ b/modules/sanity/doc/sanity_params.xml
@@ -62,7 +62,7 @@ modparam("sanity", "uri_checks", 3)
<section id="proxy_require">
<title><varname>proxy_require</varname> (string)</title>
<para>
- This parameter sets the list of supported extensions for this SIP-router.
+ This parameter sets the list of supported extensions for this &kamailio;.
The value is expected as a comma separated list of extensions.
This list is separated into single tokens. Each token from
a proxy require header will be compared to the tokens from this
More information about the sr-dev
mailing list