Skip to content

Commit

Permalink
modules/cfgt: add initial documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxmaniac committed Dec 15, 2015
1 parent fc64249 commit 9ee0bd9
Show file tree
Hide file tree
Showing 4 changed files with 324 additions and 0 deletions.
126 changes: 126 additions & 0 deletions modules/cfgt/README
@@ -0,0 +1,126 @@
cfgt Module

Victor Seva

sipwise.com

Edited by

Victor Seva

<linuxmaniac@torreviejawireless.org>

Copyright � 2015 Victor Seva (sipwise.com)
__________________________________________________________________

Table of Contents

1. Admin Guide

1. Overview
2. Dependencies

2.1. Kamailio Modules
2.2. External Libraries or Applications

3. Parameters

3.1. basedir (string)
3.2. mask (int)
3.3. callid_prefix (string)

List of Examples

1.1. Set cfgtrace parameter
1.2. Set mask parameter
1.3. Set callid_prefix parameter

Chapter 1. Admin Guide

Table of Contents

1. Overview
2. Dependencies

2.1. Kamailio Modules
2.2. External Libraries or Applications

3. Parameters

3.1. basedir (string)
3.2. mask (int)
3.3. callid_prefix (string)

1. Overview

This module provides a report of the way Kamailio SIP Server Platform
configuration has been executed as part of a unit test for different
SIP scenarios.

In order to identify defferent scenarios a prefix string should be used
at Call-ID header.

2. Dependencies

2.1. Kamailio Modules
2.2. External Libraries or Applications

2.1. Kamailio Modules

The following modules must be loaded before this module:
* None.

2.2. External Libraries or Applications

The following libraries or applications must be installed before
running Kamailio with this module loaded:
* None.

3. Parameters

3.1. basedir (string)
3.2. mask (int)
3.3. callid_prefix (string)

3.1. basedir (string)

Control where the config reports should be stored. The dir must exists
and Kamailio SIP Server Platform must have perms to write on it.

Default value is "/tmp".

Example 1.1. Set cfgtrace parameter
...
modparam("cfgt", "basedir", "/var/run/kamailio/cfgtest")
...

3.2. mask (int)

mask - Control the type of vars it should display in the report:
* 1 - dump null values
* 2 - dump avp vars
* 4 - dump script vars
* 8 - dump xavp vars
* 16 - dump DP_OTHER vars
* 32 - dump ALL vars

Default value is "32" (ALL).

Example 1.2. Set mask parameter
...
# dump xavp(8) and avp(4) vars
modparam("cfgt", "mask", 12)
...

3.3. callid_prefix (string)

Prefix used to indentify test scenario messages. Last char of the
string will be used as delimiter.

Default value is "NGCP%" (using "%" as delimiter).

Example 1.3. Set callid_prefix parameter
...
# using '%' as delimiter
modparam("cfgt", "callid_prefix", "TEST-ID%")
...
4 changes: 4 additions & 0 deletions modules/cfgt/doc/Makefile
@@ -0,0 +1,4 @@
docs = cfgt.xml

docbook_dir = ../../../docbook
include $(docbook_dir)/Makefile.module
36 changes: 36 additions & 0 deletions modules/cfgt/doc/cfgt.xml
@@ -0,0 +1,36 @@
<?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" [

<!-- Include general documentation entities -->
<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
%docentities;

]>

<book xmlns:xi="http://www.w3.org/2001/XInclude">
<bookinfo>
<title>cfgt Module</title>
<productname class="trade">&kamailioname;</productname>
<authorgroup>
<author>
<firstname>Victor</firstname>
<surname>Seva</surname>
<affiliation><orgname>sipwise.com</orgname></affiliation>
</author>
<editor>
<firstname>Victor</firstname>
<surname>Seva</surname>
<email>linuxmaniac@torreviejawireless.org</email>
</editor>
</authorgroup>
<copyright>
<year>2015</year>
<holder>Victor Seva (sipwise.com)</holder>
</copyright>
</bookinfo>
<toc></toc>

<xi:include href="cfgt_admin.xml"/>

</book>
158 changes: 158 additions & 0 deletions modules/cfgt/doc/cfgt_admin.xml
@@ -0,0 +1,158 @@
<?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" [

<!-- Include general documentation entities -->
<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
%docentities;

]>

<!-- Module User's Guide -->

<chapter>

<title>&adminguide;</title>

<section>
<title>Overview</title>
<para>
This module provides a report of the way &kamailioname; configuration
has been executed as part of a unit test for different
SIP scenarios.
</para>
<para>
In order to identify defferent scenarios a prefix string should be
used at Call-ID header.
</para>
</section>
<section>
<title>Dependencies</title>
<section>
<title>&kamailio; Modules</title>
<para>
The following modules must be loaded before this module:
<itemizedlist>
<listitem>
<para>
<emphasis>None</emphasis>.
</para>
</listitem>
</itemizedlist>
</para>
</section>
<section>
<title>External Libraries or Applications</title>
<para>
The following libraries or applications must be installed before running
&kamailio; with this module loaded:
<itemizedlist>
<listitem>
<para>
<emphasis>None</emphasis>.
</para>
</listitem>
</itemizedlist>
</para>
</section>
</section>
<section>
<title>Parameters</title>
<section id="cfg.p.basedir">
<title><varname>basedir</varname> (string)</title>
<para>
Control where the config reports should be stored. The dir must
exists and &kamailioname; must have perms to write on it.
</para>
<para>
<emphasis>
Default value is <quote>/tmp</quote>.
</emphasis>
</para>
<example>
<title>Set <varname>cfgtrace</varname> parameter</title>
<programlisting format="linespecific">
...
modparam("cfgt", "basedir", "/var/run/kamailio/cfgtest")
...
</programlisting>
</example>
</section>

<section id="cfgt.p.mask">
<title><varname>mask</varname> (int)</title>
<itemizedlist>
<para><emphasis>mask</emphasis> - Control the type of vars it should
display in the report:
</para>
<itemizedlist>
<listitem><para>
1 - dump null values
</para></listitem>
<listitem><para>
2 - dump avp vars
</para></listitem>
<listitem><para>
4 - dump script vars
</para></listitem>
<listitem><para>
8 - dump xavp vars
</para></listitem>
<listitem><para>
16 - dump DP_OTHER vars
</para></listitem>
<listitem><para>
32 - dump ALL vars
</para></listitem>
</itemizedlist>
</itemizedlist>
<para>
<emphasis>
Default value is <quote>32</quote> (ALL).
</emphasis>
</para>
<example>
<title>Set <varname>mask</varname> parameter</title>
<programlisting format="linespecific">
...
# dump xavp(8) and avp(4) vars
modparam("cfgt", "mask", 12)
...
</programlisting>
</example>
</section>

<section id="cfgt.p.callid_prefix">
<title><varname>callid_prefix</varname> (string)</title>
<para>
Prefix used to indentify test scenario messages. Last char of the
string will be used as delimiter.
</para>
<para>
<emphasis>
Default value is <quote>NGCP%</quote>
(using <quote>%</quote> as delimiter).
</emphasis>
</para>
<example>
<title>Set <varname>callid_prefix</varname> parameter</title>
<programlisting format="linespecific">
...
# using '%' as delimiter
modparam("cfgt", "callid_prefix", "TEST-ID%")
...
</programlisting>
</example>
</section>

</section>

<!--
<section>
<title>Usage</title>
<para>
TODO: add some more info of how this is been used
</para>
</section>
-->
</chapter>

0 comments on commit 9ee0bd9

Please sign in to comment.