FreePBX HA Issue

Hello,

i am configuring my freepbx HA.

i have everything up and running , the floating ip is working without any issue.

my problem is the following.

in order to connect to my SIP provider ( which is my ISP) i am using a dedicated site-to-site with them and they provide me with 3 IPS . 1 Virutal IP and 2 IPs that need to go to each FreePBX Node.

I need to set the Virtual IP of my ISP as a resource on the cluster in order the ISP know where to redirect the incoming calls.

any idea , any help ? any tip ?

Regards,

Chrysanthos Kattimeris

You use the Floating IP address for SIP Registration. You do not register directly to the IP addresses of your individual boxes, the HA platform will direct to each box as needed.

The ISP does not do any redirection, since they are registered to the floating IP address, and changes in active PBX would be transparent to them.

Preston,

exactly the internal floating IP 192.168.5.30 is for the SIP registration.

my problem is with my trunk.

my server has the following interfaces
node 1
eth0 : internal network interface ( 192.168.5.35)
eth1 : heartbeat link ( 172.19.206.1)
eth2: SIP trunk from our ISP ( we don’t connect to them via public IP but via local IP they provide) ( 172.21.48.98 )

node 2
eth0 : internal network interface ( 192.168.5.36)
eth1 : heartbeat link ( 172.19.206.2)
eth2: SIP trunk from our ISP ( we don’t connect to them via public IP but via local IP they provide) ( 172.21.48.99 )

i need to activate / disable eth2:0 with the floating IP they provided me .
eth2:0 should be 172.21.48.97 in order to be able to accept incoming calls.

I need to add a resource to the freepbx that when one node is down to enable the virtual IP 172.21.48.97 on the other machine to be able to accept calls.

This is not something you can easily achieve, unfortunately. Asterisk does NOT understand multiple interfaces. This is resolved in Asterisk 12 with PJSIP, but for the moment, it’s not doable.

The easiest way to work around this in the interim is to create another FreePBX machine and have -that- machine on .48.97, and then trunk to it from your HA Cluster.

Yes that works to get the second interface but it still does not solve the issue that Asterisk gets really weird with having SIP connections on 2 different interfaces.

I found a better solution using peacemaker

we need to add a resource using the following command

pcs resource create ISPfloating_ip ocf:heartbeat:IPaddr2 ip=172.21.48.97 nic=eth2 op monitor interval=30s

and is working like a charm!

Yup, that’s how you add a new resource - you also need to add a constraint to tie it to your asterisk service:

pcs constraint colocation add ISPfloating_ip asterisk_ip INFINITY

But, as Tony said, you will have ongoing niggly issues with random failures of traffic (eg, Asterisk will often respond with the incorrect address in the SIP INVITE packets).

Honestly, please - don’t do it. Set up another machine, have THAT connect to the other trunk, and then have your HA cluster connect to that. This is a known limitation of Asterisk that we’ve worked hard to fix in Asterisk 12 – but 12 is not ready for Production yet.