A module which provides routing, balancing and blocklisting capabilities. The module provides routing, balancing and blocklisting capabilities. It reads routing entries from a database source or from a config file at Kamailio startup. It can use one routing tree (for one carrier), or if needed, for every user a different routing tree (unique for each carrier) for number prefix based routing. It supports several route tree domains, e.g. for fallback routes or different routing rules for VoIP and PSTN targets. Based on the tree, the module decides which number prefixes are forwarded to which gateway. It can also distribute the traffic by ratio parameters. Furthermore, the requests can be distributed by a hash function to predictable destinations. The hash source is configurable, two different hash functions are available. This module scales up to more than a few million users, and is able to handle more than several hundred thousand routing table entries. We received reports of some setups that used more than a million routing table entries. It also supports a large number of carriers and domains which can be efficiently looked up in most of the cases (see below for more informations). In load balancing scenarios the usage of the config file mode is recommended, to avoid the additional complexity that the database driven routing creates. Routing tables can be reloaded and edited (in config file mode) with the RPC interface, the config file is updated according to the changes. T
| Parámetro | Tipo | Descripción |
|---|---|---|
| subscriber_table | string | 3.2. subscriber_user_col (string) 3.3. subscriber_domain_col (string) 3.4. subscriber_carrier_col (string) 3.5. config_source (string) 3.6. config_file (string) 3.7. default_tree (string) 3.8. use_dom |
| subscriber_user_col | string | 3.3. subscriber_domain_col (string) 3.4. subscriber_carrier_col (string) 3.5. config_source (string) 3.6. config_file (string) 3.7. default_tree (string) 3.8. use_domain (int) 3.9. fallback_default (i |
| subscriber_domain_col | string | 3.4. subscriber_carrier_col (string) 3.5. config_source (string) 3.6. config_file (string) 3.7. default_tree (string) 3.8. use_domain (int) 3.9. fallback_default (int) 3.10. fetch_rows (integer) 3.11. |
| subscriber_carrier_col | string | 3.5. config_source (string) 3.6. config_file (string) 3.7. default_tree (string) 3.8. use_domain (int) 3.9. fallback_default (int) 3.10. fetch_rows (integer) 3.11. db_load_description (integer) 3.12. |
| config_source | string | 3.6. config_file (string) 3.7. default_tree (string) 3.8. use_domain (int) 3.9. fallback_default (int) 3.10. fetch_rows (integer) 3.11. db_load_description (integer) 3.12. match_mode (integer) 3.13. a |
| config_file | string | 3.7. default_tree (string) 3.8. use_domain (int) 3.9. fallback_default (int) 3.10. fetch_rows (integer) 3.11. db_load_description (integer) 3.12. match_mode (integer) 3.13. avoid_failed_destinations ( |
| default_tree | string | 3.8. use_domain (int) 3.9. fallback_default (int) 3.10. fetch_rows (integer) 3.11. db_load_description (integer) 3.12. match_mode (integer) 3.13. avoid_failed_destinations (integer) |
| use_domain | int | 3.9. fallback_default (int) 3.10. fetch_rows (integer) 3.11. db_load_description (integer) 3.12. match_mode (integer) 3.13. avoid_failed_destinations (integer) |
| fallback_default | int | 3.10. fetch_rows (integer) 3.11. db_load_description (integer) 3.12. match_mode (integer) 3.13. avoid_failed_destinations (integer) |
| fetch_rows | integer | 3.11. db_load_description (integer) 3.12. match_mode (integer) 3.13. avoid_failed_destinations (integer) |
| db_load_description | integer | 3.12. match_mode (integer) 3.13. avoid_failed_destinations (integer) |
| match_mode | integer | 3.13. avoid_failed_destinations (integer) |
| avoid_failed_destinations | integer | 3.1. subscriber_table (string) |
| subscriber_table | string | The name of the table containing the subscribers |
| subscriber_user_col | string | The name of the column in the subscriber table containing the usernames. |
| subscriber_domain_col | string | The name of the column in the subscriber table containing the domain of the subscriber. |
| subscriber_carrier_col | string | The name of the column in the subscriber table containing the carrier id of the subscriber. |
| config_source | string | Specifies whether the module loads its config data from a file or from a database. Possible values are “file” and “db”. |
| config_file | string | Specifies the path to the config file. The file has to be owned by the user and group used to run Kamailio. |
| default_tree | string | The name of the carrier tree used per default (if the current subscriber has no preferred tree) |
| use_domain | int | When using tree lookup per user, this parameter specifies whether to use the domain part for user matching or not. This parameter is tunable via the ser cfg framework. |
| fallback_default | int | This parameter defines the behaviour when using user-based tree lookup. If the user has a non-existing tree set and fallback_default is set to 1, the default tree is used. Otherwise, cr_user_rewrite_u |
| fetch_rows | integer | The number of the rows to be fetched at once from database when loading the routing data. This value can be used to tune the load time at startup. For 1MB of private memory (default) it should be belo |
| db_load_description | integer | Toggle on/off loading in memory the description column in the carrierroute/carrierfailureroute database tables. This reduces the shared memory used by the module. |
| match_mode | integer | The number of individual characters that are used for matching. Valid values are 10 or 128. When you specify 10, only digits will be used for matching, this operation mode is equivalent to the old beh |
| avoid_failed_destinations | integer | Integer parameter to toggle on/off the possibility that in the failurerouting cases destinations that previously failed are avoided. Possible values are 0 (off), 1 (on). Also see cr_route section. |
4.2. cr_route(carrier, domain, prefix_matching, rewrite_user, hash_source, descavp)
4.3. cr_nofallback_route(carrier, domain, prefix_matching, rewrite_user, hash_source, descavp)
4.4. cr_next_domain(carrier, domain, prefix_matching, host, reply_code, dstavp)
Previous versions of carrierroute had some more function. All the old semantics can be achieved by using the few new functions like this: cr_rewrite_uri(domain, hash_source) -> cr_route("default", domain, "$rU", "$rU", hash_source)
This function loads the carrier and stores it in a config variable. It cannot be used in the config file mode, as it needs a mapping of the given user to a certain carrier. The is drived from a database entry belonging to the user parameter. This map
This function searches for the longest match for the user given in prefix_matching with the given domain in the given carrier tree. The Request URI is rewritten using rewrite_user and the given hash source and algorithm. Returns -1 if there is no dat
This function searches for the longest match for the user given in prefix_matching with the given domain in the given carrier tree. The Request URI is rewritten using rewrite_user and the given hash source and algorithm. Returns -1 if there is no dat
This function searches for the longest match for the user given in prefix_matching with the given domain in the given carrier failure tree. It tries to find a next domain matching the given host, reply_code and the message flags. The matching is done
Copyright © 2007 1&1 Internet AG