← Volver al índice de módulos

keepalive

This module performs destinations monitoring either for itself, or on the behalf of other modules. The monitoring is done by sending SIP OPTIONS requests, more or less in the same fashion as the dispa
🛠️ Utilidades y Varios Kamailio 6.1 14 funciones

Descripción general

This module performs destinations monitoring either for itself, or on the behalf of other modules. The monitoring is done by sending SIP OPTIONS requests, more or less in the same fashion as the dispatcher module (which was the initial source for this module). As an example of usage by other modules, see drouting, which was enhanced to use this module to monitor its gateways.

Documentación oficial: https://www.kamailio.org/docs/modules/stable/modules/keepalive.html
Código fuente: https://github.com/kamailio/kamailio/tree/master/src/modules/keepalive

Funciones exportadas

ka_is_alive(destination)

2.4.2. ka_add_destination(sip_uri, owner) 2.4.3. ka_del_destination(sip_uri, owner)

ka_add_destination(sip_uri, owner)

2.4.3. ka_del_destination(sip_uri, owner)

ka_del_destination(sip_uri, owner)

2.5. RPC Commands

delete_counter(int)

Unsuccessful attempts increase delete_counter. After passing it, keepalive module doesn't try to send options requests. Ignored if it's set to 0.

ping_from(string)

Sets from header's uri.

ka_is_alive(destination)

Get destination status.

ka_is_alive()

usage ... if(ka_is_alive("192.168.10.20") == 1) { // do stuff }; ...

ka_add_destination(sip_uri, owner)

Adds SIP URI in the memory destinations list to perform keep alive to it.

ka_add_destination(sip_uri, ownder)

usage ... $avp(duri1)="sip:192.168.1.10:5060;transport=tcp"; $avp(duri2)="sip:192.168.1.11:5061"; $avp(duri3)="sip:192.168.1.12" ka_add_destination("$avp(duri3)", "config"); ka_add_destination("sip:192.168.1.10:5060;transport=tcp", "config"); ...

ka_del_destination(sip_uri, owner)

Deletes the SIP URI from the memory destinations list used for monitoring.

ka_del_destination(sip_uri, owner)

usage ... $avp(duri1)="sip:192.168.1.10:5060;transport=tcp"; $avp(duri2)="sip:192.168.1.11:5061"; $avp(duri3)="sip:192.168.1.12" ka_del_destination("$avp(duri3)", "config"); ka_del_destination("sip:192.168.1.10:5060;transport=tcp", "config"); ...

add_destination(uri, owner, flags, ping_interval, [statechanged_clb, response_clb, [user_attr]])

1.2. Examples

add_destination(uri, owner, flags, ping_interval, [statechanged_clb, response_clb, [user_attr]])

1.2. Examples

add_destination(uri, owner, flags, ping_interval, [statechanged_clb, response_clb, [user_attr]])

This function registers a new destination to monitor. Monitoring of the destination starts as soon as it returns with success (0 value).

Autores y contribuidores

Guillaume Bour <guillaume@bour.cc>Yasin CANER <caner_yaso@hotmail.com>

Copyright © 2017 Guillaume Bour

Módulos relacionados

auth_web3 auth_xkeys avp avpops benchmark blst call_control call_obj