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

<chapter>
    <chapterinfo>
	<revhistory>
	    <revision>
		<revnumber>$Revision: 1.1.4.1 $</revnumber>
		<date>$Date: 2003/11/13 20:20:51 $</date>
	    </revision>
	</revhistory>
    </chapterinfo>
    <title>User's Guide</title>
    
    <section>
	<title>Overview</title>
	<para>
	    <acronym>VM</acronym> module enables the communication between &ser; and Sems through
	    <acronym>FIFO</acronym> calls and server functions.
	</para>
	<para>
	    The voicemail application is available at
	    <ulink url='http://developer.berlios.de/projects/sems/'>http://developer.berlios.de/projects/sems/</ulink>
	</para>
	<para>
	    See its README for details on how to couple it with vm module.
	</para>
	<para>
	    If you need some help or just to report some bug, email the author at
	    raphael.coeffic@iptel.org.
	</para>
    </section>
    <section>
	<title>Dependencies</title>
	<section>
	    <title>&ser; Modules</title>
	    <para>
		The following modules must be loaded before this module:
	    	<itemizedlist>
		    <listitem>
			<para>
			    <emphasis>tm - Transaction Module</emphasis>.
			</para>
		    </listitem>
		    <listitem>
			<para>
			    <emphasis>A &ser; database module</emphasis>.
			</para>
		    </listitem>
	    	</itemizedlist>
	    </para>
	</section>
	<section>
	    <title>External Libraries or Applications</title>
	    <para>
		The following libraries or applications must be installed before running
		&ser; with this module loaded:
	    	<itemizedlist>
		    <listitem>
			<para>
			    <emphasis>None</emphasis>.
			</para>
		    </listitem>
	    	</itemizedlist>
	    </para>
	</section>
    </section>
    <section>
	<title>Exported Parameters</title>
	<section>
	    <title><varname>db_url</varname> (string)</title>
	    <para>
		&url; of the mysql database used to retrieve users.
	    </para>
	    <para>
		<emphasis>
		    Default value is <quote>mysql://ser:heslo@localhost/ser</quote>.
		</emphasis>
	    </para>
	    <example>
		<title>Set <varname>db_url</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("vm", "db_url", "mysql://username:password@localhost/ser")
...
</programlisting>
	    </example>
	</section>

	<section>
	    <title><varname>email_column</varname> (string)</title>
	    <para>
		Column name in subscriber table.
	    </para>
	    <para>
		<emphasis>
		    Default value is <quote>email_address</quote>.
		</emphasis>
	    </para>
	    <example>
		<title>Set <varname>email_column</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("vm", "email_column", "email")
...
</programlisting>
	    </example>
	</section>

	<section>
	    <title><varname>subscriber_table</varname> (string)</title>
	    <para>
		Table name of subscriber profiles.
	    </para>
	    <para>
		<emphasis>
		    Default value is <quote>subscriber</quote>.
		</emphasis>
	    </para>
	    <example>
		<title>Set <varname>subscriber_table</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("vm", "subscriber_table", "subscriber")
...
</programlisting>
	    </example>
	</section>

	<section>
	    <title><varname>user_column</varname> (string)</title>
	    <para>
		Column name of user id in subscriber profile.
	    </para>
	    <para>
		<emphasis>
		    Default value is <quote>username</quote>.
		</emphasis>
	    </para>
	    <example>
		<title>Set <varname>user_column</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("vm", "user_column", "username")
...
</programlisting>
	    </example>
	</section>

	<section>
	    <title><varname>domain_column</varname> (string)</title>
	    <para>
		Column name of domain in subscriber profile. Enable only with MULTI_DOMAIN def.
	    </para>
	    <para>
		<emphasis>
		    Default value is <quote>domain</quote>.
		</emphasis>
	    </para>
	    <example>
		<title>Set <varname>domain_column</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("vm", "domain_column", "domain")
...
</programlisting>
	    </example>
	</section>

    </section>
    <section>
	<title>Exported Functions</title>
	<para>
	    The function should only get called within a transaction.
	</para>
	<section>
	    <title>
		<function moreinfo="none">vm(path, appname)</function>
	    </title>
	    <para>
		Relays a &sip; request to the voicemail system.
	    </para>
	    <para>Meaning of the parameters is as follows:</para>
	    <itemizedlist>
		<listitem>
		    <para><emphasis>path</emphasis> - Voicemail fifo path.
		    </para>
		</listitem>
		<listitem>
		    <para><emphasis>appname</emphasis> - Application name to execute on Sems.
		    </para>
		</listitem>
	    </itemizedlist>
	    <example>
		<title><function>vm</function> usage</title>
		<programlisting format="linespecific">
...
vm("/tmp/vm_fifo", "voicemail");
...
</programlisting>
	    </example>
	</section>
    </section>
</chapter>

<!-- Keep this element at the end of the file
Local Variables:
sgml-parent-document: ("vm.sgml" "Book" "chapter")
End:
-->
