ClusterLabs/resource-agents — pull request #179 by gnuday (2012-11-18 19:12:26+00:00)
Title: Asterisk monitoring via sipsak not working

Hi,

When the original resource agent script called sipsak it was sending a sip packet with an invalid contact URI. As a result Asterisk was sending back a 404 error in reply to the SIP OPTIONS sent. I haven't been able to get sipsak to send valid contact details in this mode so instead have made it do a SIP REGISTER. The resource agent now accepts an additional parameter=monitor_password, this is the sip account password you register with. I've tested the resource agent successfully
against asterisk 1.6 and 1.8.18.

Cluster configuration example of use

primitive resASTERISK ocf:heartbeat:asterisk \
params realtime="false" monitor_sipuri="sip:user1@192.168.1.4" \ monitor_password="eo34d84nvhekr" \
op monitor interval="60" \
op start interval="0s" timeout="120s" \
op stop interval="0s" timeout="120s" \
meta migration-threshold="1"

Cheers,
John
email@johncahill.net