The Least Cost Routing (LCR) module implements capability to serially forward a request to one or more gateways so that the order in which the gateways is tried is based on admin defined "least cost" rules. The LCR module supports many independent LCR instances (gateways and least cost rules). Each such instance has its own LCR instance identifier. Identifiers of normal LCR instances are positive integers. Gateways may belong to special LCR instance with identifier 0 meaning that such gateways belong to all normal LCR instances. For the purpose of facilitating least cost routing of requests, each gateway of an LCR instance is associated with one or more <prefix, from uri pattern, from uri userpart, request uri pattern, priority, weight> tuples. A gateway matches a request if user part of Request-URI matches "prefix", caller URI matches "from_uri" pattern, caller URI userpart matches mtree with "mt_value", and callee URI matches "request_uri" pattern in a tuple that is associated with the gateway. When the function load_gws() is called, matching gateways (that are not currently designated as defunct) are ordered for forwarding purposes as follows: 1. according to longest Request-URI user part match
| Parámetro | Tipo | Descripción |
|---|---|---|
| db_url | string | 3.2. lcr_gw_table (string) 3.3. id_column (string) 3.4. lcr_id_column (string) 3.5. gw_name_column (string) 3.6. ip_addr_column (string) 3.7. hostname_column (string) 3.8. port_column (string) 3.9. pa |
| lcr_gw_table | string | 3.3. id_column (string) 3.4. lcr_id_column (string) 3.5. gw_name_column (string) 3.6. ip_addr_column (string) 3.7. hostname_column (string) 3.8. port_column (string) 3.9. params_column (string) 3.10. |
| id_column | string | 3.4. lcr_id_column (string) 3.5. gw_name_column (string) 3.6. ip_addr_column (string) 3.7. hostname_column (string) 3.8. port_column (string) 3.9. params_column (string) 3.10. uri_scheme_column (strin |
| lcr_id_column | string | 3.5. gw_name_column (string) 3.6. ip_addr_column (string) 3.7. hostname_column (string) 3.8. port_column (string) 3.9. params_column (string) 3.10. uri_scheme_column (string) 3.11. transport_column (s |
| gw_name_column | string | 3.6. ip_addr_column (string) 3.7. hostname_column (string) 3.8. port_column (string) 3.9. params_column (string) 3.10. uri_scheme_column (string) 3.11. transport_column (string) 3.12. strip_column (st |
| ip_addr_column | string | 3.7. hostname_column (string) 3.8. port_column (string) 3.9. params_column (string) 3.10. uri_scheme_column (string) 3.11. transport_column (string) 3.12. strip_column (string) 3.13. tag_column (strin |
| hostname_column | string | 3.8. port_column (string) 3.9. params_column (string) 3.10. uri_scheme_column (string) 3.11. transport_column (string) 3.12. strip_column (string) 3.13. tag_column (string) 3.14. flags_column (string) |
| port_column | string | 3.9. params_column (string) 3.10. uri_scheme_column (string) 3.11. transport_column (string) 3.12. strip_column (string) 3.13. tag_column (string) 3.14. flags_column (string) 3.15. defunct_column (str |
| params_column | string | 3.10. uri_scheme_column (string) 3.11. transport_column (string) 3.12. strip_column (string) 3.13. tag_column (string) 3.14. flags_column (string) 3.15. defunct_column (string) 3.16. lcr_rule_table (s |
| uri_scheme_column | string | 3.11. transport_column (string) 3.12. strip_column (string) 3.13. tag_column (string) 3.14. flags_column (string) 3.15. defunct_column (string) 3.16. lcr_rule_table (string) 3.17. prefix_column (strin |
| transport_column | string | 3.12. strip_column (string) 3.13. tag_column (string) 3.14. flags_column (string) 3.15. defunct_column (string) 3.16. lcr_rule_table (string) 3.17. prefix_column (string) 3.18. from_uri_column (string |
| strip_column | string | 3.13. tag_column (string) 3.14. flags_column (string) 3.15. defunct_column (string) 3.16. lcr_rule_table (string) 3.17. prefix_column (string) 3.18. from_uri_column (string) 3.19. mt_tvalue_column (st |
| tag_column | string | 3.14. flags_column (string) 3.15. defunct_column (string) 3.16. lcr_rule_table (string) 3.17. prefix_column (string) 3.18. from_uri_column (string) 3.19. mt_tvalue_column (string) 3.20. request_uri_co |
| flags_column | string | 3.15. defunct_column (string) 3.16. lcr_rule_table (string) 3.17. prefix_column (string) 3.18. from_uri_column (string) 3.19. mt_tvalue_column (string) 3.20. request_uri_column (string) 3.21. stopper_ |
| defunct_column | string | 3.16. lcr_rule_table (string) 3.17. prefix_column (string) 3.18. from_uri_column (string) 3.19. mt_tvalue_column (string) 3.20. request_uri_column (string) 3.21. stopper_column (string) 3.22. enabled_ |
| lcr_rule_table | string | 3.17. prefix_column (string) 3.18. from_uri_column (string) 3.19. mt_tvalue_column (string) 3.20. request_uri_column (string) 3.21. stopper_column (string) 3.22. enabled_column (string) 3.23. lcr_rule |
| prefix_column | string | 3.18. from_uri_column (string) 3.19. mt_tvalue_column (string) 3.20. request_uri_column (string) 3.21. stopper_column (string) 3.22. enabled_column (string) 3.23. lcr_rule_target_table (string) 3.24. |
| from_uri_column | string | 3.19. mt_tvalue_column (string) 3.20. request_uri_column (string) 3.21. stopper_column (string) 3.22. enabled_column (string) 3.23. lcr_rule_target_table (string) 3.24. rule_id_column (string) 3.25. g |
| mt_tvalue_column | string | 3.20. request_uri_column (string) 3.21. stopper_column (string) 3.22. enabled_column (string) 3.23. lcr_rule_target_table (string) 3.24. rule_id_column (string) 3.25. gw_id_column (string) 3.26. prior |
| request_uri_column | string | 3.21. stopper_column (string) 3.22. enabled_column (string) 3.23. lcr_rule_target_table (string) 3.24. rule_id_column (string) 3.25. gw_id_column (string) 3.26. priority_column (string) 3.27. weight_c |
| stopper_column | string | 3.22. enabled_column (string) 3.23. lcr_rule_target_table (string) 3.24. rule_id_column (string) 3.25. gw_id_column (string) 3.26. priority_column (string) 3.27. weight_column (string) 3.28. lcr_count |
| enabled_column | string | 3.23. lcr_rule_target_table (string) 3.24. rule_id_column (string) 3.25. gw_id_column (string) 3.26. priority_column (string) 3.27. weight_column (string) 3.28. lcr_count (integer) 3.29. gw_uri_avp (A |
| lcr_rule_target_table | string | 3.24. rule_id_column (string) 3.25. gw_id_column (string) 3.26. priority_column (string) 3.27. weight_column (string) 3.28. lcr_count (integer) 3.29. gw_uri_avp (AVP string) 3.30. ruri_user_avp (AVP s |
| rule_id_column | string | 3.25. gw_id_column (string) 3.26. priority_column (string) 3.27. weight_column (string) 3.28. lcr_count (integer) 3.29. gw_uri_avp (AVP string) 3.30. ruri_user_avp (AVP string) 3.31. tag_avp (AVP stri |
| gw_id_column | string | 3.26. priority_column (string) 3.27. weight_column (string) 3.28. lcr_count (integer) 3.29. gw_uri_avp (AVP string) 3.30. ruri_user_avp (AVP string) 3.31. tag_avp (AVP string) 3.32. flags_avp (AVP str |
| priority_column | string | 3.27. weight_column (string) 3.28. lcr_count (integer) 3.29. gw_uri_avp (AVP string) 3.30. ruri_user_avp (AVP string) 3.31. tag_avp (AVP string) 3.32. flags_avp (AVP string) 3.33. rule_id_avp (AVP str |
| weight_column | string | 3.28. lcr_count (integer) 3.29. gw_uri_avp (AVP string) 3.30. ruri_user_avp (AVP string) 3.31. tag_avp (AVP string) 3.32. flags_avp (AVP string) 3.33. rule_id_avp (AVP string) 3.34. mt_pv_values (AVP |
| lcr_count | integer | 3.29. gw_uri_avp (AVP string) 3.30. ruri_user_avp (AVP string) 3.31. tag_avp (AVP string) 3.32. flags_avp (AVP string) 3.33. rule_id_avp (AVP string) 3.34. mt_pv_values (AVP string) 3.35. mtree (strin |
| mtree | string | 3.36. defunct_capability (integer) 3.37. lcr_id_avp (AVP string) 3.38. defunct_gw_avp (AVP string) 3.39. lcr_rule_hash_size (integer) 3.40. lcr_gw_count (integer) 3.41. dont_strip_or_prefix_flag (inte |
| defunct_capability | integer | 3.37. lcr_id_avp (AVP string) 3.38. defunct_gw_avp (AVP string) 3.39. lcr_rule_hash_size (integer) 3.40. lcr_gw_count (integer) 3.41. dont_strip_or_prefix_flag (integer) 3.42. priority_ordering (integ |
4.2. next_gw() 4.3. inactivate_gw() 4.4. defunct_gw(period) 4.5. from_gw(lcr_id[, ip_addr, proto[, src_port]]) 4.6. from_any_gw([ip_addr, proto[, src_port]]) 4.7. to_gw(lcr_id[, ip_addr, proto]) 4.8. to_any_gw([ip_addr, proto])
4.3. inactivate_gw() 4.4. defunct_gw(period) 4.5. from_gw(lcr_id[, ip_addr, proto[, src_port]]) 4.6. from_any_gw([ip_addr, proto[, src_port]]) 4.7. to_gw(lcr_id[, ip_addr, proto]) 4.8. to_any_gw([ip_addr, proto])
4.4. defunct_gw(period) 4.5. from_gw(lcr_id[, ip_addr, proto[, src_port]]) 4.6. from_any_gw([ip_addr, proto[, src_port]]) 4.7. to_gw(lcr_id[, ip_addr, proto]) 4.8. to_any_gw([ip_addr, proto])
4.5. from_gw(lcr_id[, ip_addr, proto[, src_port]]) 4.6. from_any_gw([ip_addr, proto[, src_port]]) 4.7. to_gw(lcr_id[, ip_addr, proto]) 4.8. to_any_gw([ip_addr, proto])
4.6. from_any_gw([ip_addr, proto[, src_port]]) 4.7. to_gw(lcr_id[, ip_addr, proto]) 4.8. to_any_gw([ip_addr, proto])
4.7. to_gw(lcr_id[, ip_addr, proto]) 4.8. to_any_gw([ip_addr, proto])
4.8. to_any_gw([ip_addr, proto])
4.1. load_gws(lcr_id[, uri_user[, caller_uri]])
Loads attributes of matching gateways to gw_uri_avp (see Overview section). Argument lcr_id specifies the used LCR instance. It can be a positive integer or a pseudo variable containing an integer value. If uri_user is given, it is used, instead of R
Upon first call, fetches attribute values stored in first gw_uri_avp, destroys that AVP, and rewrites Request-URI and possibly also destination URI as described in the Overview section. Saves user part of Request-URI into ruri_user_avp for use in sub
Inactivates the gateway denoted by lcr_id_avp and defunct_gw_avp (which were set by previous next_gw() call). Use of this function requires that ping_interval module parameter has been set to a positive value allowing an inactivated gateway to be aut
Defuncts gateway denoted by lcr_id_avp and defunct_gw_avp (which were set by previuos next_gw() call) for a period of seconds given as argument. Argument must be a positive integer constant or a pseudo variable with positive integer value. Value of d
Checks if request comes from IP address, transport protocol and source port specified for a gateway in LCR instance lcr_id. Fails if the LCR instance includes one or more gateways without IP address. IP address, transport protocol and source port to
Checks if request comes from IP address, transport protocol and source port specified for any gateway. Only LCR instances, where all gateways have IP address, are included in the test. IP address, transport protocol and source port to be checked are
Checks if in-dialog request goes to IP address and transport protocol specified for a gateway in LCR instance lcr_id. Fails if LCR instance includes one or more gateways without IP address. IP address and transport protocol to be checked are either t
Checks if in-dialog request goes to IP address and transport protocol of any gateway. Only LCR instances, where all gateways have IP address, are included in the test. IP address and transport protocol to be checked are either taken from Request-URI
Copyright © 2005-2014 Juha Heinanen