You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kamailio/modules/cfgt/doc/cfgt_admin.xml

184 lines
4.4 KiB

<?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 different scenarios a prefix string should be
used inside the 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
exist and &kamailioname; must have permissions 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 identify test scenario messages. Last char of the
string will be used as delimiter for the scenario ID. With parameter
set to <quote>NGCP%</quote> and Call-ID <quote>NGCP%123%456</quote>
the scenario identified will be <quote>123</quote>.
</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>
This module is used by the <emphasis>debugger</emphasis> module, so it must be loaded
first. To enable the generation of the reports, the <emphasis>debugger</emphasis> module
must be configured by setting the <emphasis>cfgtest</emphasis> parameter to "1".
</para>
<para>
Example of configuration:
</para>
<programlisting format="linespecific">
...
#!ifdef WITH_DEBUG
loadmodule "cfgt.so"
loadmodule "debugger.so"
#!endif
...
#!ifdef WITH_DEBUG
# ----- cfgt params -----
modparam("cfgt", "basedir", "/tmp/kamailio/cfgtest")
modparam("cfgt", "callid_prefix", "TRACE-ID%")
modparam("cfgt", "mask", 32)
# ----- debugger params -----
modparam("debugger", "cfgtrace", 1)
modparam("debugger", "log_level_name", "exec")
modparam("debugger", "cfgtest", 1)
#!endif
...
</programlisting>
</section>
</chapter>