OCF_HEARTBEAT_KAMAIL(7) | OCF resource agents | OCF_HEARTBEAT_KAMAIL(7) |
ocf_heartbeat_kamailio - Resource agent for Kamailio
kamailio [start | stop | status | monitor | meta-data | validate-all]
Resource agent for the Kamailio SIP proxy/registrar. Multiple instances are possible when using following parameter combinations:
Parameters for Kamailio instance 1: listen_address=192.168.159.128 monitoring_ip=192.168.159.128 proto=udptcp port=5060
Parameters for Kamailio instance 2: listen_address=192.168.159.128 monitoring_ip=192.168.159.128 proto=udp port=5070 conffile=/etc/kamailio/kamailio2.cfg kamctlrc=""
Only one instance can be monitored via the command "kamctl monitor" because the kamctl tool of kamailio 4.x is not designed for multiple instances. Therefore, the provided kamctrlrc file path needs to be empty for instance 2, 3 ...
Parameters for a third Kamailio instance: listen_address=192.168.159.128 monitoring_ip=192.168.159.128 proto=tcp port=5080 conffile=/etc/kamailio/kamailio3.cfg kamctlrc=""
binary
(optional, string, default "/usr/sbin/kamailio")
conffile
(optional, string, default "/etc/kamailio/kamailio.cfg")
pidfile
(optional, string, default "/var/run/kamailio_RESOURCE_ID/kamailio.pid")
monitoring_ip
In order to respond with a 200 OK response to the SIP OOPTION requests, the kamailio.cfg file needs to contain following section: Note: The following "kamailio.cfg" code sniplet is part of an XML section. Therefore it contains two & characters, which need to be replaced with two ampersand characters within "kamailio.cfg":
if (is_method("OPTIONS") && (=~"sip:monitor@.*")) { ## ## If the method is an OPTIONS we are simply going to respond ## with a 200 OK. # xlog("L_INFO", "Method is an OPTIONS, probably just monitoring\n"); sl_send_reply("200", "Kamailio is alive"); exit; }
(optional, string, default "127.0.0.1")
listen_address
(required, string, no default)
port
(optional, string, default "5060")
extra_options
(optional, string, no default)
proto
(optional, string, default "udptcp")
sipsak
(optional, string, default "/usr/bin/sipsak")
kamctl
(optional, string, default "/usr/bin/kamctl")
kamctlrc
This parameter only needs to be provided in case of using multiple Kamailio server instances on a single cluster node:
In case that the parameter "kamctlrc" is not empty, this resource agent monitors the health state of the Kamailio server via the command "kamctl monitor 1". This setting is recommended in case of using a single Kamailio server instance.
In case that the parameter "kamctlrc" is empty, the resource agent does not monitor the health state of the Kamailio server instance via the "kamctl" command.
Please note that the "kamctl" control command of Kamailio 4.x does not support running multiple Kamailio instances on one host. Nevertheless this resource agent does allow multiple Kamailio instances per host. The result of the "kamctl" limitation in terms of number of Kamailio server instances is that the health check via "kamctl monitor 1" can be configured for a single Kamailio instance only.
Please refer to the long description of this resource agent for an example of parameter combinations in case that multiple instances are to be configured per cluster node.
(optional, string, default "/etc/kamailio/kamctlrc")
kamuser
(optional, string, no default)
kamgroup
(optional, string, no default)
This resource agent supports the following actions (operations):
start
stop
status
monitor
meta-data
validate-all
notify
The following is an example configuration for a kamailio resource using the crm(8) shell:
primitive p_kamailio ocf:heartbeat:kamailio \
params \
listen_address=string \
op monitor timeout="30s" interval="10s"
The following is an example configuration for a kamailio resource using pcs(8)
pcs resource create p_kamailio ocf:heartbeat:kamailio \
listen_address=string \
op monitor timeout="30s" interval="10s"
http://clusterlabs.org/
ClusterLabs contributors (see the resource agent source for information about individual authors)
06/27/2020 | resource-agents UNKNOWN |