Pārlūkot izejas kodu

- add example for new domain_name table
- restructure examples a bit


git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@5420 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt 16 gadi atpakaļ
vecāks
revīzija
e098b96310

+ 31 - 10
modules/carrierroute/README

@@ -65,10 +65,12 @@ Henning Westerholt
               1.5.6. cr_add_host
               1.5.6. cr_add_host
               1.5.7. cr_delete_host
               1.5.7. cr_delete_host
 
 
-        1.6. Examples
+        1.6. Configuration examples
         1.7. Installation and Running
         1.7. Installation and Running
 
 
               1.7.1. Database setup
               1.7.1. Database setup
+              1.7.2. Database examples
+              1.7.3. User specific routing
 
 
    2. Module parameter for database access.
    2. Module parameter for database access.
 
 
@@ -133,7 +135,8 @@ Henning Westerholt
           carrierfailureroute table
           carrierfailureroute table
 
 
    1.23. Example database content - carrier_name table
    1.23. Example database content - carrier_name table
-   1.24. Necessary extensions for the user table
+   1.24. Example database content - domain_name table
+   1.25. Necessary extensions for the user table
    2.1. Set db_url parameter
    2.1. Set db_url parameter
    2.2. Set carrierroute_table parameter
    2.2. Set carrierroute_table parameter
    2.3. Set carrierroute_id_col parameter
    2.3. Set carrierroute_id_col parameter
@@ -671,7 +674,7 @@ kamctl fifo cr_add_host "-d proxy -p 49 -h proxy1 -w 0.25"
 kamctl fifo cr_delete_host "-d proxy -p 49 -h proxy1 -w 0.25"
 kamctl fifo cr_delete_host "-d proxy -p 49 -h proxy1 -w 0.25"
 ...
 ...
 
 
-1.6. Examples
+1.6. Configuration examples
 
 
    Example 1.17. Configuration example - Routing to default tree
    Example 1.17. Configuration example - Routing to default tree
 ...
 ...
@@ -827,6 +830,8 @@ domain register {
    For a minimal configuration either use the config file given
    For a minimal configuration either use the config file given
    above, or insert some data into the tables of the module.
    above, or insert some data into the tables of the module.
 
 
+1.7.2. Database examples
+
    Example 1.20. Example database content - carrierroute table
    Example 1.20. Example database content - carrierroute table
 ...
 ...
 +----+---------+--------+-------------+-------+------+---------------+
 +----+---------+--------+-------------+-------+------+---------------+
@@ -858,13 +863,13 @@ domain register {
    are not reachable. Two more fallback rules (domain 2 and 3) for
    are not reachable. Two more fallback rules (domain 2 and 3) for
    carrier 1 are also supplied to support the functionality of the
    carrier 1 are also supplied to support the functionality of the
    carrierfailureroute table example that is provided in the next
    carrierfailureroute table example that is provided in the next
-   section. The usage of strings for the domains is also possible,
-   for example at carrier 3.
+   section.
 
 
-   This table provides also a "carrier1" routing rule for the "49"
-   prefix, that is only choosen if some message flags are set. If
-   this flags are not set, the other two rules are used. The
-   "strip", "mask" and "comment" colums are omitted for brevity.
+   This table provides also a "carrier 1" routing rule for the
+   "49" prefix, that is only choosen if some message flags are
+   set. If this flags are not set, the other two rules are used.
+   The "strip", "mask" and "comment" colums are omitted for
+   brevity.
 
 
    Example 1.21. Example database content - simple
    Example 1.21. Example database content - simple
    carrierfailureroute table
    carrierfailureroute table
@@ -929,12 +934,28 @@ domain register {
    This table contains the mapping of the carrier id to actual
    This table contains the mapping of the carrier id to actual
    names.
    names.
 
 
+   Example 1.24. Example database content - domain_name table
+...
++----+----------+
+| id | carrier  |
++----+----------+
+|  1 | domain1  |
+|  2 | domain2  |
+|  3 | domain3  |
++----+----------+
+...
+
+   This table contains the mapping of the domain id to actual
+   names.
+
+1.7.3. User specific routing
+
    For a functional routing the "cr_preferred_carrier" column must
    For a functional routing the "cr_preferred_carrier" column must
    be added to the subscriber table (or to the table and column
    be added to the subscriber table (or to the table and column
    that you specified as modul parameter) to choose the actual
    that you specified as modul parameter) to choose the actual
    carrier for the users.
    carrier for the users.
 
 
-   Example 1.24. Necessary extensions for the user table
+   Example 1.25. Necessary extensions for the user table
 
 
    Suggested changes:
    Suggested changes:
 ...
 ...

+ 28 - 4
modules/carrierroute/doc/carrierroute_admin.xml

@@ -795,7 +795,7 @@ kamctl fifo cr_delete_host "-d proxy -p 49 -h proxy1 -w 0.25"
 	</section>
 	</section>
     </section>
     </section>
     <section>
     <section>
-	<title>Examples</title>
+	<title>Configuration examples</title>
 	<example>
 	<example>
 		<title>Configuration example - Routing to default tree</title>
 		<title>Configuration example - Routing to default tree</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
@@ -965,6 +965,10 @@ domain register {
 			For a minimal configuration either use the config file given above, or
 			For a minimal configuration either use the config file given above, or
 			insert some data into the tables of the module.
 			insert some data into the tables of the module.
 		</para>
 		</para>
+	</section>
+	
+	<section>
+		<title>Database examples</title>
 	<example>
 	<example>
 		<title>Example database content - carrierroute table</title>
 		<title>Example database content - carrierroute table</title>
 		<programlisting format="linespecific">
 		<programlisting format="linespecific">
@@ -998,11 +1002,10 @@ domain register {
 			with the domain 1, that can be used for example as fallback if the gateways
 			with the domain 1, that can be used for example as fallback if the gateways
 			in domain 0 are not reachable. Two more fallback rules (domain 2 and 3) for 
 			in domain 0 are not reachable. Two more fallback rules (domain 2 and 3) for 
 			carrier 1 are also supplied to support the functionality of the carrierfailureroute
 			carrier 1 are also supplied to support the functionality of the carrierfailureroute
-			table example that is provided in the next section. The usage of strings
-			for the domains is also possible, for example at carrier 3.
+			table example that is provided in the next section.
 		</para>
 		</para>
 		<para>
 		<para>
-			This table provides also a <quote>carrier1</quote> routing rule for the
+			This table provides also a <quote>carrier 1</quote> routing rule for the
 			<quote>49</quote> prefix, that is only choosen if some message flags are set.
 			<quote>49</quote> prefix, that is only choosen if some message flags are set.
 			If this flags are not set, the other two rules are used. The <quote>strip</quote>,
 			If this flags are not set, the other two rules are used. The <quote>strip</quote>,
 			<quote>mask</quote> and <quote>comment</quote> colums are omitted for brevity.
 			<quote>mask</quote> and <quote>comment</quote> colums are omitted for brevity.
@@ -1079,6 +1082,27 @@ domain register {
 		<para>
 		<para>
 			This table contains the mapping of the carrier id to actual names.
 			This table contains the mapping of the carrier id to actual names.
 		</para>
 		</para>
+		<example>
+		<title>Example database content - domain_name table</title>
+		<programlisting format="linespecific">
+...
++----+----------+
+| id | carrier  |
++----+----------+
+|  1 | domain1  |
+|  2 | domain2  |
+|  3 | domain3  |
++----+----------+
+...
+		</programlisting>
+		</example>
+		<para>
+			This table contains the mapping of the domain id to actual names.
+		</para>
+
+	</section>
+	<section>
+		<title>User specific routing</title>
 		<para>
 		<para>
 			For a functional routing the <quote>cr_preferred_carrier</quote> column must
 			For a functional routing the <quote>cr_preferred_carrier</quote> column must
 			be added to the subscriber table (or to the table and column that you specified
 			be added to the subscriber table (or to the table and column that you specified