浏览代码

- carrierroute use autogenerated DB infrastructure
- adapt configuration, move some descriptions to DB scheme


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

Henning Westerholt 17 年之前
父节点
当前提交
6f0c167288
共有 3 个文件被更改,包括 53 次插入18 次删除
  1. 13 5
      lib/srdb1/schema/carrierfailureroute.xml
  2. 37 11
      lib/srdb1/schema/carrierroute.xml
  3. 3 2
      lib/srdb1/schema/route_tree.xml

+ 13 - 5
lib/srdb1/schema/carrierfailureroute.xml

@@ -12,7 +12,8 @@
 		  <version>1</version>
 		  <type db="mysql">&MYSQL_TABLE_TYPE;</type>
 		  <description>
-			  <db:para>This table is used by the carrierroute module to provide failure routing capabilities. More information is available at: http://www.kamailio.org/docs/modules/devel/carrierroute.html
+			  <db:para>This table is used by the carrierroute module to provide failure routing capabilities. It contains the 
+			  failureroute routing informations. More information is available at: http://www.kamailio.org/docs/modules/devel/carrierroute.html
 			  </db:para>
 		  </description>
 		  
@@ -23,7 +24,7 @@
 			  <autoincrement/>
 			  <primary/>
 			  <type db="dbtext">int,auto</type>
-			  <description>unique ID</description>
+			  <description>This column contains the unique identifier of a failure route.</description>
 		  </column>
 		  
 		  <column>
@@ -40,7 +41,9 @@
 			  <type>string</type>
 			  <size>&user_len;</size>
 			  <default/>
-			  <description>This column contains the route domain. Additional domains could be used for example as fallback.</description>
+			  <description>Name of column contains the rule domain. You can define several routing domains
+			  to have different routing rules. Maybe you use domain 0 for normal routing and domain 1 if
+			  domain 0 failed.</description>
 		  </column>
 		  
 		  <column>
@@ -48,7 +51,11 @@
 			  <type>string</type>
 			  <size>&user_len;</size>
 			  <default/>
-			  <description>This column contains the scan prefix, which define the matching portion of a phone number.</description>
+			  <description>Name of column contains the the scan prefixes. Scan prexies define the matching
+			  portion of a phone number, e.g. we have the scan prefixes 49721 and 49, the called number is
+			  49721913740, it matches 49721, because the longest match is taken. If no prefix matches,
+			  the number is not failure routed. To prevent this, an empty prefix value of <quote></quote>
+			  could be added.</description>
 		  </column>
 		  
 		  <column>
@@ -56,7 +63,8 @@
 			  <type>string</type>
 			  <size>&uri_len;</size>
 			  <default/>
-			  <description>This column contains the routing destination used for rule matching.</description>
+			  <description>Name of the column containing the host name of the last routing destination,
+			  using for rules matching.</description>
 		  </column>
 		  
 		  <column>

+ 37 - 11
lib/srdb1/schema/carrierroute.xml

@@ -12,7 +12,8 @@
 		  <version>2</version>
 		  <type db="mysql">&MYSQL_TABLE_TYPE;</type>
 		  <description>
-			  <db:para>This table is used by the carrierroute module to provides routing, balancing and blacklisting capabilities. More information is available at: http://www.kamailio.org/docs/modules/devel/carrierroute.html
+			  <db:para>This table is used by the carrierroute module to provides routing, balancing and blacklisting 
+			  capabilities. It contains the routing data. More information is available at: http://www.kamailio.org/docs/modules/devel/carrierroute.html
 			  </db:para>
 		  </description>
 		  
@@ -23,7 +24,7 @@
 			  <autoincrement/>
 			  <primary/>
 			  <type db="dbtext">int,auto</type>
-			  <description>unique ID</description>
+			  <description>Name of the column contains the unique identifier of a route.</description>
 		  </column>
 		  
 		  <column>
@@ -40,7 +41,9 @@
 			  <type>string</type>
 			  <size>&user_len;</size>
 			  <default/>
-			  <description>This column contains the route domain. Additional domains could be used for example as fallback.</description>
+			  <description>Name of column contains the rule domain. You can define several routing
+			  domains to have different routing rules. Maybe you use domain 0 for normal routing and
+			  domain 1 if domain 0 failed.</description>
 		  </column>
 		  
 		  <column>
@@ -48,7 +51,11 @@
 			  <type>string</type>
 			  <size>&user_len;</size>
 			  <default/>
-			  <description>This column contains the scan prefix, which define the matching portion of a phone number.</description>
+			  <description>Name of column contains the scan prefixes. Scan prefixes define
+			  the matching portion of a phone number, e.g. when we have the scan prefixes 49721
+			  and 49, the called number is 49721913740, it matches 49721, because the longest
+			  match is taken. If no prefix matches, the number is not routed. To prevent this,
+			  an empty prefix value of <quote></quote> could be added.</description>
 		  </column>
 		  
 		  <column>
@@ -64,14 +71,28 @@
 			  <type>unsigned int</type>
 			  <size>&flag_len;</size>
 			  <default>0</default>
-			  <description>This column contains the mask that is applied to the message flags before rule matching.</description>
+			  <description>This column contains the mask that is applied to the message flags before rule 
+			  matching.</description>
 		  </column>
 		  
 		  <column>
 			  <name>prob</name>
 			  <type>float</type>
 			  <default>0</default>
-			  <description>Name of column containing the probability. The probability value is used to distribute the traffic between several gateways.</description>
+			  <description><para>
+			  Name of column contains the probability. The probability value is used to
+			  distribute the traffic between several gateways. Let's say 70 % of the
+			  traffic shall be routed to gateway A, the other 30 % shall be routed to
+			  gateway B, we define a rule for gateway A with a prob value of 0.7 and a
+			  rule for gateway B with a prob value of 0.3.
+			  </para>
+			  <para>
+			  If all probabilities for a given prefix, tree and domain don't add to 100%,
+			  the prefix values will be adjusted according the given prob values. E.g. if
+			  three hosts with prob values of 0.5, 0.5 and 0.4 are defined, the resulting
+			  probabilities are 35.714, 35.714 and 28.571%. But its better to choose meaningful
+			  values in the first place because of clarity.
+			  </para></description>
 		  </column>
 		  
 		  <column>
@@ -79,7 +100,7 @@
 			  <type>unsigned int</type>
 			  <size>&flag_len;</size>
 			  <default>0</default>
-			  <description>Name of the column containing the number of digits to be stripped of the userpart of an URI before prepending rewrite_prefix.</description>
+			  <description>Name of the column contains the number of digits to be stripped of the userpart of an URI before prepending rewrite_prefix.</description>
 		  </column>
 		  
 		  <column>
@@ -87,7 +108,9 @@
 			  <type>string</type>
 			  <size>&uri_len;</size>
 			  <default/>
-			  <description>Name of column containing rewrite prefixes. Here you can define a rewrite prefix for the localpart of the SIP URI.</description>
+			  <description>Name of column contains the rewrite prefixes. Here you can define a rewrite prefix
+			  for the localpart of the SIP URI. An empty field represents a blacklist entry, anything else
+			  is put as domain part into the Request URI of the SIP message.</description>
 		  </column>
 		  
 		  <column>
@@ -95,7 +118,8 @@
 			  <type>string</type>
 			  <size>&user_len;</size>
 			  <default/>
-			  <description>Rewrite prefix for the localpart of the SIP URI.</description>
+			  <description>Name of column contains the rewrite prefixes. Here you can define a rewrite
+			  prefix for the localpart of the SIP URI.</description>
 		  </column>
 		  
 		  <column>
@@ -103,7 +127,8 @@
 			  <type>string</type>
 			  <size>&user_len;</size>
 			  <default/>
-			  <description>Rewrite suffix for the localpart of the SIP URI.</description>
+			  <description>Name of column contains the rewrite suffixes. Here you can define a rewrite
+			  suffix for the localpart of the SIP URI.</description>
 		  </column>
 		  
 		  <column>
@@ -112,6 +137,7 @@
 			  <size>&description_len;</size>
 			  <null/>
 			  <default><null/></default>
-			  <description>A comment for the route entry, useful for larger routing tables.</description>
+			  <description>A comment for the route entry, useful for larger routing tables.
+			  The comment is also displayed by the fifo cmd "cr_dump_routes".</description>
 		  </column>
 	  </table>

+ 3 - 2
lib/srdb1/schema/route_tree.xml

@@ -12,7 +12,8 @@
 		  <version>1</version>
 		  <type db="mysql">&MYSQL_TABLE_TYPE;</type>
 		  <description>
-			  <db:para>This table is used by the carrierroute module to provides routing, balancing and blacklisting capabilities. More information is available at: &KAMAILIO_MOD_DOC;carrierroute.html
+			  <db:para>This table is used by the carrierroute module to provides routing, balancing and blacklisting capabilities. It contains the existing carriers, consisting of the ids and corresponding names. More
+			  information is available at: &KAMAILIO_MOD_DOC;carrierroute.html
 			  </db:para>
 		  </description>
 		  
@@ -24,7 +25,7 @@
 			  <autoincrement/>
 			  <primary/>
 			  <type db="dbtext">int,auto</type>
-			  <description>unique ID</description>
+			  <description>Name of the column containing the unique identifier of a carrier.</description>
 		  </column>
 		  
 		  <column>