Skip to content

Commit

Permalink
modules: readme files regenerated - dispatcher ... [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
kamailio-dev committed Apr 11, 2022
1 parent 06aa21a commit 4033b3b
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 26 deletions.
69 changes: 43 additions & 26 deletions src/modules/dispatcher/README
Expand Up @@ -101,6 +101,7 @@ Federico Cabiddu
3.40. reload_delta (int)
3.41. ds_dns_mode (int)
3.42. ds_dns_interval (int)
3.43. ds_dns_ttl (int)

4. Functions

Expand Down Expand Up @@ -193,19 +194,20 @@ Federico Cabiddu
1.42. Set reload_delta parameter
1.43. Set the “ds_dns_mode” parameter
1.44. Set the “ds_dns_interval” parameter
1.45. latency_optimized_dispatching usage
1.46. ds_select_dst usage
1.47. configuring load balancing with congestion detection
1.48. ds_select_domain usage
1.49. ds_select usage
1.50. ds_select_routes usage
1.51. ds_mark_dst usage
1.52. ds_list_exists usage
1.53. ds_is_from_list usage
1.54. ds_is_active usage
1.55. ds_load_unset usage
1.56. dispatcher list file
1.57. Kamailio config script - sample dispatcher usage
1.45. Set the “ds_dns_ttl” parameter
1.46. latency_optimized_dispatching usage
1.47. ds_select_dst usage
1.48. configuring load balancing with congestion detection
1.49. ds_select_domain usage
1.50. ds_select usage
1.51. ds_select_routes usage
1.52. ds_mark_dst usage
1.53. ds_list_exists usage
1.54. ds_is_from_list usage
1.55. ds_is_active usage
1.56. ds_load_unset usage
1.57. dispatcher list file
1.58. Kamailio config script - sample dispatcher usage

Chapter 1. Admin Guide

Expand Down Expand Up @@ -261,6 +263,7 @@ Chapter 1. Admin Guide
3.40. reload_delta (int)
3.41. ds_dns_mode (int)
3.42. ds_dns_interval (int)
3.43. ds_dns_ttl (int)

4. Functions

Expand Down Expand Up @@ -384,6 +387,7 @@ Chapter 1. Admin Guide
3.40. reload_delta (int)
3.41. ds_dns_mode (int)
3.42. ds_dns_interval (int)
3.43. ds_dns_ttl (int)

3.1. list_file (string)

Expand Down Expand Up @@ -1056,6 +1060,19 @@ modparam("dispatcher", "ds_dns_mode", 2)
modparam("dispatcher", "ds_interval_mode", 1800)
...

3.43. ds_dns_ttl (int)

The interval in seconds to set TTL for DNS results received for queries
dones inside this module. If 0, this TTL is not set, result and core
values are used.

Default value is “0”.

Example 1.45. Set the “ds_dns_ttl” parameter
...
modparam("dispatcher", "ds_interval_mode", 7200)
...

4. Functions

4.1. ds_select_dst(set, alg[, limit])
Expand Down Expand Up @@ -1167,7 +1184,7 @@ modparam("dispatcher", "ds_interval_mode", 1800)
- If the attribute 'cc=1' is set, the latency used is
congestion ms : estimate (current latency ms) - average
(normal condition latency ms).
Example 1.45. latency_optimized_dispatching usage
Example 1.46. latency_optimized_dispatching usage
Using this simple formula :
ADJUSTED_PRIORITY = PRIORITY - (ESTIMATED_LATENCY_MS/PRIORITY)

Expand All @@ -1193,7 +1210,7 @@ With congestion control the formula becomes :

This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.

Example 1.46. ds_select_dst usage
Example 1.47. ds_select_dst usage
...
ds_select_dst("1", "0");
...
Expand All @@ -1203,7 +1220,7 @@ ds_select_dst("1", "$var(a)");
ds_select_dst("1", "4", "3");
...

Example 1.47. configuring load balancing with congestion detection
Example 1.48. configuring load balancing with congestion detection
...
# sample of SQL provisionning statements
INSERT INTO "dispatcher"
Expand Down Expand Up @@ -1257,7 +1274,7 @@ DEST: {

This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.

Example 1.48. ds_select_domain usage
Example 1.49. ds_select_domain usage
...
$var(a) = 4;
if(ds_select_domain("1", "$var(a)")) {
Expand All @@ -1281,7 +1298,7 @@ if(ds_select_domain("1", "$var(a)")) {

This function can be used from ANY_ROUTE.

Example 1.49. ds_select usage
Example 1.50. ds_select usage
...
$var(a) = 4;
if(ds_select("1", "$var(a)")) {
Expand Down Expand Up @@ -1324,7 +1341,7 @@ if(ds_select("1", "$var(a)")) {

This function can be used from ANY_ROUTE.

Example 1.50. ds_select_routes usage
Example 1.51. ds_select_routes usage
...
$var(alg) = 4;
$var(limit) = 8;
Expand Down Expand Up @@ -1399,7 +1416,7 @@ failure_route[REROUTE] {

This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.

Example 1.51. ds_mark_dst usage
Example 1.52. ds_mark_dst usage
...
failure_route[tryagain] {
...
Expand All @@ -1421,7 +1438,7 @@ failure_route[tryagain] {

This function can be used from ANY_ROUTE.

Example 1.52. ds_list_exists usage
Example 1.53. ds_list_exists usage
...
if(ds_list_exists("10")) {
...
Expand Down Expand Up @@ -1465,7 +1482,7 @@ if(ds_list_exists("10")) {

This function can be used from ANY_ROUTE.

Example 1.53. ds_is_from_list usage
Example 1.54. ds_is_from_list usage
...
if(ds_is_from_list()) {
...
Expand Down Expand Up @@ -1495,7 +1512,7 @@ if(ds_is_from_list("10", "3", "sip:127.0.0.1:5080")) {

This function can be used from ANY_ROUTE.

Example 1.54. ds_is_active usage
Example 1.55. ds_is_active usage
...
if(ds_is_active("10")) {
...
Expand Down Expand Up @@ -1523,7 +1540,7 @@ if(ds_is_active("10", "sip:127.0.0.1:5080")) {
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
BRANCH_ROUTE and ONREPLY_ROUTE.

Example 1.55. ds_load_unset usage
Example 1.56. ds_load_unset usage
...
route {
...
Expand Down Expand Up @@ -1836,7 +1853,7 @@ setid(int) destination(sip uri) flags(int,opt) priority(int,opt) attrs(str,opt)
For database, each element of a line resides in a different column.
Next is a dispatcher.list file example:

Example 1.56. dispatcher list file
Example 1.57. dispatcher list file
...
#
# dispatcher destination sets (groups)
Expand All @@ -1861,7 +1878,7 @@ r,opt)

Next listing shows a sample config for using the dispatcher module.

Example 1.57. Kamailio config script - sample dispatcher usage
Example 1.58. Kamailio config script - sample dispatcher usage
...
#!KAMAILIO
#
Expand Down
22 changes: 22 additions & 0 deletions src/modules/ipops/README
Expand Up @@ -44,6 +44,7 @@ Iñaki Baz Castillo
4.16. dns_query(hostname, pvid)
4.17. srv_query(srvcname, pvid)
4.18. naptr_query(domain, pvid)
4.19. dns_set_local_ttl(vttl)

List of Examples

Expand All @@ -65,6 +66,7 @@ Iñaki Baz Castillo
1.16. dns_query usage
1.17. srv_query usage
1.18. naptr_query usage
1.19. dns_set_local_ttl usage

Chapter 1. Admin Guide

Expand Down Expand Up @@ -97,6 +99,7 @@ Chapter 1. Admin Guide
4.16. dns_query(hostname, pvid)
4.17. srv_query(srvcname, pvid)
4.18. naptr_query(domain, pvid)
4.19. dns_set_local_ttl(vttl)

1. Overview

Expand Down Expand Up @@ -156,6 +159,7 @@ Chapter 1. Admin Guide
4.16. dns_query(hostname, pvid)
4.17. srv_query(srvcname, pvid)
4.18. naptr_query(domain, pvid)
4.19. dns_set_local_ttl(vttl)

4.1. is_ip (ip)

Expand Down Expand Up @@ -612,3 +616,21 @@ if (naptr_query ("example.com", "res") > 0) {
}
}
...

4.19. dns_set_local_ttl(vttl)

Set local ttl for DNS query results. If vttl is 0, then the value of
the result and the core parameters are used.

Parameters:
* vttl - TTL value in seconds. It can be static integer or a variable
holding an integer value.

This function can be used from ANY_ROUTE.

Example 1.19. dns_set_local_ttl usage
...
dns_set_local_ttl("7200");
dns_query("test.com", "xyz")
dns_set_local_ttl("0");
...

0 comments on commit 4033b3b

Please sign in to comment.