<?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 offers topology hiding by stripping the SIP routing
		headers that show topology details.
		The script interpreter gets the SIP messages with full content,
		so all existing functionality is preserved.
	</para>
	<para>
		The module is transparent for the configuration writer. It only needs to be
		loaded (tune the parameters if needed).
	</para>
	<para>
		It works for SIP MESSAGE requests.
	</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>rr module</emphasis> - server must perform record
				routing to ensure in-dialog requests are encoded/decoded.
			</para>
			</listitem>
			<listitem>
			<para>
				<emphasis>database module</emphasis> - to store the data
				for topology stripping and restoring.
			</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="topos.p.db_url">
		<title><varname>db_url</varname> (str)</title>
		<para>
		Database URL.
		</para>
		<para>
		<emphasis>
			Default value is <quote>&defaultdb;</quote>.
		</emphasis>
		</para>
		<example>
		<title>Set <varname>db_url</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("topos", "db_url", "&exampledb;")
...
</programlisting>
		</example>
	</section>
	<section id="topos.p.mask_callid">
		<title><varname>mask_callid</varname> (int)</title>
		<para>
			Whether to replace or not the Call-ID with another
			unique id generated by &kamailio;.
		</para>
		<para>
		<emphasis>
			Default value is 0 (do not mask).
		</emphasis>
		</para>
		<example>
		<title>Set <varname>mask_callid</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("topos", "mask_callid", 1)
...
</programlisting>
		</example>
	</section>
	<section id="topos.p.sanity_checks">
		<title><varname>sanity_checks</varname> (int)</title>
		<para>
			If set to 1, topoh module will bind to sanity module in order
			to perform sanity checks over received SIP request. Default
			sanity checks are done. It is useful to check if received request
			is well formated before proceeding to encoding/decoding.
		</para>
		<para>
		<emphasis>
			Default value is 0 (do not bind to sanity module).
		</emphasis>
		</para>
		<example>
		<title>Set <varname>sanity_checks</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("topoh", "sanity_checks", 1)
...
</programlisting>
		</example>
	</section>
	<section id="topos.p.branch_expires">
		<title><varname>branch_expires</varname> (int)</title>
		<para>
			Interval in seconds after which the branch records are deleted.
		</para>
		<para>
		<emphasis>
			Default value is 180 (3 min).
		</emphasis>
		</para>
		<example>
		<title>Set <varname>branch_expires</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("topos", "branch_expires", 300)
...
</programlisting>
		</example>
	</section>
	<section id="topos.p.branch_dialog">
		<title><varname>branch_dialog</varname> (int)</title>
		<para>
			Interval in seconds after which the dialog records are deleted.
		</para>
		<para>
		<emphasis>
			Default value is 10800 (3 hours).
		</emphasis>
		</para>
		<example>
		<title>Set <varname>branch_dialog</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("topos", "branch_dialog", 3600)
...
</programlisting>
		</example>
	</section>
	<section id="topos.p.clean_interval">
		<title><varname>clean_inteval</varname> (int)</title>
		<para>
			Interval in seconds to run the clean up of stored
			records.
		</para>
		<para>
		<emphasis>
			Default value is 60 (1 min).
		</emphasis>
		</para>
		<example>
		<title>Set <varname>clean_interval</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("topos", "clean_interval", 30)
...
</programlisting>
		</example>
	</section>

	</section>
</chapter>