Configuring pacemaker for Asterisk

Hi,
I am trying to create a small active/passive cluster using corosync 1.4.1 and pacemaker 1.1.7. I have successfully created the virtual IP and now I want to add Asterisk to pacemaker so that Asterisk will be monitored by pacemaker. Can anyone help me with this last part of the configuration? I have tried to configure pacemaker to monitor asterisk, I have also successfully registered 2 SIP phones using the virtual IP, I have tried to call from both extensions but this did not work. Thanks

If you are on Debian, go to /etc/profile and add at the end:

They forgot to add that environment variable in Debian systems. It is needed by OCF scripts (like Asterisk) to run.

Logout and login again.

Now, we add the Asterisk service in Pacemaker. We enter in Pacemaker with “crm”…

$ crm $ configure $ primitive asterisk ocf:heartbeat:asterisk params user="root" group="root" monitor_sipuri="" $ verify $ group voip [[your-failover-IP_primitive]] asterisk $ end COMMIT? yes $ quit

I suppose you run asterisk as “root”. If not, change it in the previous command.

Try.