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.
2.4.2. ka_add_destination(sip_uri, owner) 2.4.3. ka_del_destination(sip_uri, owner)
2.4.3. ka_del_destination(sip_uri, owner)
2.5. RPC Commands
Unsuccessful attempts increase delete_counter. After passing it, keepalive module doesn't try to send options requests. Ignored if it's set to 0.
Sets from header's uri.
Get destination status.
usage ... if(ka_is_alive("192.168.10.20") == 1) { // do stuff }; ...
Adds SIP URI in the memory destinations list to perform keep alive to it.
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"); ...
Deletes the SIP URI from the memory destinations list used for monitoring.
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"); ...
1.2. Examples
1.2. Examples
This function registers a new destination to monitor. Monitoring of the destination starts as soon as it returns with success (0 value).
Copyright © 2017 Guillaume Bour