<?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">

<section id="jabber.parameters" xmlns:xi="http://www.w3.org/2001/XInclude">
    <sectioninfo>
	<revhistory>
	    <revision>
		<revnumber>$Revision$</revnumber>
		<date>$Date$</date>
	    </revision>
	</revhistory>
    </sectioninfo>

    <title>Parameters</title>

    <section id="jabber.db_url">
	<title><varname>db_url</varname> (string)</title>
	<para>
	    <acronym>SQL</acronym> URL of database.
	</para>
	<para>
	    Default value is "mysql://root@127.0.0.1/sip_jab".
	</para>
	<example>
	    <title>Set <varname>db_url</varname> parameter</title>
	    <programlisting>
...
modparam("jabber", "db_url", "mysql://username:password@host/sip_jab")
...
	    </programlisting>
	</example>
    </section>
    
    <section id="jaddress">
	<title><varname>jaddress</varname> (string)</title>
	<para>
	    IP or hostname of Jabber server - it must be the same as the value
	    from &lt;host&gt; tag of Jabber server config file.
	</para>
	<para>
	    Default value is "127.0.0.1".
	</para>
	<example>
	    <title>Set <varname>jaddress</varname> parameter</title>
	    <programlisting>
...
modparam("jabber", "jaddress", "1.2.3.4")
...
	    </programlisting>
	</example>
    </section>
    
    <section id="jport">
	<title><varname>jport</varname> (integer)</title>
	<para>
	    Port number of Jabber server.
	</para>
	<para>
	    Default value is 5222.
	</para>
	<example>
	    <title>Set <varname>jport</varname> parameter</title>
	    <programlisting>
...
modparam("jabber", "jport", 1234)
...
	    </programlisting>
	</example>
    </section>
    
    <section id="jdomain">
	<title><varname>jdomain</varname> (string)</title>
	<para>
	    Format: jabber.sipserver.com=&lt;delim&gt;. If the destination is for Jabber network
	    the URI should be like: username&lt;delim&gt;jabber_server@jdomain or
	    nickname&lt;delim&gt;roomname&lt;delim&gt;conference_server@jdomain
	</para>
	<para>
	    &lt;delim&gt; must be a un-reserved character. By default this character is * .  The
	    destination will be transformed to username@jabber_server or
	    roomname@conference_server/nickname before the message is sent to Jabber server.
	</para>
	<para>
	    Default value is none.
	</para>
	<example>
	    <title>Set <varname>jdomain</varname> parameter</title>
	    <programlisting>
...
modparam("jabber", "jdomain", "jabber.sipserver.com=*")
...
	    </programlisting>
	</example>
    </section>
    
    <section id="aliases">
	<title><varname>aliases</varname> (string)</title>
	<para>
	    Aliases for IM networks.
	</para>
	<para>
	    Format: "N;alias1=&lt;delim1&gt;;...;aliasN=&lt;delimN&gt;;"
	    Destinations like '*@aliasX' could have other format than those
	    specified for Jabber network. All &lt;delim&gt; from user part of
	    the destination address will be changed to &lt;delimX&gt; if the
	    destination address contains &lt;aliasX&gt;.
	</para>
	<para>
	    (Ex: jdomain is 'jabber.x.com=*' and msn_alias is
	    'msn.x.com=%'. The destination address forM <acronym>MSN</acronym>
	    Network, on SIP side, is like 'username*hotmail.com@msn.x.com'. The
	    destination address will be transformed to
	    'username%hotmail.com@msn.x.com'.  'msn.x.com' must be the same as
	    the <acronym>JID</acronym> associated with <acronym>MSN</acronym>
	    transport in Jabber configuration file (usually is 'jabberd.xml'))
	</para>
	<para>
	    Default value is none.
	</para>
	<example>
	    <title>Set <varname>jdomain</varname> parameter</title>
	    <programlisting>
...
modparam("jabber", "aliases", "1;msn.x.com=%")
...
	    </programlisting>
	</example>
    </section>
    
    <section id="proxy">
	<title><varname>proxy</varname> (string)</title>
	<para>
	    Outbound proxy address.
	</para>
	<para>
	    Format: ip_address:port hostname:port
	</para>
	<para>
	    All SIP messages generated by gateway will be sent to that
	    address. If is missing, the message will be delivered to the
	    hostname of the destination address
	</para>
	<para>
	    Default value is none.
	</para>
	<example>
	    <title>Set <varname>proxy</varname> parameter</title>
	    <programlisting>
...
modparam("jabber", "proxy", "10.0.0.1:5060 sipserver.com:5060")
...
	    </programlisting>
	</example>
    </section>

    <section id="jabber.registrar">
	<title><varname>registrar</varname> (string)</title>
	<para>
	    The address in whose behalf the INFO and ERROR messages are sent.
	</para>
	<para>
	    Default value is "jabber_gateway@127.0.0.1".
	</para>
	<example>
	    <title>Set <varname>registrar</varname> parameter</title>
	    <programlisting>
...
modparam("jabber", "registrar", "jabber_gateway@127.0.0.1")
...
	    </programlisting>
	</example>
    </section>
    
    <section id="workers">
	<title><varname>workers</varname> (integer)</title>
	<para>
	    Number of workers.
	</para>
	<para>
	    Default value is 2.
	</para>
	<example>
	    <title>Set <varname>workers</varname> parameter</title>
	    <programlisting>
...
modparam("jabber", "workers", 2)
...
	    </programlisting>
	</example>
    </section>

    <section>
	<title><varname>max_jobs</varname> (integer)</title>
	<para>
	    Maximum jobs per worker.
	</para>
	<para>
	    Default value is 10.
	</para>
	<example>
	    <title>Set <varname>max_jobs</varname> parameter</title>
	    <programlisting>
...
modparam("jabber", "max_jobs", 10)
...
	    </programlisting>
	</example>
    </section>

    <section id="cache_time">
	<title><varname>cache_time</varname> (integer)</title>
	<para>
	    Cache time of a Jabber connection.
	</para>
	<para>
	    <emphasis>
		Default value is 600.
	    </emphasis>
	</para>
	<example>
	    <title>Set <varname>cache_time</varname> parameter</title>
	    <programlisting>
...
modparam("jabber", "cache_time", 600)
...
	    </programlisting>
	</example>
    </section>

    <section id="delay_time">
	<title><varname>delay_time</varname> (integer)</title>
	<para>
	    Time to keep a SIP message (in seconds).
	</para>
	<para>
	    Default value is 90 seconds.
	</para>
	<example>
	    <title>Set <varname>delay_time</varname> parameter</title>
	    <programlisting>
...
modparam("jabber", "delay_time", 90)
...
	    </programlisting>
	</example>
    </section>
    
    <section id="sleep_time">
	<title><varname>sleep_time</varname> (integer)</title>
	<para>
	    Time between expired Jabber connections checking (in seconds).
	</para>
	<para>
	    Default value is 20 seconds.
	</para>
	<example>
	    <title>Set <varname>sleep_time</varname> parameter</title>
	    <programlisting>
...
modparam("jabber", "sleep_time", 20)
...
	    </programlisting>
	</example>
    </section>
    
    <section id="check_time">
	<title><varname>check_time</varname> (integer)</title>
	<para>
	    Time between checking the status of JabberGW workers (in seconds).
	</para>
	<para>
	    Default value is 20 seconds.
	</para>
	<example>
	    <title>Set <varname>check_time</varname> parameter</title>
	    <programlisting>
...
modparam("jabber", "check_time", 20)
...
	    </programlisting>
	</example>
    </section>
</section>
