From 5429a0ed51a04c484e1def93887b344b2d90379f Mon Sep 17 00:00:00 2001 From: Kamailio Dev Date: Thu, 7 May 2020 13:16:27 +0200 Subject: [PATCH] modules: readme files regenerated - keepalive ... [skip ci] --- src/modules/keepalive/README | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/modules/keepalive/README b/src/modules/keepalive/README index 150da0acdc4..4437803128f 100644 --- a/src/modules/keepalive/README +++ b/src/modules/keepalive/README @@ -55,8 +55,8 @@ Yasin CANER 1. Available Functions - 1.1. add_destination(uri, owner, flags, [callback, - [user_attr]]) + 1.1. add_destination(uri, owner, flags, ping_interval, + [callback, [user_attr]]) 1.2. Examples @@ -324,7 +324,9 @@ Chapter 2. Developer Guide 1. Available Functions - 1.1. add_destination(uri, owner, flags, [callback, [user_attr]]) + 1.1. add_destination(uri, owner, flags, ping_interval, [callback, + [user_attr]]) + 1.2. Examples The KeepAlive module provides an internal API to be used by other @@ -336,10 +338,13 @@ Chapter 2. Developer Guide 1. Available Functions - 1.1. add_destination(uri, owner, flags, [callback, [user_attr]]) + 1.1. add_destination(uri, owner, flags, ping_interval, [callback, + [user_attr]]) + 1.2. Examples -1.1. add_destination(uri, owner, flags, [callback, [user_attr]]) +1.1. add_destination(uri, owner, flags, ping_interval, [callback, +[user_attr]]) This function registers a new destination to monitor. Monitoring of the destination starts as soon as it returns with success (0 value). @@ -354,6 +359,8 @@ Chapter 2. Developer Guide * owner (string) - module name “owning” the destination (for information purpose) * flags (integer) - destination flags (unused for now, use 0 value) + * ping_interval (integer) - Pinging interval in seconds for this + destination * callback (ka_statechanged_f, optional) - callback function, executed on destination's state change. The callback function is of type void (*ka_statechanged_f)(str @@ -398,7 +405,7 @@ void my_callback(str uri, int state, void *user_attr) { str dest = str_init("sip:192.168.10.21:5060"); str owner = str_init("mymodule"); -if (ka_api.add_destination(dest, owner, 0, my_callback, NULL) != 0) { +if (ka_api.add_destination(dest, owner, 0, 60, my_callback, NULL) != 0) { LM_ERR("can't add destination\n"); goto error; }