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

<chapter>
	
	<title>&adminguide;</title>
	
	<section id="overview" xreflabel="Overview">
	<title>Overview</title>
	<para>
		 The pua_bla module enables Bridged Line Appearances support according to 
		 the specifications in draft-anil-sipping-bla-03.txt.
	</para>
	</section>
		<section id="dependencies" xreflabel="Dependencies">
	<title>Dependencies</title>
	<section>
		<title>&osips; Modules</title>
		<para>
		The following modules must be loaded before this module:
			<itemizedlist>
			<listitem>
			<para>
				<emphasis>usrloc</emphasis>.
			</para>
			</listitem>
			<listitem>
			<para>
				<emphasis>pua</emphasis>.
			</para>
			</listitem>
			<listitem>
			<para>
				<emphasis>presence</emphasis>.
			</para>
			</listitem>
			</itemizedlist>
		</para>
	</section>
	<section>
		<title>External Libraries or Applications</title>
		<para>
		The following libraries or applications must be installed before running
		&osips; with this module loaded:
			<itemizedlist>
			<listitem>
			<para>
				<emphasis>libxml</emphasis>.
			</para>
			</listitem>
			</itemizedlist>
		</para>
	</section>
	</section>
	<section id="exported_parameters" xreflabel="Exported Parameters">
	<title>Exported Parameters</title>
	<section id="param_default_domain" xreflabel="default_domain">
		<title><varname>default_domain</varname>(str)</title>
		<para>
		The default domain for the registered users to be used when
		constructing the uri for the registrar callback. 
		</para>
		<para>
		<emphasis>	Default value is <quote>NULL</quote>.	
		</emphasis>
		</para>
		<example>
		<title>Set <varname>default_domain</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("pua_bla", "default_domain", "opensips.org")
...
</programlisting>
		</example>
	</section>
	<section id="param_header_name" xreflabel="header_name">
		<title><varname>header_name</varname>(str)</title>
		<para>
		The name of the header to be added to Publish requests.
		It will contain the uri of the user agent that sent the
		Notify that is transformed into Publish. It stops sending 
		a Notification with the same information to the sender.
		</para>
		<para>
		<emphasis>	Default value is <quote>NULL</quote>.	
		</emphasis>
		</para>
		<example>
		<title>Set <varname>header_name</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("pua_bla", "header_name", "Sender")
...
</programlisting>
		</example>
	</section>

	<section id="param_outbound_proxy" xreflabel="outbound_proxy">
		<title><varname>outbound_proxy</varname>(str)</title>
		<para>
		The outbound_proxy uri to be used when sending Subscribe requests.
		</para>
		<para>
		<emphasis>	Default value is <quote>NULL</quote>.	
		</emphasis>
		</para>
		<example>
		<title>Set <varname>outbound_proxy</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("pua_bla", "outbound_proxy", "sip:proxy@opensips.org")
...
</programlisting>
		</example>
	</section>
	<section id="param_server_address" xreflabel="server_address">
		<title><varname>server_address</varname>(str)</title>
		<para>
		The IP address of the server.
		</para>
		<example>
		<title>Set <varname>server_address</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("pua_bla", "server_address", "sip:bla@160.34.23.12")
...
</programlisting>
		</example>
	</section>

	<section id="param_presence_server" xreflabel="presence_server">
		<title><varname>presence_server</varname>(str)</title>
		<para>
			The address of the presence server - will be used as
			an outbound proxy when sending PUBLISH requests. 
			It is optional.
		</para>
		<para>
		<emphasis>	Default value is <quote>NULL</quote>.	
		</emphasis>
		</para>
		<example>
		<title>Set <varname>presence_server</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("pua_bla", "presence_server", "sip:pa@opensips.org")
...
</programlisting>
		</example>
	</section>

</section>	
	
	
<section id="exported_functions" xreflabel="exported_functions">
	<title>Exported Functions</title>
		<section id="func_bla_set_flag" xreflabel="bla_set_flag()">
				<title>
				<function moreinfo="none">bla_set_flag()</function>
				</title>
			<para>
				The function is used to mark REGISTER requests made to a BLA AOR.
				The modules subscribes to the registered contacts for dialog;sla 
				event.
			</para>
			<para>
			</para>
		<example>
		<title><function>bla_set_flag</function> usage</title>
	<programlisting format="linespecific">
...
if(is_method("REGISTER") &amp;&amp; $tu=~"bla_aor@opensips.org") 
	bla_set_flag();		
...
</programlisting>
		</example>

		</section>
	<section id="func_bla_handle_notify" xreflabel="bla_handle_notify()">
				<title>
				<function moreinfo="none">bla_handle_notify()</function>
				</title>
			<para>
				The function handles Notify requests sent from phones on the
				same BLA to the server. The message is transformed in Publish 
				request and passed to presence module for further handling.
				in case of a successful processing a 2xx reply should be sent.
			</para>
			<para>
			</para>
		<example>
		<title><function>bla_handle_notify</function> usage</title>
	<programlisting format="linespecific">
...
if(is_method("NOTIFY") &amp;&amp; $tu=~"bla_aor@opensips.org") 
{
		if( bla_handle_notify() ) 
			t_reply(200, "OK");
}	
...
</programlisting>
		</example>

		</section>
</section>		

</chapter>

