Asterisk cluster


I am trying to configure a 2 node cluster using pacemaker 1.1.7 and corosync 1.4.1. I. I want pacemaker to provide the virual IP (, monitor Asterisk and failover to the othe server. If I switch off pacemaker and/or corosync the cluster resources switch to the other node. I have also configured module in Asterisk However if i either switch off asterisk using service service name stop, the following error is shown: Failed actions:
p_asterisk_monitor_10000 (node=node1.localdomain, call=10, rc=7, status=complete): not running

Corosync configuration:

compatibility: whitetank

totem {
version: 2
secauth: off
interface {
member {
member {
ringnumber: 0
mcastport: 5405
ttl: 1
transport: udpu

logging {
fileline: off
to_logfile: yes
to_syslog: yes
debug: on
logfile: /var/log/cluster/corosync.log
debug: off
timestamp: on
logger_subsys {
subsys: AMF
debug: off

amf {
mode: disabled

quorum {
provider: corosync_votequorum
expected_votes: 3

Output of crm configure status:

node node1.localdomain
node node2.localdomain
primitive failover-ip ocf:heartbeat:IPaddr2
params ip=“” cidr_netmask=“24” nic=“eth6”
op start interval=“0” timeout=“30”
op monitor interval=“1s” timeout=“30” start-delay=“0”
op stop interval=“0” timeout=“30s”
meta target-role="started"
primitive p_asterisk ocf:heartbeat:asterisk
params user=“root” group=“root” maxfiles=“65536”
op start interval=“0” timeout=“30s”
op monitor interval=“10s” timeout=“30s”
op stop interval=“0” timeout="30s"
group voip failover-ip p_asterisk
colocation asterisk_cluster inf: failover-ip p_asterisk
order start_order inf: failover-ip p_asterisk
property $id=“cib-bootstrap-options”
rsc_defaults $id=“rsc-options”