How To Install A TwinStar-based Asterisk Cluster On Two Elastix 1.6 Servers PDF
How To Install A TwinStar-based Asterisk Cluster On Two Elastix 1.6 Servers PDF
How To Install A TwinStar-based Asterisk Cluster On Two Elastix 1.6 Servers PDF
The Primary server mentioned in this document refers to the server to which the
Astribank(s) Main USB socket is connected.
Power off all Astribank devices before you begin the installation procedure.
umount /MARKER
sed -i '/MARKER/d' /etc/fstab
rmdir /MARKER
Download and install the Xorcom repository encryption public key as follows:
cd /tmp
wget http://updates.xorcom.com/astribank/elastix/repo/RPM-GPG-KEY-
xorcom
cd /etc/yum.repos.d
wget http://updates.xorcom.com/astribank/elastix/xorcom.repo
HOSTNAME=srv-a
b) Run:
hostname srv-a
c) Make sure that command 'uname -n' returns the defined host name.
# Ethernet interface used for cluster services (http, VoIP, dhcp etc).
CLUSTER_IF=eth0
# IP address that is used for cluster access. SIP phones etc will access
the Asterisk by using
# this address. The address automatically activated on the server that
takes control of the cluster.
# In order to ensure correct IP routing table building, in addition to the
IP address the system must know
# the subnet mask. Therefore, the address must be defined in the CIDR
(Classless Inter-domain Routing) notation.
CLUSTER_IP=192.168.0.253/20
# Whether dhcpd service must be activated on the active server. The default
value is "No".
#DHCPD_ENABLE=Yes
# Whether TFTP folder must be replicated between the servers. The default
value is "No".
#TFTPD_ENABLE=Yes
# The hard disk partition used for DRBD replication. The default is
/dev/sda2 for non RAID and /dev/md2 for RAID
# installations
#DRBD_PART=/dev/sda2
cd /usr/share/twinstar
./setup_keys ip_address_of_Server_B
cd /usr/share/twinstar
./twinstar_config -d -a -i
[root@srv-a ~]# ip a s
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc ...
link/ether 00:1c:c0:65:33:3b brd ff:ff:ff:ff:ff:ff
inet 192.168.0.166/20 brd 192.168.15.255 scope global eth0
inet 192.168.0.253/20 brd 192.168.15.255 scope global secondary eth0:0
inet6 fe80::21c:c0ff:fe65:333b/64 scope link
valid_lft forever preferred_lft forever
3: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
[root@srv-a ~]# ip r s
192.168.0.0/20 dev eth0 proto kernel scope link src 192.168.0.253
169.254.0.0/16 dev eth0 scope link
default via 192.168.0.1 dev eth0 src 192.168.0.253
On the Backup server there should not be any sign of the cluster IP :
[root@srv-b ~]# ip a s
# lsdahdi
### Span 1: XBUS-00/XPD-00 "Xorcom XPD #00/00: E1" (MASTER)
HDB3/CCS/CRC4 RED
1 E1 Clear (In use) (SWEC: OSLEC) RED
2 E1 Clear (In use) (SWEC: OSLEC) RED
3 E1 Clear (In use) (SWEC: OSLEC) RED
4 E1 Clear (In use) (SWEC: OSLEC) RED
5 E1 Clear (In use) (SWEC: OSLEC) RED
6 E1 Clear (In use) (SWEC: OSLEC) RED
...................
The "(In use)" label means that the Asterisk "uses" the channel.
# twinstar status
DEVICE PORT WATCHDOG POWER0 POWER1
usb:001/002 0 on yes yes
# twinstar jump
twinstar jump
twinstar enable-wd
The watchdog should be disabled before stopping the DAHDI for maintenance purposes.
/usr/share/twinstar/twinstar_config -i
It is also possible to change the configuration manually. The following can be done on the
Primary server:
a) Disable the Twinstar watchdog as follows:
twinstar disable-wd