<?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="acc.parameters" xmlns:xi="http://www.w3.org/2001/XInclude">
    <sectioninfo>
	<revhistory>
	    <revision>
		<revnumber>$Revision: 1.1 $</revnumber>
		<date>$Date: 2005/11/15 12:04:05 $</date>
	    </revision>
	</revhistory>
    </sectioninfo>

    <title>Parameters</title>

    <section id="secret">
	<title><varname>secret</varname> (string)</title>
	<para>
	    The secret string used to generate nonce. Inclusion of this string
	    in nonce ensures that only the proxy server that knows the secret
	    string will be able to generate the nonce and verify it later when
	    received from the user agent.
	</para>
	<para>
	    Default value is randomly generated string.
	</para>
	<example>
	    <title>Setting secret module parameter</title>
	    <programlisting>
modparam("auth", "secret", "johndoessecretphrase")
	    </programlisting>
	</example>
    </section>

    <section id="log_level">
	<title><varname>log_level</varname> (integer)</title>
	<para>
	    Log level at which accounting messages are issued to syslog.
	</para>
	<para>
	    Default value is L_NOTICE.
	</para>
	<example>
	    <title>log_level example</title>
	    <programlisting>
modparam("acc", "log_level", 2)   # Set log_level to 2
	    </programlisting>
	</example>
    </section>
    
    <section id="log_fmt">
	<title><varname>log_fmt</varname> (string)</title>
	<para>
	    Defines what parts of header fields will be printed to syslog, see
	    "overview" for list of accepted values.
	</para>
	<para>
	    Default value is "miocfs".
	</para>

	<example>
	    <title>log_fmt example</title>
	    <programlisting>
modparam("acc", "log_fmt", "mfs")
	    </programlisting>
	</example>
    </section>

    <section id="early_media">
	<title><varname>early_media</varname> (integer)</title>
	<para>
	    Should be early media (183) accounted too ?
	</para>
	<para>
	    Default value is 0 (no).
	</para>
	<example>
	    <title>early_media example</title>
	    <programlisting>
modparam("acc", "early_media", 1)
	    </programlisting>
	</example>
    </section>

    <section id="failed_transactions">
	<title><varname>failed_transactions</varname> (integer)</title>
	<para>
	    This parameter controls whether failed transactions (with final
	    reply &gt;= 300) should be accounted too.
	</para>
	<para>
	    Default value is 0 (no).
	</para>
	<example>
	    <title>failed_transactions example</title>
	    <programlisting>
modparam("acc", "failed_transactions", 1)
	    </programlisting>
	</example>
    </section>

    <section id="log_flag">
	<title><varname>log_flag</varname> (integer)</title>
	<para>
	    Request flag which needs to be set to account a transaction.
	</para>
	<para>
	    Default value is 1.
	</para>
	<example>
	    <title>log_flag example</title>
	    <programlisting>
modparam("acc", "log_flag", 2)
	    </programlisting>
	</example>
    </section>
    
    <section id="log_missed_flag">
	<title><varname>log_missed_flag</varname> (integer)</title>
	<para>
	    Request flag which needs to be set to account missed calls.
	</para>
	<para>
	    Default value is 2.
	</para>
	<example>
	    <title>log_missed_flag example</title>
	    <programlisting>
modparam("acc", "log_missed_flag", 3)
	    </programlisting>
	</example>
    </section>
    
    <section id="report_ack">
	<title><varname>report_ack</varname> (integer)</title>
	<para>
	    Shall acc attempt to account e2e ACKs too ? Note that this is
	    really only an attempt, as e2e ACKs may take a different path
	    (unless RR enabled) and mismatch original INVITE (e2e ACKs are a
	    separate transaction).
	</para>
	<para>
	    Default value is 1 (yes).
	</para>
	<example>
	    <title>report_ack example</title>
	    <programlisting>
modparam("acc", "report_ack", 0)
	    </programlisting>
	</example>
    </section>

    <section id="report_cancels">
	<title><varname>report_cancels</varname> (integer)</title>
	<para>
	    By default, CANCEL reporting is disabled -- most accounting
	    applications are happy to see INVITE's cancellation status.  Turn
	    on if you explicitly want to account CANCEL transactions.
	</para>
	<para>
	    Default value is 0 (no).
	</para>
	<example>
	    <title>report_cancels example</title>
	    <programlisting>
modparam("acc", "report_cancels", 1)
	    </programlisting>
	</example>
    </section>

    <section id="radius_config">
	<title><varname>radius_config</varname> (string)</title>
	<para>
	    <emphasis>This parameter is radius specific.</emphasis> Path to
	    radius client configuration file, set the referred config file
	    correctly and specify there address of server, shared secret
	    (should equal that in
	    <filename>/usr/local/etc/raddb/clients</filename> for freeRadius
	    servers) and dictionary, see etc for an example of config file and
	    dictionary.
	</para>
	<para>
	    Default value is <quote>/usr/local/etc/radiusclient/radiusclient.conf</quote>.
	</para>
	<example>
	    <title>radius_config example</title>
	    <programlisting>
modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
	    </programlisting>
	</example>
    </section>
    
    <section id="service_type">
	<title><varname>service_type</varname> (integer)</title>
	<para>
	    Radius service type used for accounting.
	</para>
	<para>
	    Default value is 15 (SIP).
	</para>
	<example>
	    <title>service_type example</title>
	    <programlisting>
modparam("acc", "service_type", 16)
	    </programlisting>
	</example>
    </section>

    <section id="radius_flag">
	<title><varname>radius_flag</varname> (integer)</title>
	<para>
	    Request flag which needs to be set to account a transaction --
	    RADIUS specific.
	</para>
	<para>
	    Default value is 1.
	</para>
	<example>
	    <title>radius_flag example</title>
	    <programlisting>
		modparam("acc", "radius_flag", 2)
	    </programlisting>
	</example>
    </section>

    <section id="radius_missed_flag">
	<title><varname>radius_missed_flag</varname> (integer)</title>
	<para>
	    Request flag which needs to be set to account missed calls --
	    RADIUS specific.
	</para>
	<para>
	    Default value is 2.
	</para>
	<example>
	    <title>radius_missed_flag example</title>
	    <programlisting>
modparam("acc", "radius_missed_flag", 3)
	    </programlisting>
	</example>
    </section>
    
    <section id="db_url">
	<title><varname>db_url</varname> (string)</title>
	<para>
	    SQL address -- database specific.
	</para>
	<para>
	    Default value is "mysql://ser:heslo@localhost/ser"
	</para>
	<example>
	    <title>db_url example</title>
	    <programlisting>
modparam("acc", "db_url", "mysql://user:password@localhost/ser")
	    </programlisting>
	</example>
    </section>
    
    <section id="db_flag">
	<title><varname>db_flag</varname> (integer)</title>
	<para>
	    Request flag which needs to be set to account a transaction --
	    database specific.
	</para>
	<para>
	    Default value is 1.
	</para>
	<example>
	    <title>db_flag example</title>
	    <programlisting>
modparam("acc", "db_flag", 2)
	    </programlisting>
	</example>
    </section>
    
    <section id="db_missed_flag">
	<title><varname>db_missed_flag</varname> (integer)</title>
	<para>
	    Request flag which needs to be set to account missed calls --
	    database specific.
	</para>
	<para>
	    Default value is 2.
	</para>
	<example>
	    <title>db_missed_flag example</title>
	    <programlisting>
modparam("acc", "db_missed_flag", 3)
	    </programlisting>
	</example>
    </section>
    
    <section id="diameter_flag">
	<title><varname>diameter_flag</varname> (integer)</title>
	<para>
	    Request flag which needs to be set to account a transaction --
	    DIAMETER specific.
	</para>
	<para>
	    Default value is 1.
	</para>
	<example>
	    <title>diameter_flag example</title>
	    <programlisting>
modparam("acc", "diameter_flag", 2)
	    </programlisting>
	</example>
    </section>

    <section id="diameter_missed_flag">
	<title><varname>diameter_missed_flag</varname> (integer)</title>
	<para>
	    Request flag which needs to be set to account missed calls --
	    DIAMETER specific.
	</para>
	<para>
	    Default value is 2.
	</para>
	<example>
	    <title>diameter_missed_flag example</title>
	    <programlisting>
modparam("acc", "diameter_missed_flag", 3)
	    </programlisting>
	</example>
    </section>

    <section id="diameter_client_host">
	<title><varname>diameter_client_host</varname> (string)</title>
	<para>
	    Hostname of the machine where the DIAMETER Client is running -- DIAMETER specific.
	</para>
	<para>
	    Default value is "localhost".
	</para>
	<example>
	    <title>diameter_client_host example</title>
	    <programlisting>
modparam("acc", "diameter_client_host", "iptel.org")
	    </programlisting>
	</example>
    </section>
    
    <section id="diameter_client_port">
	<title><varname>diameter_client_port</varname> (int)</title>
	<para>
	    Port number where the Diameter Client is listening -- DIAMETER specific.
	</para>
	<para>
	    Default value is 3000.
	</para>
	<example>
	    <title>diameter_client_host example</title>
	    <programlisting>
modparam("acc", "diameter_client_port", 3000)
	    </programlisting>
	</example>
    </section>
</section>
