The “sipp” utility called for health-checking comes with the Debian package “sip-tester” (install with “sudo apt-get install sip-tester” on Debian).
The configuration uses the following BalanceNG V3 extensions (also highlighted in bold):
// configuration taken ... // BalanceNG ... modules vrrp,arp,ping,hc,master,slb,tnat,nat,rt set ipforwarding 1 interface bond0 interface eth1 vrrp { vrid 1 priority 200 network 2 } network 1 { name LAN addr 172.17.40.0 mask 255.255.255.0 real 172.17.40.7 virt 172.17.40.8 interface bond0 } network 2 { name WAN addr 10.31.40.32 mask 255.255.255.240 real 10.31.40.42 virt 10.31.40.43 interface eth1 } register networks 1,2 enable networks 1,2 gateway { ipaddr 10.31.40.33 } server 1 { ipaddr 10.31.40.43 port 5060 protocol udp sessionid sip stimeout 10 targets 1,2 } server 2 { ipaddr 10.31.40.43 port 80 protocol tcp method session target 3 } register servers 1,2 enable servers 1,2 target 1 { name "SIP 5060" ipaddr 172.17.40.6 port 5060 protocol udp script "/usr/bin/sipp -sf /home/sip/client_check.xml -m 1 -nr -recv_timeout 3000 $ipaddr$:$port$",2,10 screate enablesessionid sip } target 2 { name "SIP 5060" ipaddr 172.17.40.14 port 5060 protocol udp script "/usr/bin/sipp -sf /home/sip/client_check.xml -m 1 -nr -recv_timeout 3000 $ipaddr$:$port$",2,10 screate enablesessionid sip } target 3 { name "HTTP" ipaddr 172.17.40.5 port 80 protocol tcp ping 3,10 } register targets 1,2,3 enable targets 1,2,3 // end of configuration
<?xml version="1.0" encoding="ISO-8859-1" ?>
<scenario name="client check">
<send>
<![CDATA[
OPTIONS sip:bng_health_check@inlab.de:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port]
Max-Forwards: 70
To: <sip:bng_health_check@inlab.de:[remote_port]>
From: <sip:bng_health_check@inlab.de:[local_port]>;tag=[call_number]
Call-ID: [call_id]
CSeq: [cseq] OPTIONS
Contact: sip:bng_health_check@inlab.de:[local_port]
Accept: application/sdp
Content-Length: [len]
]]>
</send>
<recv response="200">
</recv>
</scenario>