1.1. Introduction 1.2. Features 1.3. Performance 1.4. Routing Rule Definition 1.4.1. Gateway Addresses 1.4.2. Destination/GW lists 1.4.3. Routing Rules 1.5. Routing Rule Processing 1.1. Introduction Dynamic Routing is a module for selecting (based on multiple criteria) the best gateway/destination to be used for delivering a certain call. Least Cost Routing (LCR) is a special case of dynamic routing - when the rules are ordered based on costs. Dynamic Routing comes with many features regarding routing rule selection: * prefix based * caller/group based * time based * priority based , processing : * stripping and prefixing * default rules * inbound and outbound processing * script route triggering and failure handling: * serial forking * weight based GW selection * random GW selection 1.2. Features The dynamic routing implementation for Kamailio is designed with the following properties: * routing info (destinations, rules, groups) are stored in a database and loaded into memory at start up time; reload at runtime via RPC command * load balancing or random selection of the destinations (from a given set) * able to handle large volume of routing info (300K of rules) with minimal speed/time and memory consumption penalties * script integration - Pseudo variables support in functions; scripting route triggering when rules are matched * bidirectional behavior - inbound and outbound processing (strip and prefixing when sending and receiving from a destination/GW) 1.3. Performance T
| Parámetro | Tipo | Descripción |
|---|---|---|
| db_url | str | 3.2. drd_table(str) 3.3. drr_table(str) 3.4. drg_table(str) 3.5. drl_table(str) 3.6. sort_order (int) 3.7. ruri_avp (str) 3.8. attrs_avp (str) 3.9. use_domain (int) 3.10. drg_user_col (str) 3.11. drg_ |
| drd_table | str | 3.3. drr_table(str) 3.4. drg_table(str) 3.5. drl_table(str) 3.6. sort_order (int) 3.7. ruri_avp (str) 3.8. attrs_avp (str) 3.9. use_domain (int) 3.10. drg_user_col (str) 3.11. drg_domain_col (str) 3.1 |
| drr_table | str | 3.4. drg_table(str) 3.5. drl_table(str) 3.6. sort_order (int) 3.7. ruri_avp (str) 3.8. attrs_avp (str) 3.9. use_domain (int) 3.10. drg_user_col (str) 3.11. drg_domain_col (str) 3.12. drg_grpid_col (st |
| drg_table | str | 3.5. drl_table(str) 3.6. sort_order (int) 3.7. ruri_avp (str) 3.8. attrs_avp (str) 3.9. use_domain (int) 3.10. drg_user_col (str) 3.11. drg_domain_col (str) 3.12. drg_grpid_col (str) 3.13. fetch_rows |
| drl_table | str | 3.6. sort_order (int) 3.7. ruri_avp (str) 3.8. attrs_avp (str) 3.9. use_domain (int) 3.10. drg_user_col (str) 3.11. drg_domain_col (str) 3.12. drg_grpid_col (str) 3.13. fetch_rows (int) 3.14. force_dn |
| sort_order | int | 3.7. ruri_avp (str) 3.8. attrs_avp (str) 3.9. use_domain (int) 3.10. drg_user_col (str) 3.11. drg_domain_col (str) 3.12. drg_grpid_col (str) 3.13. fetch_rows (int) 3.14. force_dns (int) 3.15. enable_k |
| ruri_avp | str | 3.8. attrs_avp (str) 3.9. use_domain (int) 3.10. drg_user_col (str) 3.11. drg_domain_col (str) 3.12. drg_grpid_col (str) 3.13. fetch_rows (int) 3.14. force_dns (int) 3.15. enable_keepalive (int) |
| attrs_avp | str | 3.9. use_domain (int) 3.10. drg_user_col (str) 3.11. drg_domain_col (str) 3.12. drg_grpid_col (str) 3.13. fetch_rows (int) 3.14. force_dns (int) 3.15. enable_keepalive (int) |
| use_domain | int | 3.10. drg_user_col (str) 3.11. drg_domain_col (str) 3.12. drg_grpid_col (str) 3.13. fetch_rows (int) 3.14. force_dns (int) 3.15. enable_keepalive (int) |
| drg_user_col | str | 3.11. drg_domain_col (str) 3.12. drg_grpid_col (str) 3.13. fetch_rows (int) 3.14. force_dns (int) 3.15. enable_keepalive (int) |
| drg_domain_col | str | 3.12. drg_grpid_col (str) 3.13. fetch_rows (int) 3.14. force_dns (int) 3.15. enable_keepalive (int) |
| drg_grpid_col | str | 3.13. fetch_rows (int) 3.14. force_dns (int) 3.15. enable_keepalive (int) |
| fetch_rows | int | 3.14. force_dns (int) 3.15. enable_keepalive (int) |
| force_dns | int | 3.15. enable_keepalive (int) |
| enable_keepalive | int | 3.1. db_url(str) |
| db_url | str | The database url. |
| drd_table | str | The name of the db table storing gateway addresses. |
| drr_table | str | The name of the db table storing routing rules. |
| drg_table | str | The name of the db table storing groups. |
| drl_table | str | The name of the db table storing definitions of destination lists (to be used directly by the routing rules). You will have an identifier to a group of gateways instead of having all the members of th |
| sort_order | int | Defines how the destination list should be processed (ordering of the elements). Possible modes are * 0 - destination groups are ignored and all the destinations are tried in the given order; Ex: list |
| ruri_avp | str | The name of the avp for storing Request URIs to be later used (alternative destinations for the current one). |
| attrs_avp | str | The name of the avp for storing the attribute of the current selected destination - once a new destination is selected (via the use_next_gw() function), the AVP will be updated with the attrs of the n |
| use_domain | int | Flag to configure whether to use domain match when querying database for user's routing group. |
| drg_user_col | str | The name of the column in group db table where the username is stored. |
| drg_domain_col | str | The name of the column in group db table where the domain is stored. |
| drg_grpid_col | str | The name of the column in group db table where the group id is stored. |
| fetch_rows | int | The number of rows that should be fetched from the result of a query in rules db table. |
| force_dns | int | Force DNS resolving of GW/destination names (if not IPs) during startup. If not enabled, the GW name will be blindly used during routing. |
| enable_keepalive | int | Enable monitoring of GW/destinations using keepalive module. Destinations found unavailable will not be used on do_routing() call. |
4.2. next_routing() 4.3. use_next_gw() 4.4. goes_to_gw([type]) 4.5. is_from_gw([ type, [flag] ])
4.3. use_next_gw() 4.4. goes_to_gw([type]) 4.5. is_from_gw([ type, [flag] ])
4.4. goes_to_gw([type]) 4.5. is_from_gw([ type, [flag] ])
4.5. is_from_gw([ type, [flag] ])
4.1. do_routing([groupID])
Function to trigger routing of the message according to the rules in the database table and the configured parameters.
The function takes the next available destination (set by do_routing, as alternative destinations) and push it into RURI. Note that the function just sets the RURI (nothing more).
Same as next_routing().
Function returns true if the destination of the current request (destination URI or Request URI) points (as IP) to one of the gateways. There is no DNS lookups done if the domain part of the URI is not an IP.
The function checks if the sender of the message is a gateway from a group in drouting rules.
Copyright © 2005-2008 Voice Sistem SRL