Przeglądaj źródła

sanity Minor README updates

Olle E. Johansson 12 lat temu
rodzic
commit
d36d4de28a

+ 39 - 35
modules/sanity/README

@@ -1,4 +1,4 @@
-1. Sanity Module
+The Sanity Module - SIP syntax checking
 
 
 Nils Ohlmeier
 Nils Ohlmeier
 
 
@@ -7,38 +7,35 @@ Nils Ohlmeier
    Copyright © 2006 iptelorg GmbH
    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
    This module aims to implement several sanity checks on incoming
    requests which are suggested or even required by a RFC, but are not
    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:
    The following checks are available:
      * ruri sip version - (1) - checks if the SIP version in the request
      * ruri sip version - (1) - checks if the SIP version in the request
        URI is supported, currently only 2.0.
        URI is supported, currently only 2.0.
      * ruri scheme - (2) - checks if the URI scheme of the request URI is
      * 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
      * required headers - (4) -checks if the minimum set of required
        headers to, from, cseq, callid and via is present in the request.
        headers to, from, cseq, callid and via is present in the request.
      * via sip version - (8) - not working because parser fails already
      * 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
        header are present in the list of the extensions from the module
        parameter proxy_require.
        parameter proxy_require.
      * parse uri's - (1024) - checks if the specified URIs are present and
      * 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
      * digest credentials (2048) Check all instances of digest credentials
        in a message. The test checks whether there are all required digest
        in a message. The test checks whether there are all required digest
        parameters and have meaningful values.
        parameters and have meaningful values.
 
 
-1.2. Dependencies
+2. Dependencies
 
 
    The following modules must be loaded before this module:
    The following modules must be loaded before this module:
      * sl - Stateless replies.
      * 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
    This parameter determines which of the checks from the sanity module
    are executed if no parameter was given to the sanity_check function
    are executed if no parameter was given to the sanity_check function
@@ -87,7 +89,7 @@ Nils Ohlmeier
 modparam("sanity", "default_checks", 1)
 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
    This parameter determines which URIs are going to be checked if the
    'parse uri' will be executed.
    'parse uri' will be executed.
@@ -100,19 +102,19 @@ modparam("sanity", "default_checks", 1)
 modparam("sanity", "uri_checks", 3)
 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
    Example 3. Set proxy_require parameter
 ...
 ...
 modparam("sanity", "proxy_require", "foo, bar")
 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
    This parameter controls whether the module drops automatically or not
    the SIP message if the sanity checks fail. Default value is 1 (auto
    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)
 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.
    This function makes a row of sanity checks over the given SIP request.
    The behavior of the function is also controlled by 'autodrop'
    The behavior of the function is also controlled by 'autodrop'

+ 20 - 14
modules/sanity/doc/sanity.xml

@@ -1,9 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?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>
 	<authorgroup>
 	    <author>
 	    <author>
 		<firstname>Nils</firstname>
 		<firstname>Nils</firstname>
@@ -18,24 +25,23 @@
 	    <year>2006</year>
 	    <year>2006</year>
 	    <holder>iptelorg GmbH</holder>
 	    <holder>iptelorg GmbH</holder>
 	</copyright>
 	</copyright>
-    </sectioninfo>
+    </bookinfo>
 
 
-    <title>Sanity Module</title>
 
 
     <section id="sanity.overview">
     <section id="sanity.overview">
 	<title>Overview</title>
 	<title>Overview</title>
 	<para>
 	<para>
 		This module aims to implement several sanity checks on incoming
 		This module aims to implement several sanity checks on incoming
 		requests which are suggested or even required by a RFC, but are
 		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>
 	<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
 		But on the other side it makes not much sence if a broken
 		request traverses through a SIP network if it is rejected sooner
 		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
 		or later by a SIP device any way. As every sanity check cost extra
 		performance because of additional parsing and evaluation it
 		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.
 		should be done on which request.
 	</para>
 	</para>
 	<para>
 	<para>
@@ -50,7 +56,7 @@
 		<listitem>
 		<listitem>
 			<para>
 			<para>
 			ruri scheme - (2) - checks if the URI scheme of the request URI is
 			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>
 			</para>
 		</listitem>
 		</listitem>
 		<listitem>
 		<listitem>
@@ -105,7 +111,7 @@
 		<listitem>
 		<listitem>
 			<para>
 			<para>
 			parse uri's - (1024) - checks if the specified URIs are present and
 			parse uri's - (1024) - checks if the specified URIs are present and
-			parseable by the SIP-router parsers
+			parseable by the &kamailio; parsers
 			</para>
 			</para>
 		</listitem>
 		</listitem>
 		<listitem>
 		<listitem>
@@ -133,6 +139,6 @@
 	</para>
 	</para>
     </section>
     </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>

+ 0 - 0
modules/sanity/doc/functions.xml → modules/sanity/doc/sanity_functions.xml


+ 1 - 1
modules/sanity/doc/params.xml → modules/sanity/doc/sanity_params.xml

@@ -62,7 +62,7 @@ modparam("sanity", "uri_checks", 3)
 	<section id="proxy_require">
 	<section id="proxy_require">
 	<title><varname>proxy_require</varname> (string)</title>
 	<title><varname>proxy_require</varname> (string)</title>
 	<para>
 	<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.
 		The value is expected as a comma separated list of extensions.
 		This list is separated into single tokens. Each token from
 		This list is separated into single tokens. Each token from
 		a proxy require header will be compared to the tokens from this
 		a proxy require header will be compared to the tokens from this