فهرست منبع

modules: readme files regenerated - dispatcher ... [skip ci]

Kamailio Dev 5 ماه پیش
والد
کامیت
e66a876c2c
2فایلهای تغییر یافته به همراه194 افزوده شده و 108 حذف شده
  1. 104 88
      src/modules/dispatcher/README
  2. 90 20
      src/modules/dmq/README

+ 104 - 88
src/modules/dispatcher/README

@@ -94,15 +94,16 @@ Federico Cabiddu
               3.33. outbound_proxy (str)
               3.33. outbound_proxy (str)
               3.34. ds_default_socket (str)
               3.34. ds_default_socket (str)
               3.35. ds_default_sockname (str)
               3.35. ds_default_sockname (str)
-              3.36. ds_timer_mode (int)
-              3.37. event_callback (str)
-              3.38. ds_attrs_none (int)
-              3.39. ds_db_extra_attrs (str)
-              3.40. ds_load_mode (int)
-              3.41. reload_delta (int)
-              3.42. ds_dns_mode (int)
-              3.43. ds_dns_interval (int)
-              3.44. ds_dns_ttl (int)
+              3.36. ds_ping_socket (str)
+              3.37. ds_timer_mode (int)
+              3.38. event_callback (str)
+              3.39. ds_attrs_none (int)
+              3.40. ds_db_extra_attrs (str)
+              3.41. ds_load_mode (int)
+              3.42. reload_delta (int)
+              3.43. ds_dns_mode (int)
+              3.44. ds_dns_interval (int)
+              3.45. ds_dns_ttl (int)
 
 
         4. Functions
         4. Functions
 
 
@@ -192,32 +193,33 @@ Federico Cabiddu
    1.35. Set the “outbound_proxy” parameter
    1.35. Set the “outbound_proxy” parameter
    1.36. Set the “ds_default_socket” parameter
    1.36. Set the “ds_default_socket” parameter
    1.37. Set the “ds_default_sockname” parameter
    1.37. Set the “ds_default_sockname” parameter
-   1.38. Set the “ds_timer_mode” parameter
-   1.39. Set event_callback parameter
-   1.40. Set the “ds_attrs_none” parameter
-   1.41. Set the “ds_db_extra_attrs” parameter
-   1.42. Set the “ds_load_mode” parameter
-   1.43. Set reload_delta parameter
-   1.44. Set the “ds_dns_mode” parameter
-   1.45. Set the “ds_dns_interval” parameter
-   1.46. Set the “ds_dns_ttl” parameter
-   1.47. latency_optimized_dispatching usage
-   1.48. ds_select_dst usage
-   1.49. configuring load balancing with congestion detection
-   1.50. ds_select_domain usage
-   1.51. ds_select usage
-   1.52. ds_select_routes usage
-   1.53. ds_mark_dst usage
-   1.54. ds_list_exists usage
-   1.55. ds_is_from_list usage
-   1.56. ds_is_active usage
-   1.57. ds_load_unset usage
-   1.58. ds_reload usage
-   1.59. ds_dsg_fetch() usage
-   1.60. ds_dsg_fetch_uri() usage
-   1.61. ds_oc_set_attrs() usage
-   1.62. dispatcher list file
-   1.63. Kamailio config script - sample dispatcher usage
+   1.38. Set the “ds_ping_socket” parameter
+   1.39. Set the “ds_timer_mode” parameter
+   1.40. Set event_callback parameter
+   1.41. Set the “ds_attrs_none” parameter
+   1.42. Set the “ds_db_extra_attrs” parameter
+   1.43. Set the “ds_load_mode” parameter
+   1.44. Set reload_delta parameter
+   1.45. Set the “ds_dns_mode” parameter
+   1.46. Set the “ds_dns_interval” parameter
+   1.47. Set the “ds_dns_ttl” parameter
+   1.48. latency_optimized_dispatching usage
+   1.49. ds_select_dst usage
+   1.50. configuring load balancing with congestion detection
+   1.51. ds_select_domain usage
+   1.52. ds_select usage
+   1.53. ds_select_routes usage
+   1.54. ds_mark_dst usage
+   1.55. ds_list_exists usage
+   1.56. ds_is_from_list usage
+   1.57. ds_is_active usage
+   1.58. ds_load_unset usage
+   1.59. ds_reload usage
+   1.60. ds_dsg_fetch() usage
+   1.61. ds_dsg_fetch_uri() usage
+   1.62. ds_oc_set_attrs() usage
+   1.63. dispatcher list file
+   1.64. Kamailio config script - sample dispatcher usage
 
 
 Chapter 1. Admin Guide
 Chapter 1. Admin Guide
 
 
@@ -266,15 +268,16 @@ Chapter 1. Admin Guide
         3.33. outbound_proxy (str)
         3.33. outbound_proxy (str)
         3.34. ds_default_socket (str)
         3.34. ds_default_socket (str)
         3.35. ds_default_sockname (str)
         3.35. ds_default_sockname (str)
-        3.36. ds_timer_mode (int)
-        3.37. event_callback (str)
-        3.38. ds_attrs_none (int)
-        3.39. ds_db_extra_attrs (str)
-        3.40. ds_load_mode (int)
-        3.41. reload_delta (int)
-        3.42. ds_dns_mode (int)
-        3.43. ds_dns_interval (int)
-        3.44. ds_dns_ttl (int)
+        3.36. ds_ping_socket (str)
+        3.37. ds_timer_mode (int)
+        3.38. event_callback (str)
+        3.39. ds_attrs_none (int)
+        3.40. ds_db_extra_attrs (str)
+        3.41. ds_load_mode (int)
+        3.42. reload_delta (int)
+        3.43. ds_dns_mode (int)
+        3.44. ds_dns_interval (int)
+        3.45. ds_dns_ttl (int)
 
 
    4. Functions
    4. Functions
 
 
@@ -395,15 +398,16 @@ Chapter 1. Admin Guide
    3.33. outbound_proxy (str)
    3.33. outbound_proxy (str)
    3.34. ds_default_socket (str)
    3.34. ds_default_socket (str)
    3.35. ds_default_sockname (str)
    3.35. ds_default_sockname (str)
-   3.36. ds_timer_mode (int)
-   3.37. event_callback (str)
-   3.38. ds_attrs_none (int)
-   3.39. ds_db_extra_attrs (str)
-   3.40. ds_load_mode (int)
-   3.41. reload_delta (int)
-   3.42. ds_dns_mode (int)
-   3.43. ds_dns_interval (int)
-   3.44. ds_dns_ttl (int)
+   3.36. ds_ping_socket (str)
+   3.37. ds_timer_mode (int)
+   3.38. event_callback (str)
+   3.39. ds_attrs_none (int)
+   3.40. ds_db_extra_attrs (str)
+   3.41. ds_load_mode (int)
+   3.42. reload_delta (int)
+   3.43. ds_dns_mode (int)
+   3.44. ds_dns_interval (int)
+   3.45. ds_dns_ttl (int)
 
 
 3.1. list_file (string)
 3.1. list_file (string)
 
 
@@ -957,7 +961,17 @@ modparam("dispatcher", "ds_default_socket", "udp:192.168.0.125:5060")
 modparam("dispatcher", "ds_default_sockname", "sock1")
 modparam("dispatcher", "ds_default_sockname", "sock1")
 ...
 ...
 
 
-3.36. ds_timer_mode (int)
+3.36. ds_ping_socket (str)
+
+   Default socket to be used for sending ping requests when a gateway has
+   no "ping_socket" configured.
+
+   Example 1.38. Set the “ds_ping_socket” parameter
+...
+modparam("dispatcher", "ds_ping_socket", "udp:192.168.0.125:5060")
+...
+
+3.37. ds_timer_mode (int)
 
 
    Specify the timer process to be used by the module for keepalives and
    Specify the timer process to be used by the module for keepalives and
    active dialogs tracking.
    active dialogs tracking.
@@ -972,12 +986,12 @@ modparam("dispatcher", "ds_default_sockname", "sock1")
 
 
    Default value is “0”.
    Default value is “0”.
 
 
-   Example 1.38. Set the “ds_timer_mode” parameter
+   Example 1.39. Set the “ds_timer_mode” parameter
 ...
 ...
 modparam("dispatcher", "ds_timer_mode", 1)
 modparam("dispatcher", "ds_timer_mode", 1)
 ...
 ...
 
 
-3.37. event_callback (str)
+3.38. event_callback (str)
 
 
    The name of the function in the kemi configuration file (embedded
    The name of the function in the kemi configuration file (embedded
    scripting language such as Lua, Python, ...) to be executed instead of
    scripting language such as Lua, Python, ...) to be executed instead of
@@ -988,7 +1002,7 @@ modparam("dispatcher", "ds_timer_mode", 1)
 
 
    Default value is 'empty' (no function is executed for events).
    Default value is 'empty' (no function is executed for events).
 
 
-   Example 1.39. Set event_callback parameter
+   Example 1.40. Set event_callback parameter
 ...
 ...
 modparam("dispatcher", "event_callback", "ksr_dispatcher_event")
 modparam("dispatcher", "event_callback", "ksr_dispatcher_event")
 ...
 ...
@@ -999,7 +1013,7 @@ function ksr_dispatcher_event(evname)
 end
 end
 ...
 ...
 
 
-3.38. ds_attrs_none (int)
+3.39. ds_attrs_none (int)
 
 
    If set to 1, "none=yes" is set in the attrs for those records that have
    If set to 1, "none=yes" is set in the attrs for those records that have
    no attrs value, to ensure that corresponding XAVP fields for records do
    no attrs value, to ensure that corresponding XAVP fields for records do
@@ -1007,12 +1021,12 @@ end
 
 
    Default value is “0”.
    Default value is “0”.
 
 
-   Example 1.40. Set the “ds_attrs_none” parameter
+   Example 1.41. Set the “ds_attrs_none” parameter
 ...
 ...
 modparam("dispatcher", "ds_attrs_none", 1)
 modparam("dispatcher", "ds_attrs_none", 1)
 ...
 ...
 
 
-3.39. ds_db_extra_attrs (str)
+3.40. ds_db_extra_attrs (str)
 
 
    Set a list of column names to be loaded from database dispatcher table
    Set a list of column names to be loaded from database dispatcher table
    and be concatenated to 'attrs' field. The format is:
    and be concatenated to 'attrs' field. The format is:
@@ -1024,12 +1038,12 @@ modparam("dispatcher", "ds_attrs_none", 1)
 
 
    Default value is “empty”.
    Default value is “empty”.
 
 
-   Example 1.41. Set the “ds_db_extra_attrs” parameter
+   Example 1.42. Set the “ds_db_extra_attrs” parameter
 ...
 ...
 modparam("dispatcher", "ds_db_extra_attrs", "socket=socket;pref=prefix")
 modparam("dispatcher", "ds_db_extra_attrs", "socket=socket;pref=prefix")
 ...
 ...
 
 
-3.40. ds_load_mode (int)
+3.41. ds_load_mode (int)
 
 
    If set to 1, the module throws error when failing to add a destination
    If set to 1, the module throws error when failing to add a destination
    address (e.g., invalid URI). If set to 0, it skips the failing address
    address (e.g., invalid URI). If set to 0, it skips the failing address
@@ -1037,12 +1051,12 @@ modparam("dispatcher", "ds_db_extra_attrs", "socket=socket;pref=prefix")
 
 
    Default value is “0”.
    Default value is “0”.
 
 
-   Example 1.42. Set the “ds_load_mode” parameter
+   Example 1.43. Set the “ds_load_mode” parameter
 ...
 ...
 modparam("dispatcher", "ds_load_mode", 1)
 modparam("dispatcher", "ds_load_mode", 1)
 ...
 ...
 
 
-3.41. reload_delta (int)
+3.42. reload_delta (int)
 
 
    The number of seconds that have to be waited before executing a new
    The number of seconds that have to be waited before executing a new
    reload of dispatcher records. By default there is a rate limiting of
    reload of dispatcher records. By default there is a rate limiting of
@@ -1054,12 +1068,12 @@ modparam("dispatcher", "ds_load_mode", 1)
 
 
    Default value is “5”.
    Default value is “5”.
 
 
-   Example 1.43. Set reload_delta parameter
+   Example 1.44. Set reload_delta parameter
 ...
 ...
 modparam("dispatcher", "reload_delta", 1)
 modparam("dispatcher", "reload_delta", 1)
 ...
 ...
 
 
-3.42. ds_dns_mode (int)
+3.43. ds_dns_mode (int)
 
 
    Specify the how DNS resolving is done for destination addresses.
    Specify the how DNS resolving is done for destination addresses.
 
 
@@ -1075,24 +1089,24 @@ modparam("dispatcher", "reload_delta", 1)
 
 
    Default value is “1”.
    Default value is “1”.
 
 
-   Example 1.44. Set the “ds_dns_mode” parameter
+   Example 1.45. Set the “ds_dns_mode” parameter
 ...
 ...
 modparam("dispatcher", "ds_dns_mode", 2)
 modparam("dispatcher", "ds_dns_mode", 2)
 ...
 ...
 
 
-3.43. ds_dns_interval (int)
+3.44. ds_dns_interval (int)
 
 
    The interval in seconds to periodically refresh the DNS queries for
    The interval in seconds to periodically refresh the DNS queries for
    destination addresses if ds_dns_mode has value 4 set.
    destination addresses if ds_dns_mode has value 4 set.
 
 
    Default value is “600”.
    Default value is “600”.
 
 
-   Example 1.45. Set the “ds_dns_interval” parameter
+   Example 1.46. Set the “ds_dns_interval” parameter
 ...
 ...
 modparam("dispatcher", "ds_interval_mode", 1800)
 modparam("dispatcher", "ds_interval_mode", 1800)
 ...
 ...
 
 
-3.44. ds_dns_ttl (int)
+3.45. ds_dns_ttl (int)
 
 
    The interval in seconds to set TTL for DNS results received for queries
    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
    dones inside this module. If 0, this TTL is not set, result and core
@@ -1100,7 +1114,7 @@ modparam("dispatcher", "ds_interval_mode", 1800)
 
 
    Default value is “0”.
    Default value is “0”.
 
 
-   Example 1.46. Set the “ds_dns_ttl” parameter
+   Example 1.47. Set the “ds_dns_ttl” parameter
 ...
 ...
 modparam("dispatcher", "ds_interval_mode", 7200)
 modparam("dispatcher", "ds_interval_mode", 7200)
 ...
 ...
@@ -1219,7 +1233,7 @@ modparam("dispatcher", "ds_interval_mode", 7200)
             - If the attribute 'cc=1' is set, the latency used is
             - If the attribute 'cc=1' is set, the latency used is
             congestion ms : estimate (current latency ms) - average
             congestion ms : estimate (current latency ms) - average
             (normal condition latency ms).
             (normal condition latency ms).
-            Example 1.47. latency_optimized_dispatching usage
+            Example 1.48. latency_optimized_dispatching usage
 Using this simple formula :
 Using this simple formula :
     ADJUSTED_PRIORITY = PRIORITY - (ESTIMATED_LATENCY_MS/PRIORITY)
     ADJUSTED_PRIORITY = PRIORITY - (ESTIMATED_LATENCY_MS/PRIORITY)
 
 
@@ -1250,7 +1264,7 @@ With congestion control the formula becomes :
 
 
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
 
 
-   Example 1.48. ds_select_dst usage
+   Example 1.49. ds_select_dst usage
 ...
 ...
 ds_select_dst("1", "0");
 ds_select_dst("1", "0");
 ...
 ...
@@ -1260,7 +1274,7 @@ ds_select_dst("1", "$var(a)");
 ds_select_dst("1", "4", "3");
 ds_select_dst("1", "4", "3");
 ...
 ...
 
 
-   Example 1.49. configuring load balancing with congestion detection
+   Example 1.50. configuring load balancing with congestion detection
 ...
 ...
 # sample of SQL provisioning statements
 # sample of SQL provisioning statements
 INSERT INTO "dispatcher"
 INSERT INTO "dispatcher"
@@ -1314,7 +1328,7 @@ DEST: {
 
 
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
 
 
-   Example 1.50. ds_select_domain usage
+   Example 1.51. ds_select_domain usage
 ...
 ...
 $var(a) = 4;
 $var(a) = 4;
 if(ds_select_domain("1", "$var(a)")) {
 if(ds_select_domain("1", "$var(a)")) {
@@ -1338,7 +1352,7 @@ if(ds_select_domain("1", "$var(a)")) {
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.51. ds_select usage
+   Example 1.52. ds_select usage
 ...
 ...
 $var(a) = 4;
 $var(a) = 4;
 if(ds_select("1", "$var(a)")) {
 if(ds_select("1", "$var(a)")) {
@@ -1381,7 +1395,7 @@ if(ds_select("1", "$var(a)")) {
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.52. ds_select_routes usage
+   Example 1.53. ds_select_routes usage
 ...
 ...
 $var(alg) = 4;
 $var(alg) = 4;
 $var(limit) = 8;
 $var(limit) = 8;
@@ -1456,7 +1470,7 @@ failure_route[REROUTE] {
 
 
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
 
 
-   Example 1.53. ds_mark_dst usage
+   Example 1.54. ds_mark_dst usage
 ...
 ...
 failure_route[tryagain] {
 failure_route[tryagain] {
 ...
 ...
@@ -1478,7 +1492,7 @@ failure_route[tryagain] {
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.54. ds_list_exists usage
+   Example 1.55. ds_list_exists usage
 ...
 ...
 if(ds_list_exists("10")) {
 if(ds_list_exists("10")) {
     ...
     ...
@@ -1530,7 +1544,7 @@ if(ds_list_exists("10")) {
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.55. ds_is_from_list usage
+   Example 1.56. ds_is_from_list usage
 ...
 ...
 if(ds_is_from_list()) {
 if(ds_is_from_list()) {
     ...
     ...
@@ -1560,7 +1574,7 @@ if(ds_is_from_list("10", "3", "sip:127.0.0.1:5080")) {
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.56. ds_is_active usage
+   Example 1.57. ds_is_active usage
 ...
 ...
 if(ds_is_active("10")) {
 if(ds_is_active("10")) {
     ...
     ...
@@ -1588,7 +1602,7 @@ if(ds_is_active("10", "sip:127.0.0.1:5080")) {
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    BRANCH_ROUTE and ONREPLY_ROUTE.
    BRANCH_ROUTE and ONREPLY_ROUTE.
 
 
-   Example 1.57. ds_load_unset usage
+   Example 1.58. ds_load_unset usage
 ...
 ...
 route {
 route {
     ...
     ...
@@ -1622,7 +1636,7 @@ onreply_route {
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.58. ds_reload usage
+   Example 1.59. ds_reload usage
 ...
 ...
     ds_reload();
     ds_reload();
 ...
 ...
@@ -1636,7 +1650,7 @@ onreply_route {
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.59. ds_dsg_fetch() usage
+   Example 1.60. ds_dsg_fetch() usage
 ...
 ...
     ds_dsg_fetch("1");
     ds_dsg_fetch("1");
     xinfo("set id: 1 - all: $dsg(count); active: $dsg(active)\n");
     xinfo("set id: 1 - all: $dsg(count); active: $dsg(active)\n");
@@ -1653,7 +1667,7 @@ onreply_route {
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.60. ds_dsg_fetch_uri() usage
+   Example 1.61. ds_dsg_fetch_uri() usage
 ...
 ...
     ds_dsg_fetch_uri("1", "sip:127.0.0.1:5080");
     ds_dsg_fetch_uri("1", "sip:127.0.0.1:5080");
     xinfo("set id: 1 - all: $dsg(count); active: $dsg(active); $dsg(ocrate)\n");
     xinfo("set id: 1 - all: $dsg(count); active: $dsg(active); $dsg(ocrate)\n");
@@ -1685,7 +1699,7 @@ onreply_route {
 
 
    This function can be used from ANY_ROUTE.
    This function can be used from ANY_ROUTE.
 
 
-   Example 1.61. ds_oc_set_attrs() usage
+   Example 1.62. ds_oc_set_attrs() usage
 ...
 ...
     ds_oc_set_attrs("1", "sip:127.0.0.1:5080", "30", "180000", "1");
     ds_oc_set_attrs("1", "sip:127.0.0.1:5080", "30", "180000", "1");
 ...
 ...
@@ -1961,6 +1975,8 @@ kamcli dispatcher.oclist 1
        ds_select_dst().
        ds_select_dst().
      * 'socket' - used to set the sending socket for the gateway. It is
      * 'socket' - used to set the sending socket for the gateway. It is
        used for sending the SIP traffic as well as OPTIONS keepalives.
        used for sending the SIP traffic as well as OPTIONS keepalives.
+     * 'ping_socket' - used to set the sending socket for ping requests.
+       It overwrites the general ds_ping_socket parameter.
      * 'sockname' - used to set by name the sending socket for the
      * 'sockname' - used to set by name the sending socket for the
        gateway. It is used for sending the SIP traffic as well as OPTIONS
        gateway. It is used for sending the SIP traffic as well as OPTIONS
        keepalives and has priority over 'socket' attribute.
        keepalives and has priority over 'socket' attribute.
@@ -1990,7 +2006,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.
    For database, each element of a line resides in a different column.
    Next is a dispatcher.list file example:
    Next is a dispatcher.list file example:
 
 
-   Example 1.62. dispatcher list file
+   Example 1.63. dispatcher list file
 ...
 ...
 #
 #
 # dispatcher destination sets (groups)
 # dispatcher destination sets (groups)
@@ -2015,7 +2031,7 @@ r,opt)
 
 
    Next listing shows a sample config for using the dispatcher module.
    Next listing shows a sample config for using the dispatcher module.
 
 
-   Example 1.63. Kamailio config script - sample dispatcher usage
+   Example 1.64. Kamailio config script - sample dispatcher usage
 ...
 ...
 #!KAMAILIO
 #!KAMAILIO
 #
 #

+ 90 - 20
src/modules/dmq/README

@@ -47,6 +47,9 @@ Charles Chance
               3.7. worker_usleep(int)
               3.7. worker_usleep(int)
               3.8. ping_interval(int)
               3.8. ping_interval(int)
               3.9. remove_inactive(int)
               3.9. remove_inactive(int)
+              3.10. fail_count_enabled(int)
+              3.11. fail_count_threshold_not_active(int)
+              3.12. fail_count_threshold_disabled(int)
 
 
         4. Functions
         4. Functions
 
 
@@ -86,14 +89,17 @@ Charles Chance
    1.8. Set worker_usleep parameter
    1.8. Set worker_usleep parameter
    1.9. Set ping_interval parameter
    1.9. Set ping_interval parameter
    1.10. Set remove_inactive parameter
    1.10. Set remove_inactive parameter
-   1.11. dmq_handle_message usage
-   1.12. dmq_process_message usage
-   1.13. dmq_send_message usage
-   1.14. dmq_bcast_message usage
-   1.15. dmq_t_replicate usage
-   1.16. dmq_is_from_node usage
-   1.17. dmq.list_nodes usage
-   1.18. dmq.remove usage
+   1.11. Set fail_count_enabled parameter
+   1.12. Set fail_count_threshold_not_active parameter
+   1.13. Set fail_count_threshold_disabled parameter
+   1.14. dmq_handle_message usage
+   1.15. dmq_process_message usage
+   1.16. dmq_send_message usage
+   1.17. dmq_bcast_message usage
+   1.18. dmq_t_replicate usage
+   1.19. dmq_is_from_node usage
+   1.20. dmq.list_nodes usage
+   1.21. dmq.remove usage
    2.1. dmq_api_t structure
    2.1. dmq_api_t structure
    2.2. register_dmq_peer usage
    2.2. register_dmq_peer usage
    2.3. bcast_message usage
    2.3. bcast_message usage
@@ -123,6 +129,9 @@ Chapter 1. Admin Guide
         3.7. worker_usleep(int)
         3.7. worker_usleep(int)
         3.8. ping_interval(int)
         3.8. ping_interval(int)
         3.9. remove_inactive(int)
         3.9. remove_inactive(int)
+        3.10. fail_count_enabled(int)
+        3.11. fail_count_threshold_not_active(int)
+        3.12. fail_count_threshold_disabled(int)
 
 
    4. Functions
    4. Functions
 
 
@@ -177,6 +186,15 @@ Chapter 1. Admin Guide
    different major versions and can lead to crashes or unexpected
    different major versions and can lead to crashes or unexpected
    behaviour.
    behaviour.
 
 
+   Possible DMQ node statuses:
+     * DMQ_NODE_ACTIVE "active" = node is in dmq node list and responded
+       with response code 200 OK, to KDMQ message. At startup, all nodes
+       are considered active, regardless of their actual state.
+     * DMQ_NODE_NOT_ACTIVE "not_active" = node is in dmq node list and did
+       not respond to KDMQ message (408 timeout).
+     * DMQ_NODE_DISABLED "disabled" = node will be deleted from dmq node
+       list.
+
 1.1. KDMQ Request
 1.1. KDMQ Request
 
 
    KDMQ messages can have different format and content for R-URI username,
    KDMQ messages can have different format and content for R-URI username,
@@ -203,7 +221,7 @@ Content-Type: text/plain
 
 
 sip:192.168.40.16:5060;status=active
 sip:192.168.40.16:5060;status=active
 sip:192.168.40.15:5060;status=disabled
 sip:192.168.40.15:5060;status=disabled
-sip:192.168.40.17:5060;status=active
+sip:192.168.40.17:5060;status=not_active
 
 
 ...
 ...
 
 
@@ -236,6 +254,9 @@ sip:192.168.40.17:5060;status=active
    3.7. worker_usleep(int)
    3.7. worker_usleep(int)
    3.8. ping_interval(int)
    3.8. ping_interval(int)
    3.9. remove_inactive(int)
    3.9. remove_inactive(int)
+   3.10. fail_count_enabled(int)
+   3.11. fail_count_threshold_not_active(int)
+   3.12. fail_count_threshold_disabled(int)
 
 
 3.1. server_address(str)
 3.1. server_address(str)
 
 
@@ -360,9 +381,9 @@ modparam("dmq", "ping_interval", 90)
 3.9. remove_inactive(int)
 3.9. remove_inactive(int)
 
 
    A value of zero disable removing dmq nodes. Node status will be changed
    A value of zero disable removing dmq nodes. Node status will be changed
-   to pending. A non-zero value (default is 1) enable removing nodes. For
-   node that is defined as notification address status will be changed to
-   pending. Otherwise it will be marked as disabled and then will be
+   to not_active. A non-zero value (default is 1) enable removing nodes.
+   For node that is defined as notification address status will be changed
+   to not_active. Otherwise it will be marked as disabled and then will be
    removed.
    removed.
 
 
    Default value is “1”.
    Default value is “1”.
@@ -372,6 +393,55 @@ modparam("dmq", "ping_interval", 90)
 modparam("dmq", "remove_inactive", 0)
 modparam("dmq", "remove_inactive", 0)
 ...
 ...
 
 
+3.10. fail_count_enabled(int)
+
+   Enable per node counting of failed responses.
+
+   Default value is “0” (disabled).
+
+   Example 1.11. Set fail_count_enabled parameter
+...
+modparam("dmq", "fail_count_enabled", 1)
+...
+
+3.11. fail_count_threshold_not_active(int)
+
+   DMQ node status change from "active" to "not_active" if 408 fail counts
+   are greater than this threshold value: This threshold can be reached
+   both via internal DMQ notification ping mechanism, and other modules
+   that use dmq to broadcast messages:
+     * Fail counts reset every time a node responds with response code 200
+       OK, on response callback of notification ping.
+     * Fail counts increase every time a node responds with response code
+       408, on response callback of notification ping.
+     * Fail counts increase every time a node responds with response code
+       408, on response callback of other modules that use dmq, only if
+       node is in "active" state.
+
+   Default value is “0”. Move node to "not_active" state on first fail.
+
+   Example 1.12. Set fail_count_threshold_not_active parameter
+...
+modparam("dmq", "fail_count_threshold_not_active", 100)
+...
+
+3.12. fail_count_threshold_disabled(int)
+
+   DMQ node status change from "not_active" to "disabled" if 408 fail
+   counts are greater than this threshold value. This threshold can be
+   reached only via internal DMQ notification ping mechanism:
+     * Fail counts reset every time a node responds with response code 200
+       OK, on response callback of notification ping.
+     * Fail counts increase every time a node responds with response code
+       408, on response callback of notification ping.
+
+   Default value is “1”. Move node to "disabled" state on second fail.
+
+   Example 1.13. Set fail_count_threshold_disabled parameter
+...
+modparam("dmq", "fail_count_threshold_disabled", 105)
+...
+
 4. Functions
 4. Functions
 
 
    4.1. dmq_handle_message([continue])
    4.1. dmq_handle_message([continue])
@@ -394,7 +464,7 @@ modparam("dmq", "remove_inactive", 0)
 
 
    This function can be used from REQUEST_ROUTE.
    This function can be used from REQUEST_ROUTE.
 
 
-   Example 1.11. dmq_handle_message usage
+   Example 1.14. dmq_handle_message usage
 ...
 ...
     if(is_method("KDMQ")) {
     if(is_method("KDMQ")) {
         dmq_handle_message();
         dmq_handle_message();
@@ -415,7 +485,7 @@ modparam("dmq", "remove_inactive", 0)
 
 
    This function can be used from REQUEST_ROUTE.
    This function can be used from REQUEST_ROUTE.
 
 
-   Example 1.12. dmq_process_message usage
+   Example 1.15. dmq_process_message usage
 ...
 ...
     if(is_method("KDMQ")) {
     if(is_method("KDMQ")) {
         dmq_process_message();
         dmq_process_message();
@@ -435,7 +505,7 @@ modparam("dmq", "remove_inactive", 0)
 
 
    This function can be used from any route.
    This function can be used from any route.
 
 
-   Example 1.13. dmq_send_message usage
+   Example 1.16. dmq_send_message usage
 ...
 ...
         dmq_send_message("channel1", "sip:10.0.0.21:5060", "Message body...", "t
         dmq_send_message("channel1", "sip:10.0.0.21:5060", "Message body...", "t
 ext/plain");
 ext/plain");
@@ -453,7 +523,7 @@ ext/plain");
 
 
    This function can be used from any route.
    This function can be used from any route.
 
 
-   Example 1.14. dmq_bcast_message usage
+   Example 1.17. dmq_bcast_message usage
 ...
 ...
     dmq_bcast_message("channel1", "Message body...", "text/plain");
     dmq_bcast_message("channel1", "Message body...", "text/plain");
 ...
 ...
@@ -475,7 +545,7 @@ ext/plain");
 
 
    This function can be used from REQUEST_ROUTE only.
    This function can be used from REQUEST_ROUTE only.
 
 
-   Example 1.15. dmq_t_replicate usage
+   Example 1.18. dmq_t_replicate usage
 ...
 ...
     dmq_t_replicate();
     dmq_t_replicate();
 ...
 ...
@@ -487,7 +557,7 @@ ext/plain");
 
 
    This function can be used from REQUEST_ROUTE only.
    This function can be used from REQUEST_ROUTE only.
 
 
-   Example 1.16. dmq_is_from_node usage
+   Example 1.19. dmq_is_from_node usage
 ...
 ...
         # basic example for REGISTER replication
         # basic example for REGISTER replication
     if(is_method("REGISTER")) {
     if(is_method("REGISTER")) {
@@ -510,7 +580,7 @@ ext/plain");
 
 
    List the DMQ nodes. It has no parameters.
    List the DMQ nodes. It has no parameters.
 
 
-   Example 1.17. dmq.list_nodes usage
+   Example 1.20. dmq.list_nodes usage
 ...
 ...
 kamcmd dmq.list_nodes
 kamcmd dmq.list_nodes
 ...
 ...
@@ -522,7 +592,7 @@ kamcmd dmq.list_nodes
    Parameters:
    Parameters:
      * address - the SIP address of the DMQ node to remove.
      * address - the SIP address of the DMQ node to remove.
 
 
-   Example 1.18. dmq.remove usage
+   Example 1.21. dmq.remove usage
 ...
 ...
 kamctl rpc dmq.remove sip:1.2.3.4:5060
 kamctl rpc dmq.remove sip:1.2.3.4:5060
 ...
 ...