Browse code

- 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 authored on 05/01/2009 16:01:35
Showing 2 changed files
... ...
@@ -65,10 +65,12 @@ Henning Westerholt
65 65
               1.5.6. cr_add_host
66 66
               1.5.7. cr_delete_host
67 67
 
68
-        1.6. Examples
68
+        1.6. Configuration examples
69 69
         1.7. Installation and Running
70 70
 
71 71
               1.7.1. Database setup
72
+              1.7.2. Database examples
73
+              1.7.3. User specific routing
72 74
 
73 75
    2. Module parameter for database access.
74 76
 
... ...
@@ -133,7 +135,8 @@ Henning Westerholt
133 133
           carrierfailureroute table
134 134
 
135 135
    1.23. Example database content - carrier_name table
136
-   1.24. Necessary extensions for the user table
136
+   1.24. Example database content - domain_name table
137
+   1.25. Necessary extensions for the user table
137 138
    2.1. Set db_url parameter
138 139
    2.2. Set carrierroute_table parameter
139 140
    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"
671 671
 kamctl fifo cr_delete_host "-d proxy -p 49 -h proxy1 -w 0.25"
672 672
 ...
673 673
 
674
-1.6. Examples
674
+1.6. Configuration examples
675 675
 
676 676
    Example 1.17. Configuration example - Routing to default tree
677 677
 ...
... ...
@@ -827,6 +830,8 @@ domain register {
827 827
    For a minimal configuration either use the config file given
828 828
    above, or insert some data into the tables of the module.
829 829
 
830
+1.7.2. Database examples
831
+
830 832
    Example 1.20. Example database content - carrierroute table
831 833
 ...
832 834
 +----+---------+--------+-------------+-------+------+---------------+
... ...
@@ -858,13 +863,13 @@ domain register {
858 858
    are not reachable. Two more fallback rules (domain 2 and 3) for
859 859
    carrier 1 are also supplied to support the functionality of the
860 860
    carrierfailureroute table example that is provided in the next
861
-   section. The usage of strings for the domains is also possible,
862
-   for example at carrier 3.
861
+   section.
863 862
 
864
-   This table provides also a "carrier1" routing rule for the "49"
865
-   prefix, that is only choosen if some message flags are set. If
866
-   this flags are not set, the other two rules are used. The
867
-   "strip", "mask" and "comment" colums are omitted for brevity.
863
+   This table provides also a "carrier 1" routing rule for the
864
+   "49" prefix, that is only choosen if some message flags are
865
+   set. If this flags are not set, the other two rules are used.
866
+   The "strip", "mask" and "comment" colums are omitted for
867
+   brevity.
868 868
 
869 869
    Example 1.21. Example database content - simple
870 870
    carrierfailureroute table
... ...
@@ -929,12 +934,28 @@ domain register {
929 929
    This table contains the mapping of the carrier id to actual
930 930
    names.
931 931
 
932
+   Example 1.24. Example database content - domain_name table
933
+...
934
++----+----------+
935
+| id | carrier  |
936
++----+----------+
937
+|  1 | domain1  |
938
+|  2 | domain2  |
939
+|  3 | domain3  |
940
++----+----------+
941
+...
942
+
943
+   This table contains the mapping of the domain id to actual
944
+   names.
945
+
946
+1.7.3. User specific routing
947
+
932 948
    For a functional routing the "cr_preferred_carrier" column must
933 949
    be added to the subscriber table (or to the table and column
934 950
    that you specified as modul parameter) to choose the actual
935 951
    carrier for the users.
936 952
 
937
-   Example 1.24. Necessary extensions for the user table
953
+   Example 1.25. Necessary extensions for the user table
938 954
 
939 955
    Suggested changes:
940 956
 ...
... ...
@@ -795,7 +795,7 @@ kamctl fifo cr_delete_host "-d proxy -p 49 -h proxy1 -w 0.25"
795 795
 	</section>
796 796
     </section>
797 797
     <section>
798
-	<title>Examples</title>
798
+	<title>Configuration examples</title>
799 799
 	<example>
800 800
 		<title>Configuration example - Routing to default tree</title>
801 801
 		<programlisting format="linespecific">
... ...
@@ -965,6 +965,10 @@ domain register {
965 965
 			For a minimal configuration either use the config file given above, or
966 966
 			insert some data into the tables of the module.
967 967
 		</para>
968
+	</section>
969
+	
970
+	<section>
971
+		<title>Database examples</title>
968 972
 	<example>
969 973
 		<title>Example database content - carrierroute table</title>
970 974
 		<programlisting format="linespecific">
... ...
@@ -998,11 +1002,10 @@ domain register {
998 998
 			with the domain 1, that can be used for example as fallback if the gateways
999 999
 			in domain 0 are not reachable. Two more fallback rules (domain 2 and 3) for 
1000 1000
 			carrier 1 are also supplied to support the functionality of the carrierfailureroute
1001
-			table example that is provided in the next section. The usage of strings
1002
-			for the domains is also possible, for example at carrier 3.
1001
+			table example that is provided in the next section.
1003 1002
 		</para>
1004 1003
 		<para>
1005
-			This table provides also a <quote>carrier1</quote> routing rule for the
1004
+			This table provides also a <quote>carrier 1</quote> routing rule for the
1006 1005
 			<quote>49</quote> prefix, that is only choosen if some message flags are set.
1007 1006
 			If this flags are not set, the other two rules are used. The <quote>strip</quote>,
1008 1007
 			<quote>mask</quote> and <quote>comment</quote> colums are omitted for brevity.
... ...
@@ -1079,6 +1082,27 @@ domain register {
1079 1079
 		<para>
1080 1080
 			This table contains the mapping of the carrier id to actual names.
1081 1081
 		</para>
1082
+		<example>
1083
+		<title>Example database content - domain_name table</title>
1084
+		<programlisting format="linespecific">
1085
+...
1086
++----+----------+
1087
+| id | carrier  |
1088
++----+----------+
1089
+|  1 | domain1  |
1090
+|  2 | domain2  |
1091
+|  3 | domain3  |
1092
++----+----------+
1093
+...
1094
+		</programlisting>
1095
+		</example>
1096
+		<para>
1097
+			This table contains the mapping of the domain id to actual names.
1098
+		</para>
1099
+
1100
+	</section>
1101
+	<section>
1102
+		<title>User specific routing</title>
1082 1103
 		<para>
1083 1104
 			For a functional routing the <quote>cr_preferred_carrier</quote> column must
1084 1105
 			be added to the subscriber table (or to the table and column that you specified