Someone can help me, a couple of weeks ago an active-passive HA server was implemented, after performing the tests and other things worked well. After a week, I started presenting a bug that sent TCP / IP requests with the virtual IP but the SIP requests with the IP of the active server. Has this happened to someone?
And how does this phone know which server is the “active” node that calls should be hitting?
Sorry is active-passive, the virtual ip is 192.168.100.38 and the active server is x.x.x.121, do you have seen this before?
Honestly? No. That is mainly due to I don’t try to run Asterisk in a HA setup like this. Mainly because it’s pointless. The calls/session/transactions can’t traverse between two Asterisk system. The channels are unique to the Asterisk box that is processing the call. So at the end of the day when Node A drops or starts to perform bad and you have to cut to Node B (or another node) then you’re still losing all your calls and registrations.
I just use Kamailio in front of my boxes and deal with it that way.
How did you implemented HA ? Did you used floating private IP concept ? Are both asterisk boxes in same subnet.
We implemented HA active-passive concept for asterisk in AWS.
Yes, the implementation was like that.
How did you configured the floating IP to network interface card of server ? Did you configured it permanently and two both boxes ?
here is the configuation:
ASTERISK_DOWN=$(rasterisk -x “core show version” | grep “Unable to connect to remote asterisk” | wc -l)
case “$1” in
echo “$1, EJECUTANDO…” | log2file
if [ “$ASTERISK_DOWN” = “1” ]
echo “ACTIVE” > /etc/HA-ACTIVE
chmod 777 /etc/HA-ACTIVE
ifconfig $HA_VIRTUAL_DEV_LOCAL:0 $VIRTUAL_IP netmask $VIRTUAL_MASK
ifconfig $IFACE_EMCALI 10.35.3.174/30
ifconfig $IFACE_EMCALI:1 10.35.103.62/30
ifconfig $IFACE_CLARO 192.168.150.2/29
route add -host 172.29.30.196 gw 192.168.100.1 dev $HA_VIRTUAL_DEV_LOCAL:0 route add -host 22.214.171.124 gw 192.168.100.1 dev $HA_VIRTUAL_DEV_LOCAL:0 route add -host 126.96.36.199 gw 192.168.100.1 dev $HA_VIRTUAL_DEV_LOCAL:0 route add default gw 192.168.100.1 dev $HA_VIRTUAL_DEV_LOCAL:0 route add -net 10.35.103.60 netmask 255.255.255.252 dev $IFACE_EMCALI:1 route add -net 10.8.62.0 netmask 255.255.255.0 gw 192.168.150.1 dev $IFACE_CLARO arping -b -c 3 -I $IFACE_EMCALI -s 10.35.3.174 10.35.3.173 arping -b -c 3 -I $IFACE_CLARO -s 192.168.150.2 192.168.150.1 ping -c 2 10.35.3.173 ping -c 2 10.8.62.137 #sh /var/dialvox/ha/PRINCIPAL_recover_mysql.sh #DESHABILITADO TEMPORALMENTE POR MYSQL_SYNC rsync -az --delete -e "ssh $SSH_PARAMS" root@$IPAD_REMOTO:/var/spool/asterisk/voicemail/ /var/spool/asterisk/voicemail/$ sh /var/dialvox/ha/rsync_var_lib_asterisk.sh #NO ELIMINAR echo "HA-INTERFACES-DIALVOX-LOADED" > /tmp/HA-INTERFACES-DIALVOX-LOADED # INICIO CODIGO PERSONALIZADO # FIN CODIGO PERSONALIZADO else echo "$1, ASTERISK ESTA CORRIENDO ACTUALMENTE..." | log2file fi exit 0
This is the configuration of the virtual ip file and main and backup computers.