Преглед на файлове

sca: doc indent using tabs

Victor Seva преди 9 години
родител
ревизия
a71aa0d333
променени са 1 файла, в които са добавени 273 реда и са изтрити 273 реда
  1. 273 273
      modules/sca/doc/sca_admin.xml

+ 273 - 273
modules/sca/doc/sca_admin.xml

@@ -10,9 +10,9 @@
 <!-- Module Admin Guide -->
 
 <chapter xmlns:xi="http://www.w3.org/2001/XInclude">
-    <title>&adminguide;</title>
+	<title>&adminguide;</title>
 
-    <section>
+	<section>
 	<title>Overview</title>
 	<para>
 		The sca module implements Shared Call Appearances. It handles
@@ -71,52 +71,52 @@
 		To date, this module has only been tested with Polycom
 		Soundpoint 550s and 650s running Polycom SIP 3.3.4.
 	</para>
-    </section>
+	</section>
 
-    <section>
+	<section>
 	<title>Dependencies</title>
 	<section>
-	    <title>Modules</title>
-	    <para>
+		<title>Modules</title>
+		<para>
 		The following modules must be loaded before this module:
 		<itemizedlist>
-		    <listitem>
-		    <para>
+			<listitem>
+			<para>
 			<emphasis>a database module</emphasis>
-		    </para>
-		    </listitem>
-		    <listitem>
-		    <para>
+			</para>
+			</listitem>
+			<listitem>
+			<para>
 			<emphasis>sl</emphasis>
-		    </para>
-		    </listitem>
-		    <listitem>
-		    <para>
+			</para>
+			</listitem>
+			<listitem>
+			<para>
 			<emphasis>tm</emphasis>
-		    </para>
-		    </listitem>
+			</para>
+			</listitem>
 		</itemizedlist>
-	    </para>
+		</para>
+	</section>
 	</section>
-    </section>
 
-    <section>
+	<section>
 	<title>Parameters</title>
 	<section id="sca.p.hash_table_size">
-	    <title><varname>hash_table_size</varname> (integer)</title>
-	    <para>
+		<title><varname>hash_table_size</varname> (integer)</title>
+		<para>
 		Size, as a power of two, of the shared memory hash table
 		containing the call-info subscriptions and the appearance
 		state. A larger power of two means better performance
 		(fewer collisions, making for fewer subscriber URI comparisons)
 		at the expense of increased shared memory use.
-	    </para>
-	    <para>
+		</para>
+		<para>
 		<emphasis>
-		    Default value is 9 (2 ^ 9 == 512).
+			Default value is 9 (2 ^ 9 == 512).
 		</emphasis>
-	    </para>
-	    <example>
+		</para>
+		<example>
 		<title>Set <varname>hash_table_size</varname>:</title>
 		<programlisting format="linespecific">
 ...
@@ -124,205 +124,205 @@
 modparam( "sca", "hash_table_size", 8 )
 ...
 		</programlisting>
-	    </example>
+		</example>
 	</section>
 
 	<section id="sca.p.call_info_max_expires">
-	    <title><varname>call_info_max_expires</varname> (integer)</title>
-	    <para>
+		<title><varname>call_info_max_expires</varname> (integer)</title>
+		<para>
 		The maximum allowed call-info subscription time in seconds.
-	    </para>
-	    <para>
+		</para>
+		<para>
 		<emphasis>
-		    Default value is 3600 (1 hour).
+			Default value is 3600 (1 hour).
 		</emphasis>
-	    </para>
-	    <example>
+		</para>
+		<example>
 		<title>Set <varname>call_info_max_expires</varname>:</title>
 		<programlisting format="linespecific">
 ...
 modparam( "sca", "call_info_max_expires", 1800 )
 ...
 		</programlisting>
-	    </example>
+		</example>
 	</section>
 
-        <section id="sca.p.line_seize_max_expires">
-            <title><varname>line_seize_max_expires</varname> (integer)</title>
-            <para>
+		<section id="sca.p.line_seize_max_expires">
+			<title><varname>line_seize_max_expires</varname> (integer)</title>
+			<para>
 		The maximum allowed line-seize subscription time in seconds.
-            </para>
-            <para>
-                <emphasis>
-		    Default value is 15 (15 seconds).
-                </emphasis>
-            </para>
-	    <para>
+			</para>
+			<para>
+				<emphasis>
+			Default value is 15 (15 seconds).
+				</emphasis>
+			</para>
+		<para>
 		A maximum line-seize subscription time of 15 seconds is
 		recommended in the SIP Access Side Extensions document.
 		This interval is purposely short to prevent a client from
 		seizing an appearance without making a call for extended
 		periods of time.
-	    </para>
-            <example>
-                <title>Set <varname>line_seize_max_expires</varname>:</title>
-                <programlisting format="linespecific">
+		</para>
+			<example>
+				<title>Set <varname>line_seize_max_expires</varname>:</title>
+				<programlisting format="linespecific">
 ...
 modparam( "sca", "line_seize_max_expires", 30 )
 ...
-                </programlisting>
-            </example>
-        </section>
+				</programlisting>
+			</example>
+		</section>
 
-        <section id="sca.p.purge_expired_interval">
-            <title><varname>purge_expired_interval</varname> (integer)</title>
-            <para>
+		<section id="sca.p.purge_expired_interval">
+			<title><varname>purge_expired_interval</varname> (integer)</title>
+			<para>
 		The period of time in seconds between purges of expired
 		call-info and line-seize subscriptions.
-            </para>
-            <para>
-                <emphasis>
-		    Default value is 120 (2 minutes).
-                </emphasis>
-            </para>
-	    <para>
+			</para>
+			<para>
+				<emphasis>
+			Default value is 120 (2 minutes).
+				</emphasis>
+			</para>
+		<para>
 		On finding an expired subscription, the module removes the
 		subscription from the shared memory hash table, and sends a
 		NOTIFY with Subscription-State "terminated;expired" header
 		value to the subscriber. It also NOTIFYs other members of
 		the group, in the event that the expired subscription was
 		a line-seize.
-	    </para>
-            <example>
-                <title>Set <varname>purge_expired_interval</varname>:</title>
-                <programlisting format="linespecific">
+		</para>
+			<example>
+				<title>Set <varname>purge_expired_interval</varname>:</title>
+				<programlisting format="linespecific">
 ...
 modparam( "sca", "purge_expired_interval", 60 )
 ...
-                </programlisting>
-            </example>
-        </section>
+				</programlisting>
+			</example>
+		</section>
 
 	<section id="sca.p.db_url">
-	    <title><varname>db_url</varname> (str)</title>
-	    <para>
+		<title><varname>db_url</varname> (str)</title>
+		<para>
 		URL of database to which subscribers will be written.
-	    </para>
-	    <para>
+		</para>
+		<para>
 		<emphasis>Default value is &defaultdb;</emphasis>
-	    </para>
-	    <example>
+		</para>
+		<example>
 		<title>Set <varname>db_url</varname> parameter:</title>
 		<programlisting format="linespecific">
 ...
 modparam( "sca", "db_url", "&defaultdb;" )
 ...
 		</programlisting>
-	    </example>
+		</example>
 	</section>
 
-        <section id="sca.p.subs_table">
-            <title><varname>subs_table</varname> (str)</title>
-            <para>
+		<section id="sca.p.subs_table">
+			<title><varname>subs_table</varname> (str)</title>
+			<para>
 		Name of the database table where call-info subscriptions
 		are written.
-            </para>
-            <para>
-                <emphasis>
-		    Default value is <quote>sca_subscriptions</quote>.
-                </emphasis>
-            </para>
-            <example>
-                <title>Set <varname>subs_table</varname> parameter:</title>
-                <programlisting format="linespecific">
+			</para>
+			<para>
+				<emphasis>
+			Default value is <quote>sca_subscriptions</quote>.
+				</emphasis>
+			</para>
+			<example>
+				<title>Set <varname>subs_table</varname> parameter:</title>
+				<programlisting format="linespecific">
 ...
 modparam( "sca", "subs_table", "call_info_subscriptions" )
 ...
-                </programlisting>
-            </example>
-        </section>
+				</programlisting>
+			</example>
+		</section>
 
 	<section id="sca.p.db_update_interval">
-	    <title><varname>db_update_interval</varname> (integer)</title>
-	    <para>
+		<title><varname>db_update_interval</varname> (integer)</title>
+		<para>
 		Period in seconds between writes of call-info subscriber
 		information to the database.
-	    </para>
-	    <para>
+		</para>
+		<para>
 		<emphasis>
-		    Default value is 300 (5 minutes).
+			Default value is 300 (5 minutes).
 		</emphasis>
-	    </para>
-	    <example>
+		</para>
+		<example>
 		<title>Set <varname>db_update_interval</varname>:</title>
 		<programlisting format="linespecific">
 ...
 modparam( "sca", "db_update_interval", 120 )
 ...
 		</programlisting>
-	    </example>
+		</example>
+	</section>
 	</section>
-    </section>
 
-    <section>
+	<section>
 	<title>Functions</title>
 	<section id="sca.f.sca_handle_subscribe">
-	    <title>
+		<title>
 		<function moreinfo="none">sca_handle_subscribe()</function>
-	    </title>
-	    <para>
+		</title>
+		<para>
 		The function handling call-info and line-seize SUBSCRIBE
 		requests. It stores or updates the subscriptions in shared
 		memory, and sends NOTIFYs to the subscriber and other
 		members of the group as needed.
-	    </para>
-	    <para>
+		</para>
+		<para>
 		For example, a line-seize SUBSCRIBE will cause the module to
 		reserve an appearance index for the subscriber; send a
 		line-seize NOTIFY to the subscriber indicating which appearance
 		index it must use; and send call-info NOTIFYs to other
 		subscribers to the address-of-record letting them know the
 		appearance is off hook.
-	    </para>
-	    <para>
+		</para>
+		<para>
 		This function can be used from the REQUEST_ROUTE.
-	    </para>
-	    <para>
+		</para>
+		<para>
 		<emphasis>Return code:</emphasis>
 		<itemizedlist>
-		    <listitem>
-		    <para>
+			<listitem>
+			<para>
 			<emphasis>1 - successful</emphasis>
-		    </para>
-		    </listitem>
+			</para>
+			</listitem>
 
-		    <listitem>
-		    <para>
+			<listitem>
+			<para>
 			<emphasis>-1 - failed, error logged</emphasis>
-		    </para>
-		    </listitem>
+			</para>
+			</listitem>
 		</itemizedlist>
-	    </para>
-	    <example>
+		</para>
+		<example>
 		<title><function>sca_handle_subscribe</function> usage:</title>
 		<programlisting format="linespecific">
 ...
 if ( is_method( "SUBSCRIBE" )) {
-    if ( $hdr(Event) == "call-info" || $hdr(Event) == "line-seize" ) {
+	if ( $hdr(Event) == "call-info" || $hdr(Event) == "line-seize" ) {
 	sca_handle_subscribe();
 	exit;
-    }
+	}
 }
 ...
 		</programlisting>
-	    </example>
+		</example>
 	</section>
 
-        <section id="sca.f.sca_call_info_update">
-            <title>
-                <function moreinfo="none">sca_call_info_update()</function>
-            </title>
-            <para>
+		<section id="sca.f.sca_call_info_update">
+			<title>
+				<function moreinfo="none">sca_call_info_update()</function>
+			</title>
+			<para>
 		The sca_call_info_update function updates call state for
 		SCA appearances. If a request or response packet contains
 		a Call-Info header, the function extracts call state from
@@ -333,238 +333,238 @@ if ( is_method( "SUBSCRIBE" )) {
 		AoRs, the function looks up the appearance by dialog and
 		updates call state as needed, sending NOTIFYs to members of
 		the group if the call state has changed.
-            </para>
-	    <para>
+			</para>
+		<para>
 		The sca_call_info_update function updates call state for
 		INVITE, CANCEL, BYE, PRACK and REFER requests and responses.
-	    </para>
-            <para>
-                This function can be used from the REQUEST_ROUTE, REPLY_ROUTE,
+		</para>
+			<para>
+				This function can be used from the REQUEST_ROUTE, REPLY_ROUTE,
 		and FAILURE_ROUTE.
-            </para>
-            <para>
-                <emphasis>Return code:</emphasis>
-                <itemizedlist>
-                    <listitem>
-                    <para>
-                        <emphasis>1 - successful</emphasis>
-                    </para>
-                    </listitem>
+			</para>
+			<para>
+				<emphasis>Return code:</emphasis>
+				<itemizedlist>
+					<listitem>
+					<para>
+						<emphasis>1 - successful</emphasis>
+					</para>
+					</listitem>
 
-                    <listitem>
-                    <para>
-                        <emphasis>-1 - failed, error logged</emphasis>
-                    </para>
-                    </listitem>
-                </itemizedlist>
-            </para>
-            <example>
-                <title><function>sca_call_info_update</function> usage:</title>
-                <programlisting format="linespecific">
+					<listitem>
+					<para>
+						<emphasis>-1 - failed, error logged</emphasis>
+					</para>
+					</listitem>
+				</itemizedlist>
+			</para>
+			<example>
+				<title><function>sca_call_info_update</function> usage:</title>
+				<programlisting format="linespecific">
 ...
 route
 {
 ...
-    sca_call_info_update();
+	sca_call_info_update();
 ...
 }
 
 onreply_route[REPLY_ROUTE]
 {
 ...
-    if ( status =~ "[456][0-9][0-9]" ) {
+	if ( status =~ "[456][0-9][0-9]" ) {
 	# don't update SCA state here, since there may be
 	# failure route processing (e.g., call forwarding).
 	# update state in failure route instead.
 	break;
-    }
+	}
 
-    sca_call_info_update();
+	sca_call_info_update();
 ...
 }
 
 failure_route[FAILURE_ROUTE]
 {
 ...
-    sca_call_info_update();
+	sca_call_info_update();
 ...
 }
 ...
-                </programlisting>
-            </example>
-        </section>
-    </section>
+				</programlisting>
+			</example>
+		</section>
+	</section>
 
-    <section>
+	<section>
 	<title>Exported RPC Commands</title>
 
 	<section id="sca.r.all_subscriptions">
-	    <title><varname>sca.all_subscriptions</varname></title>
-	    <para>
+		<title><varname>sca.all_subscriptions</varname></title>
+		<para>
 		List all current call-info and line-seize subscriptions.
-	    </para>
-	    <para>
+		</para>
+		<para>
 		Name: <emphasis>sca.all_subscriptions</emphasis>
-	    </para>
-	    <para>
+		</para>
+		<para>
 		Parameters: <emphasis>none</emphasis>
-	    </para>
-	    <para>
+		</para>
+		<para>
 		Example:
-	    </para>
-	    <programlisting format="linespecific">
-	    &sercmd; sca.all_subscriptions
-	    </programlisting>
+		</para>
+		<programlisting format="linespecific">
+		&sercmd; sca.all_subscriptions
+		</programlisting>
 	</section>
 
 	<section id="sca.r.all_appearances">
-            <title><varname>sca.all_appearances</varname></title>
-            <para>
+			<title><varname>sca.all_appearances</varname></title>
+			<para>
 		List all SCA appearances with non-idle state.
-            </para>
-            <para>
-                Name: <emphasis>sca.all_appearances</emphasis>
-            </para>
-            <para>
-                Parameters: <emphasis>none</emphasis>
-            </para>
-            <para>
-                Example:
-            </para>
-            <programlisting format="linespecific">
-            &sercmd; sca.all_appearances
-            </programlisting>
-        </section>
+			</para>
+			<para>
+				Name: <emphasis>sca.all_appearances</emphasis>
+			</para>
+			<para>
+				Parameters: <emphasis>none</emphasis>
+			</para>
+			<para>
+				Example:
+			</para>
+			<programlisting format="linespecific">
+			&sercmd; sca.all_appearances
+			</programlisting>
+		</section>
 
-        <section id="sca.r.seize_appearance">
-            <title><varname>sca.seize_appearance</varname></title>
-            <para>
+		<section id="sca.r.seize_appearance">
+			<title><varname>sca.seize_appearance</varname></title>
+			<para>
 		Seize an appearance index for a specific contact within an
 		SCA group, and notify other members of the group that the
 		appearance is off hook. Useful for testing SCA signaling.
-            </para>
-            <para>
-                Name: <emphasis>sca.seize_appearance</emphasis>
-            </para>
-            <para>
-                Parameters: <emphasis>2</emphasis>
-            </para>
-	    <itemizedlist>
+			</para>
+			<para>
+				Name: <emphasis>sca.seize_appearance</emphasis>
+			</para>
+			<para>
+				Parameters: <emphasis>2</emphasis>
+			</para>
+		<itemizedlist>
 		<listitem>
 		<para>
-		    <emphasis>SCA Address-of-Record</emphasis>
+			<emphasis>SCA Address-of-Record</emphasis>
 		</para>
 		</listitem>
 		<listitem>
 		<para>
-		    <emphasis>SCA Contact URI</emphasis>
+			<emphasis>SCA Contact URI</emphasis>
 		</para>
 		</listitem>
-	    </itemizedlist>
-            <para>
-                Example:
-            </para>
-            <programlisting format="linespecific">
-	    # seize next available appearance of sip:[email protected]
-	    # for contact sip:[email protected]
-            &sercmd; sca.seize_appearance sip:[email protected] sip:[email protected]
-            </programlisting>
-        </section>
+		</itemizedlist>
+			<para>
+				Example:
+			</para>
+			<programlisting format="linespecific">
+		# seize next available appearance of sip:[email protected]
+		# for contact sip:[email protected]
+			&sercmd; sca.seize_appearance sip:[email protected] sip:[email protected]
+			</programlisting>
+		</section>
 
-        <section id="sca.r.update_appearance">
-            <title><varname>sca.update_appearance</varname></title>
-            <para>
+		<section id="sca.r.update_appearance">
+			<title><varname>sca.update_appearance</varname></title>
+			<para>
 		Update the state of an in-use appearance index, and notify
 		other members of the group. Useful for testing SCA signaling.
-            </para>
-            <para>
-                Name: <emphasis>sca.update_appearance</emphasis>
-            </para>
-            <para>
-                Parameters: <emphasis>3 or 4</emphasis>
-            </para>
-	    <itemizedlist>
+			</para>
+			<para>
+				Name: <emphasis>sca.update_appearance</emphasis>
+			</para>
+			<para>
+				Parameters: <emphasis>3 or 4</emphasis>
+			</para>
+		<itemizedlist>
 		<listitem>
 		<para>
-		    <emphasis>SCA Address-of-Record</emphasis>
+			<emphasis>SCA Address-of-Record</emphasis>
 		</para>
 		</listitem>
 		<listitem>
 		<para>
-		    <emphasis>Index of In-Use Appearance</emphasis>
+			<emphasis>Index of In-Use Appearance</emphasis>
 		</para>
 		</listitem>
 		<listitem>
 		<para>
-		    <emphasis>Appearance State</emphasis>
-		    (seized, ringing, progressing, active, held, held-private)
+			<emphasis>Appearance State</emphasis>
+			(seized, ringing, progressing, active, held, held-private)
 		</para>
 		</listitem>
 		<listitem>
 		<para>
-		    <emphasis>Appearance Display Info</emphasis> (Optional)
+			<emphasis>Appearance Display Info</emphasis> (Optional)
 		</para>
 		</listitem>
-	    </itemizedlist>
-            <para>
-                Example:
-            </para>
-            <programlisting format="linespecific">
-	    # update in-use appearance index 3 of sip:[email protected]
-	    # state held.
-            &sercmd; sca.update_appearance sip:[email protected] 3 held
-            </programlisting>
-        </section>
+		</itemizedlist>
+			<para>
+				Example:
+			</para>
+			<programlisting format="linespecific">
+		# update in-use appearance index 3 of sip:[email protected]
+		# state held.
+			&sercmd; sca.update_appearance sip:[email protected] 3 held
+			</programlisting>
+		</section>
 
-        <section id="sca.r.release_appearance">
-            <title><varname>sca.release_appearance</varname></title>
-            <para>
+		<section id="sca.r.release_appearance">
+			<title><varname>sca.release_appearance</varname></title>
+			<para>
 		Set a non-idle appearance index to idle and NOTIFY
 		members of the group.
-            </para>
-            <para>
-                Name: <emphasis>sca.release_appearance</emphasis>
-            </para>
-            <para>
-                Parameters: <emphasis>2</emphasis>
-            </para>
-	    <itemizedlist>
+			</para>
+			<para>
+				Name: <emphasis>sca.release_appearance</emphasis>
+			</para>
+			<para>
+				Parameters: <emphasis>2</emphasis>
+			</para>
+		<itemizedlist>
 		<listitem>
 		<para>
-		    <emphasis>SCA Address-of-Record</emphasis>
+			<emphasis>SCA Address-of-Record</emphasis>
 		</para>
 		</listitem>
 		<listitem>
 		<para>
-		    <emphasis>Appearance Index</emphasis>
+			<emphasis>Appearance Index</emphasis>
 		</para>
 		</listitem>
-	    </itemizedlist>
-            <para>
-                Example:
-            </para>
-            <programlisting format="linespecific">
-	    # release appearance of sip:[email protected] with
-	    # appearance index 3
-            &sercmd; sca.release_appearance sip:[email protected] 3
-            </programlisting>
-        </section>
-    </section>
+		</itemizedlist>
+			<para>
+				Example:
+			</para>
+			<programlisting format="linespecific">
+		# release appearance of sip:[email protected] with
+		# appearance index 3
+			&sercmd; sca.release_appearance sip:[email protected] 3
+			</programlisting>
+		</section>
+	</section>
 
-    <section>
+	<section>
 	<title>Sample &kamailioconfig; with SCA</title>
 	<para>
-	    The following is a basic &kamailioconfig; providing Shared Call
-	    Appearances to local subscribers. It has been tested with
-	    Polycom handsets.
+		The following is a basic &kamailioconfig; providing Shared Call
+		Appearances to local subscribers. It has been tested with
+		Polycom handsets.
 	</para>
 	<example>
-	    <title>&kamailioconfig;</title>
-	    <programlisting format="linespecific">
+		<title>&kamailioconfig;</title>
+		<programlisting format="linespecific">
 ##
 <xi:include href="sca.cfg" parse="text" />
-	    </programlisting>
+		</programlisting>
 	</example>
-    </section>
+	</section>
 
 </chapter>