|
@@ -43,25 +43,26 @@ Juha Heinanen
|
|
|
3.16. lcr_rule_table (string)
|
|
|
3.17. prefix_column (string)
|
|
|
3.18. from_uri_column (string)
|
|
|
- 3.19. stopper_column (string)
|
|
|
- 3.20. enabled_column (string)
|
|
|
- 3.21. lcr_rule_target_table (string)
|
|
|
- 3.22. rule_id_column (string)
|
|
|
- 3.23. gw_id_column (string)
|
|
|
- 3.24. priority_column (string)
|
|
|
- 3.25. weight_column (string)
|
|
|
- 3.26. lcr_count (integer)
|
|
|
- 3.27. gw_uri_avp (AVP string)
|
|
|
- 3.28. ruri_user_avp (AVP string)
|
|
|
- 3.29. tag_avp (AVP string)
|
|
|
- 3.30. flags_avp (AVP string)
|
|
|
- 3.31. defunct_capability (integer)
|
|
|
- 3.32. lcr_id_avp (AVP string)
|
|
|
- 3.33. defunct_gw_avp (AVP string)
|
|
|
- 3.34. lcr_rule_hash_size (integer)
|
|
|
- 3.35. lcr_gw_count (integer)
|
|
|
- 3.36. dont_strip_or_tag_flag (integer)
|
|
|
- 3.37. fetch_rows (integer)
|
|
|
+ 3.19. request_uri_column (string)
|
|
|
+ 3.20. stopper_column (string)
|
|
|
+ 3.21. enabled_column (string)
|
|
|
+ 3.22. lcr_rule_target_table (string)
|
|
|
+ 3.23. rule_id_column (string)
|
|
|
+ 3.24. gw_id_column (string)
|
|
|
+ 3.25. priority_column (string)
|
|
|
+ 3.26. weight_column (string)
|
|
|
+ 3.27. lcr_count (integer)
|
|
|
+ 3.28. gw_uri_avp (AVP string)
|
|
|
+ 3.29. ruri_user_avp (AVP string)
|
|
|
+ 3.30. tag_avp (AVP string)
|
|
|
+ 3.31. flags_avp (AVP string)
|
|
|
+ 3.32. defunct_capability (integer)
|
|
|
+ 3.33. lcr_id_avp (AVP string)
|
|
|
+ 3.34. defunct_gw_avp (AVP string)
|
|
|
+ 3.35. lcr_rule_hash_size (integer)
|
|
|
+ 3.36. lcr_gw_count (integer)
|
|
|
+ 3.37. dont_strip_or_tag_flag (integer)
|
|
|
+ 3.38. fetch_rows (integer)
|
|
|
|
|
|
4. Functions
|
|
|
|
|
@@ -102,37 +103,38 @@ Juha Heinanen
|
|
|
1.16. Setting lcr_rule_table module parameter
|
|
|
1.17. Setting prefix_column module parameter
|
|
|
1.18. Setting from_uri_column module parameter
|
|
|
- 1.19. Setting stopper_column module parameter
|
|
|
- 1.20. Setting enabled_column module parameter
|
|
|
- 1.21. Setting lcr_rule_target_table module parameter
|
|
|
- 1.22. Setting rule_id_column module parameter
|
|
|
- 1.23. Setting gw_id_column module parameter
|
|
|
- 1.24. Setting priority_column module parameter
|
|
|
- 1.25. Setting weight_column module parameter
|
|
|
- 1.26. Setting lcr_count module parameter
|
|
|
- 1.27. Setting gw_uri_avp module parameter
|
|
|
- 1.28. Setting ruri_user_avp module parameter
|
|
|
- 1.29. Setting tag_avp module parameter
|
|
|
- 1.30. Setting flags_avp module parameter
|
|
|
- 1.31. Setting defunct_capability module parameter
|
|
|
- 1.32. Setting lcr_id_avp module parameter
|
|
|
- 1.33. Setting defunct_gw_avp module parameter
|
|
|
- 1.34. Setting lcr_rule_hash_size module parameter
|
|
|
- 1.35. Setting lcr_gw_count module parameter
|
|
|
- 1.36. Setting dont_strip_or_tag_flag module parameter
|
|
|
- 1.37. Set fetch_rows parameter
|
|
|
- 1.38. load_gws usage
|
|
|
- 1.39. next_gw usage from a route block
|
|
|
- 1.40. next_gw usage from a failure route block
|
|
|
- 1.41. defunct_gw usage
|
|
|
- 1.42. from_gw usage
|
|
|
+ 1.19. Setting request_uri_column module parameter
|
|
|
+ 1.20. Setting stopper_column module parameter
|
|
|
+ 1.21. Setting enabled_column module parameter
|
|
|
+ 1.22. Setting lcr_rule_target_table module parameter
|
|
|
+ 1.23. Setting rule_id_column module parameter
|
|
|
+ 1.24. Setting gw_id_column module parameter
|
|
|
+ 1.25. Setting priority_column module parameter
|
|
|
+ 1.26. Setting weight_column module parameter
|
|
|
+ 1.27. Setting lcr_count module parameter
|
|
|
+ 1.28. Setting gw_uri_avp module parameter
|
|
|
+ 1.29. Setting ruri_user_avp module parameter
|
|
|
+ 1.30. Setting tag_avp module parameter
|
|
|
+ 1.31. Setting flags_avp module parameter
|
|
|
+ 1.32. Setting defunct_capability module parameter
|
|
|
+ 1.33. Setting lcr_id_avp module parameter
|
|
|
+ 1.34. Setting defunct_gw_avp module parameter
|
|
|
+ 1.35. Setting lcr_rule_hash_size module parameter
|
|
|
+ 1.36. Setting lcr_gw_count module parameter
|
|
|
+ 1.37. Setting dont_strip_or_tag_flag module parameter
|
|
|
+ 1.38. Set fetch_rows parameter
|
|
|
+ 1.39. load_gws usage
|
|
|
+ 1.40. next_gw usage from a route block
|
|
|
+ 1.41. next_gw usage from a failure route block
|
|
|
+ 1.42. defunct_gw usage
|
|
|
1.43. from_gw usage
|
|
|
- 1.44. to_gw usage
|
|
|
+ 1.44. from_gw usage
|
|
|
1.45. to_gw usage
|
|
|
- 1.46. lcr.reload RPC example
|
|
|
- 1.47. lcr.dump_gws RPC example
|
|
|
- 1.48. lcr.dump_rules RPC example
|
|
|
- 1.49. lcr.defunct_gw RPC example
|
|
|
+ 1.46. to_gw usage
|
|
|
+ 1.47. lcr.reload RPC example
|
|
|
+ 1.48. lcr.dump_gws RPC example
|
|
|
+ 1.49. lcr.dump_rules RPC example
|
|
|
+ 1.50. lcr.defunct_gw RPC example
|
|
|
|
|
|
Chapter 1. Admin Guide
|
|
|
|
|
@@ -164,25 +166,26 @@ Chapter 1. Admin Guide
|
|
|
3.16. lcr_rule_table (string)
|
|
|
3.17. prefix_column (string)
|
|
|
3.18. from_uri_column (string)
|
|
|
- 3.19. stopper_column (string)
|
|
|
- 3.20. enabled_column (string)
|
|
|
- 3.21. lcr_rule_target_table (string)
|
|
|
- 3.22. rule_id_column (string)
|
|
|
- 3.23. gw_id_column (string)
|
|
|
- 3.24. priority_column (string)
|
|
|
- 3.25. weight_column (string)
|
|
|
- 3.26. lcr_count (integer)
|
|
|
- 3.27. gw_uri_avp (AVP string)
|
|
|
- 3.28. ruri_user_avp (AVP string)
|
|
|
- 3.29. tag_avp (AVP string)
|
|
|
- 3.30. flags_avp (AVP string)
|
|
|
- 3.31. defunct_capability (integer)
|
|
|
- 3.32. lcr_id_avp (AVP string)
|
|
|
- 3.33. defunct_gw_avp (AVP string)
|
|
|
- 3.34. lcr_rule_hash_size (integer)
|
|
|
- 3.35. lcr_gw_count (integer)
|
|
|
- 3.36. dont_strip_or_tag_flag (integer)
|
|
|
- 3.37. fetch_rows (integer)
|
|
|
+ 3.19. request_uri_column (string)
|
|
|
+ 3.20. stopper_column (string)
|
|
|
+ 3.21. enabled_column (string)
|
|
|
+ 3.22. lcr_rule_target_table (string)
|
|
|
+ 3.23. rule_id_column (string)
|
|
|
+ 3.24. gw_id_column (string)
|
|
|
+ 3.25. priority_column (string)
|
|
|
+ 3.26. weight_column (string)
|
|
|
+ 3.27. lcr_count (integer)
|
|
|
+ 3.28. gw_uri_avp (AVP string)
|
|
|
+ 3.29. ruri_user_avp (AVP string)
|
|
|
+ 3.30. tag_avp (AVP string)
|
|
|
+ 3.31. flags_avp (AVP string)
|
|
|
+ 3.32. defunct_capability (integer)
|
|
|
+ 3.33. lcr_id_avp (AVP string)
|
|
|
+ 3.34. defunct_gw_avp (AVP string)
|
|
|
+ 3.35. lcr_rule_hash_size (integer)
|
|
|
+ 3.36. lcr_gw_count (integer)
|
|
|
+ 3.37. dont_strip_or_tag_flag (integer)
|
|
|
+ 3.38. fetch_rows (integer)
|
|
|
|
|
|
4. Functions
|
|
|
|
|
@@ -217,15 +220,17 @@ Chapter 1. Admin Guide
|
|
|
|
|
|
For the purpose of facilitating least cost routing of requests, each
|
|
|
gateway of an LCR instance is associated with one or more <prefix, from
|
|
|
- pattern, priority, weight> tuples. A gateway matches a request if user
|
|
|
- part of the Request-URI matches a "prefix" and the caller's URI matches
|
|
|
- a "from" pattern in a tuple that is associated with the gateway.
|
|
|
+ uri pattern, request uri pattern, priority, weight> tuples. A gateway
|
|
|
+ matches a request if user part of the Request-URI matches a "prefix",
|
|
|
+ the caller's URI matches a "From-URI" pattern and the callee's URI
|
|
|
+ matches a "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 user part match
|
|
|
+ * (1) according to longest Request-URI user part match
|
|
|
* (2) according to tuple's priority
|
|
|
* (3) according to tuple's randomized weight
|
|
|
|
|
@@ -233,11 +238,12 @@ Chapter 1. Admin Guide
|
|
|
matches, then matching stops at it and all other tuples with shorter
|
|
|
prefixes are not considered.
|
|
|
|
|
|
- Prefix is a string of characters or NULL. From pattern is a regular
|
|
|
- expression (see 'man pcresyntax' for syntax), an empty string, or NULL.
|
|
|
- An empty or NULL from pattern or prefix matches anything. Smaller
|
|
|
- priority value means higher priority (highest priority value being 0
|
|
|
- and lowest being 255).
|
|
|
+ Prefix is a string of characters or NULL. From-URI pattern and
|
|
|
+ Request-URI pattern are regular expressions (see 'man pcresyntax' for
|
|
|
+ syntax), an empty string, or NULL. An empty or NULL From-URI pattern,
|
|
|
+ Request-URI pattern or prefix matches anything. Smaller priority value
|
|
|
+ means higher priority (highest priority value being 0 and lowest being
|
|
|
+ 255).
|
|
|
|
|
|
Weight is an integer value from 1 to 254. Weight implementation is
|
|
|
fast, but unfair favoring larger weight values at the expense smaller
|
|
@@ -306,25 +312,26 @@ Chapter 1. Admin Guide
|
|
|
3.16. lcr_rule_table (string)
|
|
|
3.17. prefix_column (string)
|
|
|
3.18. from_uri_column (string)
|
|
|
- 3.19. stopper_column (string)
|
|
|
- 3.20. enabled_column (string)
|
|
|
- 3.21. lcr_rule_target_table (string)
|
|
|
- 3.22. rule_id_column (string)
|
|
|
- 3.23. gw_id_column (string)
|
|
|
- 3.24. priority_column (string)
|
|
|
- 3.25. weight_column (string)
|
|
|
- 3.26. lcr_count (integer)
|
|
|
- 3.27. gw_uri_avp (AVP string)
|
|
|
- 3.28. ruri_user_avp (AVP string)
|
|
|
- 3.29. tag_avp (AVP string)
|
|
|
- 3.30. flags_avp (AVP string)
|
|
|
- 3.31. defunct_capability (integer)
|
|
|
- 3.32. lcr_id_avp (AVP string)
|
|
|
- 3.33. defunct_gw_avp (AVP string)
|
|
|
- 3.34. lcr_rule_hash_size (integer)
|
|
|
- 3.35. lcr_gw_count (integer)
|
|
|
- 3.36. dont_strip_or_tag_flag (integer)
|
|
|
- 3.37. fetch_rows (integer)
|
|
|
+ 3.19. request_uri_column (string)
|
|
|
+ 3.20. stopper_column (string)
|
|
|
+ 3.21. enabled_column (string)
|
|
|
+ 3.22. lcr_rule_target_table (string)
|
|
|
+ 3.23. rule_id_column (string)
|
|
|
+ 3.24. gw_id_column (string)
|
|
|
+ 3.25. priority_column (string)
|
|
|
+ 3.26. weight_column (string)
|
|
|
+ 3.27. lcr_count (integer)
|
|
|
+ 3.28. gw_uri_avp (AVP string)
|
|
|
+ 3.29. ruri_user_avp (AVP string)
|
|
|
+ 3.30. tag_avp (AVP string)
|
|
|
+ 3.31. flags_avp (AVP string)
|
|
|
+ 3.32. defunct_capability (integer)
|
|
|
+ 3.33. lcr_id_avp (AVP string)
|
|
|
+ 3.34. defunct_gw_avp (AVP string)
|
|
|
+ 3.35. lcr_rule_hash_size (integer)
|
|
|
+ 3.36. lcr_gw_count (integer)
|
|
|
+ 3.37. dont_strip_or_tag_flag (integer)
|
|
|
+ 3.38. fetch_rows (integer)
|
|
|
|
|
|
3.1. db_url (string)
|
|
|
|
|
@@ -537,98 +544,110 @@ modparam("lcr", "prefix_column", "number_prefix")
|
|
|
modparam("lcr", "from_uri_column", "caller_uri")
|
|
|
...
|
|
|
|
|
|
-3.19. stopper_column (string)
|
|
|
+3.19. request_uri_column (string)
|
|
|
+
|
|
|
+ Name of the column holding the regular expression to match against the
|
|
|
+ complete request URI (including the "sip:" prefix).
|
|
|
+
|
|
|
+ Default value is “request_uri”.
|
|
|
+
|
|
|
+ Example 1.19. Setting request_uri_column module parameter
|
|
|
+...
|
|
|
+modparam("lcr", "request_uri_column", "callee_uri")
|
|
|
+...
|
|
|
+
|
|
|
+3.20. stopper_column (string)
|
|
|
|
|
|
Name of the column holding rule's stopper attribute.
|
|
|
|
|
|
Default value is “stopper”.
|
|
|
|
|
|
- Example 1.19. Setting stopper_column module parameter
|
|
|
+ Example 1.20. Setting stopper_column module parameter
|
|
|
...
|
|
|
modparam("lcr", "stopper_column", "stop")
|
|
|
...
|
|
|
|
|
|
-3.20. enabled_column (string)
|
|
|
+3.21. enabled_column (string)
|
|
|
|
|
|
Name of the column telling is the rule is currently enabled or
|
|
|
disabled.
|
|
|
|
|
|
Default value is “enabled”.
|
|
|
|
|
|
- Example 1.20. Setting enabled_column module parameter
|
|
|
+ Example 1.21. Setting enabled_column module parameter
|
|
|
...
|
|
|
modparam("lcr", "enabled_column", "in_use")
|
|
|
...
|
|
|
|
|
|
-3.21. lcr_rule_target_table (string)
|
|
|
+3.22. lcr_rule_target_table (string)
|
|
|
|
|
|
Name of the table holding information about the LCR rule targets
|
|
|
(gateways).
|
|
|
|
|
|
Default value is “lcr_rule_target”.
|
|
|
|
|
|
- Example 1.21. Setting lcr_rule_target_table module parameter
|
|
|
+ Example 1.22. Setting lcr_rule_target_table module parameter
|
|
|
...
|
|
|
modparam("lcr", "lcr_rule_target_table", "rules")
|
|
|
...
|
|
|
|
|
|
-3.22. rule_id_column (string)
|
|
|
+3.23. rule_id_column (string)
|
|
|
|
|
|
Name of lcr_rule_target_table column containing an id of lcr_rule
|
|
|
table.
|
|
|
|
|
|
Default value is “rule_id”.
|
|
|
|
|
|
- Example 1.22. Setting rule_id_column module parameter
|
|
|
+ Example 1.23. Setting rule_id_column module parameter
|
|
|
...
|
|
|
modparam("lcr", "rule_id_column", "rule")
|
|
|
...
|
|
|
|
|
|
-3.23. gw_id_column (string)
|
|
|
+3.24. gw_id_column (string)
|
|
|
|
|
|
Name of lcr_rule_target_table column containing an id of lcr_gw table.
|
|
|
|
|
|
Default value is “gw_id”.
|
|
|
|
|
|
- Example 1.23. Setting gw_id_column module parameter
|
|
|
+ Example 1.24. Setting gw_id_column module parameter
|
|
|
...
|
|
|
modparam("lcr", "gw_id_column", "gw")
|
|
|
...
|
|
|
|
|
|
-3.24. priority_column (string)
|
|
|
+3.25. priority_column (string)
|
|
|
|
|
|
Name of the column holding the priority of the rule target.
|
|
|
|
|
|
Default value is “priority”.
|
|
|
|
|
|
- Example 1.24. Setting priority_column module parameter
|
|
|
+ Example 1.25. Setting priority_column module parameter
|
|
|
...
|
|
|
modparam("lcr", "priority_column", "priority")
|
|
|
...
|
|
|
|
|
|
-3.25. weight_column (string)
|
|
|
+3.26. weight_column (string)
|
|
|
|
|
|
Name of the column holding weight of rule target.
|
|
|
|
|
|
Default value is “weight”.
|
|
|
|
|
|
- Example 1.25. Setting weight_column module parameter
|
|
|
+ Example 1.26. Setting weight_column module parameter
|
|
|
...
|
|
|
modparam("lcr","weight_column", "target_weight")
|
|
|
...
|
|
|
|
|
|
-3.26. lcr_count (integer)
|
|
|
+3.27. lcr_count (integer)
|
|
|
|
|
|
Number of LCR instances.
|
|
|
|
|
|
Default value is 1.
|
|
|
|
|
|
- Example 1.26. Setting lcr_count module parameter
|
|
|
+ Example 1.27. Setting lcr_count module parameter
|
|
|
...
|
|
|
modparam("lcr", "lcr_count", 10)
|
|
|
...
|
|
|
|
|
|
-3.27. gw_uri_avp (AVP string)
|
|
|
+3.28. gw_uri_avp (AVP string)
|
|
|
|
|
|
Internal AVP that load_gws() function uses to store information of
|
|
|
matching gateways.
|
|
@@ -636,12 +655,12 @@ modparam("lcr", "lcr_count", 10)
|
|
|
There is NO default value, thus this variable must be defined in
|
|
|
sip-router.cfg.
|
|
|
|
|
|
- Example 1.27. Setting gw_uri_avp module parameter
|
|
|
+ Example 1.28. Setting gw_uri_avp module parameter
|
|
|
...
|
|
|
modparam("lcr", "gw_uri_avp", "$avp(i:709)")
|
|
|
...
|
|
|
|
|
|
-3.28. ruri_user_avp (AVP string)
|
|
|
+3.29. ruri_user_avp (AVP string)
|
|
|
|
|
|
Internal AVP that next_gw function uses to store Request-URI user for
|
|
|
subsequent next_gw calls.
|
|
@@ -649,12 +668,12 @@ modparam("lcr", "gw_uri_avp", "$avp(i:709)")
|
|
|
There is NO default value, thus this variable must be defined in
|
|
|
sip-router.cfg.
|
|
|
|
|
|
- Example 1.28. Setting ruri_user_avp module parameter
|
|
|
+ Example 1.29. Setting ruri_user_avp module parameter
|
|
|
...
|
|
|
modparam("lcr", "ruri_user_avp", "$avp(i:500)")
|
|
|
...
|
|
|
|
|
|
-3.29. tag_avp (AVP string)
|
|
|
+3.30. tag_avp (AVP string)
|
|
|
|
|
|
If defined, an AVP where successful next_gw and from_gw functions store
|
|
|
gateway's tag.
|
|
@@ -662,12 +681,12 @@ modparam("lcr", "ruri_user_avp", "$avp(i:500)")
|
|
|
There is NO default value, i.e, if not defined, gateway's tag is not
|
|
|
stored anywhere.
|
|
|
|
|
|
- Example 1.29. Setting tag_avp module parameter
|
|
|
+ Example 1.30. Setting tag_avp module parameter
|
|
|
...
|
|
|
modparam("lcr", "tag_avp", "$avp(lcr_tag)")
|
|
|
...
|
|
|
|
|
|
-3.30. flags_avp (AVP string)
|
|
|
+3.31. flags_avp (AVP string)
|
|
|
|
|
|
If defined, an AVP where successful next_gw and from_gw functions store
|
|
|
gateway's flags.
|
|
@@ -675,24 +694,24 @@ modparam("lcr", "tag_avp", "$avp(lcr_tag)")
|
|
|
There is NO default value, i.e, if not defined, gateway's flags are not
|
|
|
stored anywhere.
|
|
|
|
|
|
- Example 1.30. Setting flags_avp module parameter
|
|
|
+ Example 1.31. Setting flags_avp module parameter
|
|
|
...
|
|
|
modparam("lcr", "flags_avp", "$avp(i:712)")
|
|
|
...
|
|
|
|
|
|
-3.31. defunct_capability (integer)
|
|
|
+3.32. defunct_capability (integer)
|
|
|
|
|
|
Tells if defunct capability of (non-responsive) gateways is supported.
|
|
|
Non-zero value turns on defunct capability.
|
|
|
|
|
|
Default value is 0.
|
|
|
|
|
|
- Example 1.31. Setting defunct_capability module parameter
|
|
|
+ Example 1.32. Setting defunct_capability module parameter
|
|
|
...
|
|
|
modparam("lcr", "defunct_capability", 1)
|
|
|
...
|
|
|
|
|
|
-3.32. lcr_id_avp (AVP string)
|
|
|
+3.33. lcr_id_avp (AVP string)
|
|
|
|
|
|
Internal AVP that load_gws() function uses to store LCR instance
|
|
|
identifier of loaded gateways. Only needed if gateway defunct
|
|
@@ -700,12 +719,12 @@ modparam("lcr", "defunct_capability", 1)
|
|
|
|
|
|
There is NO default value.
|
|
|
|
|
|
- Example 1.32. Setting lcr_id_avp module parameter
|
|
|
+ Example 1.33. Setting lcr_id_avp module parameter
|
|
|
...
|
|
|
modparam("lcr", "lcr_id_avp", "$avp(s:lcr_id_avp)")
|
|
|
...
|
|
|
|
|
|
-3.33. defunct_gw_avp (AVP string)
|
|
|
+3.34. defunct_gw_avp (AVP string)
|
|
|
|
|
|
Internal AVP that next_gw() function uses to store internal index of
|
|
|
the selected gateway for later use by defunct_gw() function. Only
|
|
@@ -713,12 +732,12 @@ modparam("lcr", "lcr_id_avp", "$avp(s:lcr_id_avp)")
|
|
|
|
|
|
There is NO default value.
|
|
|
|
|
|
- Example 1.33. Setting defunct_gw_avp module parameter
|
|
|
+ Example 1.34. Setting defunct_gw_avp module parameter
|
|
|
...
|
|
|
modparam("lcr", "defunct_gw_avp", "$avp(s:defunct_gw_avp)")
|
|
|
...
|
|
|
|
|
|
-3.34. lcr_rule_hash_size (integer)
|
|
|
+3.35. lcr_rule_hash_size (integer)
|
|
|
|
|
|
Defines the size of hash table used to store LCR rules. Hashing is done
|
|
|
based on rule's prefix. Larger value means less collisions with other
|
|
@@ -726,35 +745,35 @@ modparam("lcr", "defunct_gw_avp", "$avp(s:defunct_gw_avp)")
|
|
|
|
|
|
Default value is 128.
|
|
|
|
|
|
- Example 1.34. Setting lcr_rule_hash_size module parameter
|
|
|
+ Example 1.35. Setting lcr_rule_hash_size module parameter
|
|
|
...
|
|
|
modparam("lcr", "lcr_rule_hash_size", 1024)
|
|
|
...
|
|
|
|
|
|
-3.35. lcr_gw_count (integer)
|
|
|
+3.36. lcr_gw_count (integer)
|
|
|
|
|
|
Defines the maximum number of gateways in lcr_gw table.
|
|
|
|
|
|
Default value is 128.
|
|
|
|
|
|
- Example 1.35. Setting lcr_gw_count module parameter
|
|
|
+ Example 1.36. Setting lcr_gw_count module parameter
|
|
|
...
|
|
|
modparam("lcr", "lcr_gw_count", 1024)
|
|
|
...
|
|
|
|
|
|
-3.36. dont_strip_or_tag_flag (integer)
|
|
|
+3.37. dont_strip_or_tag_flag (integer)
|
|
|
|
|
|
Defines the flag number used to tell if stripping and tagging is done
|
|
|
for the selected gateway.
|
|
|
|
|
|
Default value is -1 meaning that the flag is not defined.
|
|
|
|
|
|
- Example 1.36. Setting dont_strip_or_tag_flag module parameter
|
|
|
+ Example 1.37. Setting dont_strip_or_tag_flag module parameter
|
|
|
...
|
|
|
modparam("lcr", "dont_strip_or_tag_flag", 10)
|
|
|
...
|
|
|
|
|
|
-3.37. fetch_rows (integer)
|
|
|
+3.38. fetch_rows (integer)
|
|
|
|
|
|
The number of the rows to be fetched at once from database when loading
|
|
|
data from lcr_rule table. This value can be used to tune the load time
|
|
@@ -764,7 +783,7 @@ modparam("lcr", "dont_strip_or_tag_flag", 10)
|
|
|
|
|
|
Default value is “1024”.
|
|
|
|
|
|
- Example 1.37. Set fetch_rows parameter
|
|
|
+ Example 1.38. Set fetch_rows parameter
|
|
|
...
|
|
|
modparam("lcr", "fetch_rows", 3000)
|
|
|
...
|
|
@@ -799,7 +818,7 @@ modparam("lcr", "fetch_rows", 3000)
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE.
|
|
|
|
|
|
- Example 1.38. load_gws usage
|
|
|
+ Example 1.39. load_gws usage
|
|
|
...
|
|
|
if (!load_gws(1, $rU, $var(caller_uri))) {
|
|
|
sl_send_reply("500", "Server Internal Error - Cannot load gateways");
|
|
@@ -829,7 +848,7 @@ if (!load_gws(1, $rU, $var(caller_uri))) {
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.39. next_gw usage from a route block
|
|
|
+ Example 1.40. next_gw usage from a route block
|
|
|
...
|
|
|
if (!next_gw()) {
|
|
|
sl_send_reply("503", "Service not available - No gateways");
|
|
@@ -837,7 +856,7 @@ if (!next_gw()) {
|
|
|
};
|
|
|
...
|
|
|
|
|
|
- Example 1.40. next_gw usage from a failure route block
|
|
|
+ Example 1.41. next_gw usage from a failure route block
|
|
|
...
|
|
|
if (!next_gw()) {
|
|
|
t_reply("503", "Service not available - No more gateways");
|
|
@@ -857,7 +876,7 @@ if (!next_gw()) {
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.41. defunct_gw usage
|
|
|
+ Example 1.42. defunct_gw usage
|
|
|
...
|
|
|
defunct_gw(60);
|
|
|
...
|
|
@@ -889,7 +908,7 @@ defunct_gw(60);
|
|
|
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
|
|
|
ONREPLY_ROUTE.
|
|
|
|
|
|
- Example 1.42. from_gw usage
|
|
|
+ Example 1.43. from_gw usage
|
|
|
...
|
|
|
if (from_gw(1, $avp(s:real_source_addr), 2) {
|
|
|
...
|
|
@@ -919,7 +938,7 @@ if (from_gw(1, $avp(s:real_source_addr), 2) {
|
|
|
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
|
|
|
ONREPLY_ROUTE.
|
|
|
|
|
|
- Example 1.43. from_gw usage
|
|
|
+ Example 1.44. from_gw usage
|
|
|
...
|
|
|
$var(lcr_id) = from_any_gw("192.168.1.1", 3);
|
|
|
...
|
|
@@ -940,7 +959,7 @@ $var(lcr_id) = from_any_gw("192.168.1.1", 3);
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.44. to_gw usage
|
|
|
+ Example 1.45. to_gw usage
|
|
|
...
|
|
|
if (to_gw("1")) {
|
|
|
...
|
|
@@ -966,7 +985,7 @@ if (to_gw("1")) {
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.45. to_gw usage
|
|
|
+ Example 1.46. to_gw usage
|
|
|
...
|
|
|
if (to_any_gw("192.55.66.2", 1)) {
|
|
|
...
|
|
@@ -989,7 +1008,7 @@ if (to_any_gw("192.55.66.2", 1)) {
|
|
|
|
|
|
Parameters: none
|
|
|
|
|
|
- Example 1.46. lcr.reload RPC example
|
|
|
+ Example 1.47. lcr.reload RPC example
|
|
|
$ sercmd lcr.reload
|
|
|
|
|
|
5.2. lcr.dump_gws
|
|
@@ -998,7 +1017,7 @@ if (to_any_gw("192.55.66.2", 1)) {
|
|
|
|
|
|
Parameters: none
|
|
|
|
|
|
- Example 1.47. lcr.dump_gws RPC example
|
|
|
+ Example 1.48. lcr.dump_gws RPC example
|
|
|
$ sercmd lcr.dump_gws
|
|
|
|
|
|
5.3. lcr.dump_rules
|
|
@@ -1008,7 +1027,7 @@ if (to_any_gw("192.55.66.2", 1)) {
|
|
|
|
|
|
Parameters: none
|
|
|
|
|
|
- Example 1.48. lcr.dump_rules RPC example
|
|
|
+ Example 1.49. lcr.dump_rules RPC example
|
|
|
$ sercmd lcr.dump_rules
|
|
|
|
|
|
5.4. lcr.defunct_gw
|
|
@@ -1021,7 +1040,7 @@ if (to_any_gw("192.55.66.2", 1)) {
|
|
|
|
|
|
Parameters: lcr_id gw_id period
|
|
|
|
|
|
- Example 1.49. lcr.defunct_gw RPC example
|
|
|
+ Example 1.50. lcr.defunct_gw RPC example
|
|
|
$ sercmd lcr.defunct_gw 1 4 120
|
|
|
|
|
|
6. Known Limitations
|