Forráskód Böngészése

drouting: added note about dr_gateways

- it can link to dr_gw_lists with '#'
- reported by Marc Cardinal, FS#96
Daniel-Constantin Mierla 14 éve
szülő
commit
07959c8330
2 módosított fájl, 86 hozzáadás és 82 törlés
  1. 81 79
      modules_k/drouting/README
  2. 5 3
      modules_k/drouting/doc/drouting_admin.xml

+ 81 - 79
modules_k/drouting/README

@@ -6,10 +6,10 @@ Edited by
 
 Anca-Maria Vamanu
 
-   Copyright © 2005-2008 voice-system.ro
+   Copyright © 2005-2008 voice-system.ro
    Revision History
    Revision $Revision: 4473 $ $Date: 2008-07-12 00:16:22 +0300 (Sat, 12
-   Jul 2008) $
+                              Jul 2008) $
      __________________________________________________________________
 
    Table of Contents
@@ -233,7 +233,7 @@ Chapter 1. Admin Guide
 
 1.4.1. Gateway Addresses
 
-   Default name for the table storing gateway addresses is "dr_gateways".
+   Default name for the table storing gateway addresses is “dr_gateways�.
    Gateway addresses are stored in a separate table because of need to
    access them independent of Dynamic Routing processing (e.g., adding/
    removing gateway PRI prefix before/after performing other operation --
@@ -269,12 +269,12 @@ Chapter 1. Admin Guide
    group of destinations is delimited by semi-colon char. inside the whole
    destination list ( like: 2,4;5,78,23;4;7;2 ). The destinations from
    within a group may be act differently (like load-balancing, random
-   selection, etc), depending of the "sort_order" module parameter - more
+   selection, etc), depending of the “sort_order� module parameter - more
    about this is available under the module paramters section.
 
 1.4.3. Routing Rules
 
-   Default name for the table storing rule definitions is "dr_rules".
+   Default name for the table storing rule definitions is “dr_rules�.
 
    Table 1.3. Definition of dr_rules table
    Column name     Type     Default            Description
@@ -303,18 +303,18 @@ Chapter 1. Admin Guide
        draft 09):
        Table 1.4. Time recurrence attributes
 
-   Attribute Description
-   dastard Start of interval (RFC 2445 DATE-TIME)
-   duration Length of interval (RFC 2445 DURATION)
-   freq Frequency of recurrence (secondly,minutely,hourly, daily,weekly,
-   monthly, or yearly).
-   until bound of recurrence (RFC 2445 DATE-TIME)
-   interval How often the recurrence repeats
-   byday List of days of the week
-   bymonthday List of days of the month
-   byyearday List of days of the year
-   byweekno List of weeks of the year
-   bymonth List of months of the year
+     Attribute                            Description
+     dastard    Start of interval (RFC 2445 DATE-TIME)
+     duration   Length of interval (RFC 2445 DURATION)
+     freq       Frequency of recurrence (secondly,minutely,hourly, daily,weekly,
+                monthly, or yearly).
+     until      bound of recurrence (RFC 2445 DATE-TIME)
+     interval   How often the recurrence repeats
+     byday      List of days of the week
+     bymonthday List of days of the month
+     byyearday  List of days of the year
+     byweekno   List of weeks of the year
+     bymonth    List of months of the year
        The value stored in database has the format of:
        <dtstart>|<duration>|<freq>|<until>|<interval>|<byday>|<bymonthday>
        |<byyearday>|<byweekno>|<bymonth>
@@ -324,48 +324,48 @@ Chapter 1. Admin Guide
        Detailed description of time recurrence attributes:
           + dtstart - specifies the beginning of the first period.
           + duration - specifies the duration of the period. For a
-            recurring interval, the "duration" parameter MUST be small
+            recurring interval, the “duration� parameter MUST be small
             enough such that subsequent intervals do not overlap. For
             non-recurring intervals, durations of any positive length are
-            permitted, zero-length duration means "forever".
+            permitted, zero-length duration means “forever�.
             Negative-length durations are not allowed.
-          + freq - takes one of the following values: "daily", to specify
+          + freq - takes one of the following values: “daily�, to specify
             repeating periods based on an interval of a day or more;
-            "weekly", to specify repeating periods based on an interval of
-            a week or more; "monthly", to specify repeating periods based
-            on an interval of a month or more; and "yearly", to specify
+            “weekly�, to specify repeating periods based on an interval of
+            a week or more; “monthly�, to specify repeating periods based
+            on an interval of a month or more; and “yearly�, to specify
             repeating periods based on an interval of a year or more.
             These values are not case-sensitive.
           + until - defines an iCalendar COS DATE or DATE-TIME value which
             bounds the recurrence rule in an inclusive manner. If the
-            value specified by "until" is synchronized with the specified
+            value specified by “until� is synchronized with the specified
             recurrence, this date or date-time becomes the last instance
             of the recurrence. If not present, the recurrence is
             considered to repeat forever.
           + interval - contains a positive integer representing how often
-            the recurrence rule repeats. The default value is "1", meaning
-            every day for a "daily" rule, every week for a "weekly" rule,
-            every month for a "monthly" rule and every year for a "yearly"
+            the recurrence rule repeats. The default value is “1�, meaning
+            every day for a “daily� rule, every week for a “weekly� rule,
+            every month for a “monthly� rule and every year for a “yearly�
             rule.
           + interval - contains a positive integer representing how often
-            the recurrence rule repeats. The default value is "1", meaning
-            every day for a "daily" rule, every week for a "weekly" rule,
-            every month for a "monthly" rule and every year for a "yearly"
+            the recurrence rule repeats. The default value is “1�, meaning
+            every day for a “daily� rule, every week for a “weekly� rule,
+            every month for a “monthly� rule and every year for a “yearly�
             rule.
           + byday - specifies a comma-separated list of days of the week.
-            "MO" indicates Monday; "TU" indicates Tuesday; "WE" indicates
-            Wednesday; "TH" indicates Thursday; "FR" indicates Friday;
-            "SA" indicates Saturday; "SU" indicates Sunday. These values
+            “MO� indicates Monday; “TU� indicates Tuesday; “WE� indicates
+            Wednesday; “TH� indicates Thursday; “FR� indicates Friday;
+            “SA� indicates Saturday; “SU� indicates Sunday. These values
             are not case-sensitive.
-            Each "byday" value can also be preceded by a positive (+n) or
+            Each “byday� value can also be preceded by a positive (+n) or
             negative (-n) integer. If present, this indicates the nth
-            occurrence of the specific day within the "monthly" or
-            "yearly" recurrence. For example, within a "monthly" rule,
+            occurrence of the specific day within the “monthly� or
+            “yearly� recurrence. For example, within a “monthly� rule,
             +1MO (or simply 1MO) represents the first Monday within the
             month, whereas -1MO represents the last Monday of the month.
             If an integer modifier is not present, it means all days of
             this type within the specified frequency. For example, within
-            a "monthly" rule, MO represents all Mondays within the month.
+            a “monthly� rule, MO represents all Mondays within the month.
           + bymonthday - parameter specifies a comma-separated list of
             days of the month. Valid values are 1 to 31 or -31 to -1. For
             example, -10 represents the tenth to the last day of the
@@ -379,37 +379,37 @@ Chapter 1. Admin Guide
             to -1.
           + bymonth - parameter specifies a comma-separated list of months
             of the year. Valid values are 1 to 12.
-       A recurrence is specified by including the "freq" parameter, which
+       A recurrence is specified by including the “freq� parameter, which
        indicates the type of recurrence rule. Parameters other than
-       "dtstart" and "duration" SHOULD NOT be specified unless "freq" is
+       “dtstart� and “duration� SHOULD NOT be specified unless “freq� is
        present.
        If byxxx parameter values are found which are beyond the available
-       scope (ie, bymonthday="30" in February), they are simply ignored.
+       scope (ie, bymonthday=“30� in February), they are simply ignored.
        Byxxx parameters modify the recurrence in some manner. Byxxx rule
        parts for a period of time which is the same or greater than the
        frequency generally reduce or limit the number of occurrences of
-       the recurrence generated. For example, freq="daily" bymonth="1"
+       the recurrence generated. For example, freq=“daily� bymonth=“1�
        reduces the number of recurrence instances from all days (if the
-       "bymonth" parameter is not present) to all days in January. Byxxx
+       “bymonth� parameter is not present) to all days in January. Byxxx
        parameters for a period of time less than the frequency generally
        increase or expand the number of occurrences of the recurrence. For
-       example, freq="yearly" bymonth="1,2" increases the number of days
-       within the yearly recurrence set from 1 (if "bymonth" parameter is
+       example, freq=“yearly� bymonth=“1,2� increases the number of days
+       within the yearly recurrence set from 1 (if “bymonth� parameter is
        not present) to 2.
        If multiple Byxxx parameters are specified, then after evaluating
-       the specified "freq" and "interval" parameters, the Byxxx
+       the specified “freq� and “interval� parameters, the Byxxx
        parameters are applied to the current set of evaluated occurrences
-       in the following order: "bymonth", "byweekno", "byyearday",
-       "bymonthday", "byday"; then "until" is evaluated.
+       in the following order: “bymonth�, “byweekno�, “byyearday�,
+       “bymonthday�, “byday�; then “until� is evaluated.
        Here is an example of evaluating multiple Byxxx parameters.
-       dtstart="19970105T083000" duration="10M" freq="yearly" interval="2"
-       bymonth="1" byday="SU"
-       First, the interval="2" would be applied to freq="yearly" to arrive
-       at "every other year" . Then, bymonth="1" would be applied to
-       arrive at "every January, every other year". Then, byday="SU" would
-       be applied to arrive at "every Sunday in January, every other year,
-       from 8:30 to 8:40 ". The appropriate minutes and hours have been
-       retrieved from the "dtstart" and "duration" parameters.
+       dtstart=“19970105T083000� duration=“10M� freq=“yearly� interval=“2�
+       bymonth=“1� byday=“SU�
+       First, the interval=“2� would be applied to freq=“yearly� to arrive
+       at “every other year� . Then, bymonth=“1� would be applied to
+       arrive at “every January, every other year�. Then, byday=“SU� would
+       be applied to arrive at “every Sunday in January, every other year,
+       from 8:30 to 8:40 �. The appropriate minutes and hours have been
+       retrieved from the “dtstart� and “duration� parameters.
     d. priority column
        If many rules are eligible, choose the one with highest priority.
     e. routeid column
@@ -419,9 +419,11 @@ Chapter 1. Admin Guide
        level.
     f. gwlist column
        A comma separated list of gateway identifiers corresponding to a
-       row in table "dr_gateways". The first gateway is tried first and if
-       failure the second one, and so one. If no gateway is left a
-       negative response is sent back to the user.
+       row in table “dr_gateways�. You can use a predefined list from the
+       table “dr_gw_lists� preceded by the character “#�. The first
+       gateway is tried first and if routing to it fails, then the second
+       one, and so one. If no gateway is left a negative response is sent
+       back to caller.
     g. Routing Rules Examples
        Table 1.5. Sample dr_rules records
 
@@ -430,7 +432,7 @@ Chapter 1. Admin Guide
    2 8 0049 20040101T083000 0 0 1,2 Rule 2
    3 7,8,9 0049 20040101T083000 0 0 3 Rule 3
        (The time recurrence for first rule is:
-       "20040101T083000|10H|weekly|||MO,TU,WE,TH,FR")
+       “20040101T083000|10H|weekly|||MO,TU,WE,TH,FR�)
 
 1.5. Routing Rule Processing
 
@@ -498,7 +500,7 @@ Chapter 1. Admin Guide
 
    The database url.
 
-   Default value is "NULL".
+   Default value is “NULL�.
 
    Example 1.1. Set db_url parameter
 ...
@@ -510,7 +512,7 @@ modparam("drouting", "db_url",
 
    The name of the db table storing gateway addresses.
 
-   Default value is "dr_gateways".
+   Default value is “dr_gateways�.
 
    Example 1.2. Set drd_table parameter
 ...
@@ -521,7 +523,7 @@ modparam("drouting", "drd_table", "dr_gateways")
 
    The name of the db table storing routing rules.
 
-   Default value is "dr_rules".
+   Default value is “dr_rules�.
 
    Example 1.3. Set drr_table parameter
 ...
@@ -532,7 +534,7 @@ modparam("drouting", "drr_table", "rules")
 
    The name of the db table storing groups.
 
-   Default value is "dr_groups".
+   Default value is “dr_groups�.
 
    Example 1.4. Set drg_table parameter
 ...
@@ -547,7 +549,7 @@ modparam("drouting", "drg_table", "groups")
    individual elements. Very useful to reuse a list of gateways in
    different places.
 
-   Default value is "dr_gw_lists".
+   Default value is “dr_gw_lists�.
 
    Example 1.5. Set drl_table parameter
 ...
@@ -571,7 +573,7 @@ modparam("drouting", "drl_table", "my_gw_lists")
        1,2;3,4,5;6 -> randomizer -> (A) 2;4;6 -> usage 2,4,6 (B) 1;5;6 ->
        usage 1,5,6
 
-   Default value is "0".
+   Default value is “0�.
 
    Example 1.6. Set sort_order parameter
 ...
@@ -583,7 +585,7 @@ modparam("drouting", "sort_order", 2)
    The name of the avp for storing Request URIs to be later used
    (alternative destiantions for the current one).
 
-   Default value is "NULL".
+   Default value is “NULL�.
 
    Example 1.7. Set ruri_avp parameter
 ...
@@ -598,7 +600,7 @@ modparam("drouting", "ruri_avp", '$avp(i:33)')
    function), the AVP will be updated with the attrs of the new used
    destination.
 
-   Default value is "NULL".
+   Default value is “NULL�.
 
    Example 1.8. Set attrs_avp parameter
 ...
@@ -611,7 +613,7 @@ modparam("drouting", "atrrs_avp", '$avp(i:67)')
    Flag to configure whether to use domain match when querying database
    for user's routing group.
 
-   Default value is "1".
+   Default value is “1�.
 
    Example 1.9. Set use_domain parameter
 ...
@@ -622,7 +624,7 @@ modparam("drouting", "use_domain", 0)
 
    The name of the column in group db table where the username is stored.
 
-   Default value is "username".
+   Default value is “username�.
 
    Example 1.10. Set drg_user_col parameter
 ...
@@ -633,7 +635,7 @@ modparam("drouting", "drg_user_col", "user")
 
    The name of the column in group db table where the domain is stored.
 
-   Default value is "domain".
+   Default value is “domain�.
 
    Example 1.11. Set drg_domain_col parameter
 ...
@@ -644,7 +646,7 @@ modparam("drouting", "drg_domain_col", "host")
 
    The name of the column in group db table where the group id is stored.
 
-   Default value is "groupid".
+   Default value is “groupid�.
 
    Example 1.12. Set drg_grpid_col parameter
 ...
@@ -656,7 +658,7 @@ modparam("drouting", "drg_grpid_col", "grpid")
    The number of rows that should be fetched from the result of a query in
    rules db table.
 
-   Default value is "2000".
+   Default value is “2000�.
 
    Example 1.13. Set fetch_rows parameter
 ...
@@ -669,7 +671,7 @@ modparam("drouting", "fetch_rows", 1500)
    startup. If not enabled, the GW name will be blindly used during
    routing.
 
-   Default value is "1 (enabled)".
+   Default value is “1 (enabled)�.
 
    Example 1.14. Set force_dns parameter
 ...
@@ -684,7 +686,7 @@ modparam("drouting", "force_dns", 0)
    4.4. is_from_gw([type])
    4.5. is_from_gw( type, [flag])
 
-4.1. do_routing("[groupID]")
+4.1.  do_routing("[groupID]")
 
    Function to trigger routing of the message according to the rules in
    the database table and the configured parameters.
@@ -704,7 +706,7 @@ do_routing("0");
 ...
 do_routing("$avp(i:10)");
 
-4.2. use_next_gw()/next_routing()
+4.2.  use_next_gw()/next_routing()
 
    The function takes the next available destination (set by do_routing,
    as alternative destinations) and push it into RURI. Note that the
@@ -727,7 +729,7 @@ if (use_next_gw()) {
 }
 ...
 
-4.3. goes_to_gw([type])
+4.3.  goes_to_gw([type])
 
    Function returns true if the destination of the current request
    (destination URI or Request URI) points (as IP) to one of the gateways.
@@ -748,7 +750,7 @@ if (goes_to_gw("1")) {
 }
 ...
 
-4.4. is_from_gw([type])
+4.4.  is_from_gw([type])
 
    The function checks if the sender of the message is a gateway from a
    certain group.
@@ -767,7 +769,7 @@ if (is_from_gw("1") {
 }
 ...
 
-4.5. is_from_gw( type, [flag])
+4.5.  is_from_gw( type, [flag])
 
    The function checks if the sender of the message is a gateway from a
    certain group.
@@ -789,7 +791,7 @@ if (is_from_gw("3","1") {
 
    5.1. dr_reload
 
-5.1. dr_reload
+5.1.  dr_reload
 
    Command to reload routing rules from database.
 

+ 5 - 3
modules_k/drouting/doc/drouting_admin.xml

@@ -644,9 +644,11 @@
 	</para>
 	<para>
 	A comma separated list of gateway identifiers corresponding to a row in 
-	table <quote>dr_gateways</quote>. The first gateway is tried first and if 
-	failure the second one, and so one. If no gateway is left a negative 
-	response is sent back to the user.
+	table <quote>dr_gateways</quote>. You can use a predefined list from the
+	table <quote>dr_gw_lists</quote> preceded by the character
+	<quote>#</quote>. The first gateway is tried first and if routing to it
+	fails, then the second one, and so one. If no gateway is left a negative 
+	response is sent back to caller.
 	</para>
 	</listitem>
 	<listitem>