﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><ttl>60</ttl><title>YOUR SOURCE FOR ELASTIX HOW-TOS</title><link>http://blog.elastixdepot.com</link><lastBuildDate>Tue, 07 Feb 2012 06:11:30 GMT</lastBuildDate><pubDate>Tue, 07 Feb 2012 06:11:30 GMT</pubDate><language>en</language><copyright /><itunes:subtitle> </itunes:subtitle><itunes:author /><itunes:summary /><description /><itunes:owner><itunes:name /><itunes:email>sales@elastixdepot.com</itunes:email></itunes:owner><itunes:explicit>no</itunes:explicit><itunes:category text="Arts" /><item><title>Getting started with your Elastix or Xorcom channel bank</title><link>http://blog.elastixdepot.com/2010/02/15/getting-starting-with-your-elastix-or-xorcom-channel-bank.aspx?ref=rss</link><dc:creator>Jose L Landivar</dc:creator><description>&lt;br&gt;So you have purchased a new Elastix or Xorcom channel bank and don't know where to start. This guide will quickly get you up to speed on what you need to know.&lt;br&gt;&lt;br&gt;We will show you how to configure an FXS port in your channel bank to start making calls with an analog phone. Then, you could extend the concept to configuring T1/E1 or FXO porrts. For this tutorial you will need a server running at least Elastix version 1.6-12 aside from the channel bank unit.&lt;br&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="center"&gt;&lt;img src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/elastix_channel_bank_pic_1.JPG?a=66" width="327" height="107"&gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="center"&gt;&lt;strong&gt;CONNECTING YOUR CHANNEL BANK&lt;/strong&gt;&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;It does not get any easier than this. Simply connect the channel bank's rear USB port labeled "MAIN" to any USB port in your Elastix server with the USB cable provided.&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="center"&gt;&lt;img src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/elastix_channel_bank_pic_2.JPG?a=74" width="328" height="170"&gt;&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;In order to make sure everything is connected correctly, simply execute the "lsusb" command in your Elastix server (via ssh or console). In the following picture you can see the results of this command before and after plugging in the channel bank to the Elastix server.&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="center"&gt;&lt;img src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/elastix_channel_bank_config_1.jpg?a=58" width="500" height="203"&gt;&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;In the latter result, you will notice an entry such as:&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;&lt;strong&gt;Bus 001 Device 004: ID e4e4:1162&lt;/strong&gt;&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;Make a note of the Bus and Device numbers for the device with ID "e4e4:1162". In the above example, Bus = 001 and Device = 004.&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;Next, we will find out what kind of channel bank we have connected to our Elastix server. We do this using the command as follows:&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;&lt;strong&gt;# astribank_allow -D /proc/bus/usb/[Bus]/[Device]&lt;/strong&gt;&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;In our case, this is how this command will look:&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="center"&gt;&lt;img src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/elastix_channel_bank_config_2.jpg?a=26" width="500" height="250"&gt;&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;From the output of the command you can see we have a channel bank with 24 FXS ports.&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="center"&gt;&lt;strong&gt;CHANNEL BANK CONFIGURATION&lt;/strong&gt;&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;We have already connected everything up. Now we need to make sure Elastix (and Asterisk) recognizes it. For this, we head over to the System -&amp;gt; Hardware Detection tab of the Elastix interface. Currently, we only see a Sangoma B600D (4 FXO, 1 FXS) card detected but no signs of the channel bank. See below.&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="center"&gt;&lt;img src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/elastix_channel_bank_config_3.jpg?a=37" width="500" height="245"&gt;&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;We know have to click on the "Detect New Hardware" button.&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="center"&gt;&lt;img src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/elastix_channel_bank_config_4.jpg?a=94" width="500" height="249"&gt;&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;The following is the result:&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="center"&gt;&lt;img src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/elastix_channel_bank_config_5.jpg?a=10" width="500" height="379"&gt;&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;As you can see, we now have detected all 24 FXS ports of the channel bank. In fact, we have detected 30 ports! Notice that three port modules (8 FXS ports each) are detected. However, the first one has 2 extra "Output" ports and 4 extra "Input" ports. These ports are used to activate door openers or to trigger alarms through the channel bank. We will take a look at these ports in a future How-To.&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;We are now ready to create extensions for the channel bank's ports and test it out.&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="center"&gt;&lt;strong&gt;CONFIGURING EXTENSIONS&lt;/strong&gt;&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;We now head over to the PBX -&amp;gt; PBX Configuration tab of the Elastix interface. You will notice from the picture below that we have a few extensions created. Extension 218 is a SIP extension registered to our Elastix system. We will proceed and create a new extension called 217 that corresponds to an analog phone connected to the first FXS port of our channel bank.&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;In order to do this, click on "Add Extension" and select "Generic ZAP Device" as your Device.&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="center"&gt;&lt;img src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/elastix_channel_bank_config_6.jpg?a=28" width="500" height="316"&gt;&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;Make sure to fill the "User Extension" and "Display Name". The most important part is to fill in the "channel" number under "Device Options".&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="center"&gt;&lt;img src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/elastix_channel_bank_config_8.jpg?a=49" width="500" height="283"&gt;&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;We will enter "25" for the first FXS port in the channel bank (See output of the Hardware Detection above for the right port number) in the "channel" field. We have connected our analog phone into this port.&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;Make sure you do an "asterisk -rx reload" on your console in order to continue.&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;Per the picture below you see that once you connect the analog phone, the channel bank port will light up red.&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="center"&gt;&lt;img src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/elastix_channel_bank_pic_4.JPG?a=11" width="336" height="245"&gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="center"&gt;&lt;strong&gt;TESTING&lt;/strong&gt;&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;All we have left to do is to try out calling between our extensions (we don't have a trunk connected so we will limit ourselves to making calls between extensions). Pick up the analog phone (you will see a green light go off on the channel bank port) and you will hear a dial tone. Then, dial 218 and the suitable extension should ring and complete the call. You can also try dialing from 218 to the analog extension 217 with the same results.&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="center"&gt;&lt;img src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/elastix_channel_bank_pic_3.JPG?a=81" width="340" height="289"&gt;&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;If you do not hear a dial tone please make sure you first have your channel bank ports show up as the following picture when doing a "lsdahdi" command.&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;&lt;strong&gt;# lsdahdi&lt;/strong&gt;&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="center"&gt;&lt;img src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/elastix_channel_bank_config_7.jpg?a=53" width="500" height="650"&gt;&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;If the ports say something such as RED or NOTOPEN, something is wrong with dahdi. Do an "asterisk -rx reload".&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;And yes, it's that easy!&lt;/p&gt;&lt;br&gt;&lt;p style="margin-bottom: 0cm;" align="justify"&gt;If you have trouble, your first check should be if you are using Elastix 1.6-12 or above.&lt;/p&gt;</description><category>HOW-TO</category><comments>http://blog.elastixdepot.com/2010/02/15/getting-starting-with-your-elastix-or-xorcom-channel-bank.aspx#Comments</comments><guid isPermaLink="false">fe32fa98-88ee-4ecc-a6fc-ce16c454a567</guid><pubDate>Tue, 16 Feb 2010 00:59:00 GMT</pubDate></item><item><title>Configuring a Redfone Fonebridge2 with Elastix (Part 1)</title><link>http://blog.elastixdepot.com/2009/11/19/configuring-a-redfone-fonebridge2-with-elastix-part-1.aspx?ref=rss</link><dc:creator>Jose L Landivar</dc:creator><description>&lt;BR&gt;In this two-part article you will find everything you need to know in order to configure your Redfone Fonebridge2 with Elastix 1.5.2-2. Part 1 goes through setting up a single Elastix appliance (or server) with a Redfone Fonebridge2 as an external T1/E1 interface. Part 2 explains how to implement high availability with the Redfone Fonebridge2 and a secondary (backup) Elastix appliance (or server). After going through both parts of this article you will be able to setup a high availability environment on your own. In this way, if one Elastix server or appliance were to fail, the calls will still flow to a backup Elastix server or appliance.&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;STRONG&gt;SCHEMATIC DIAGRAM&lt;/STRONG&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Our objective in Part 1 of this article is to setup an Elastix appliance or server with a Fonebridge2 device. The following is the diagram of the solution that we are looking to accomplish.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/SchematicDiagramPart1.jpg" width=485 height=153&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;That is, a call originates from extension 509 in the Elastix appliance. The call then gets routed to the Fonebridge2 device and out of span 1. Afterwards, the call gets received through span 2 of the same Fonebridge2 and back into the appliance. Once the call is back in the Elastix appliance, it should terminate by ringing extension 503.&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;STRONG&gt;EQUIPMENT REQUIRED&lt;/STRONG&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;For the purposes of this article, we will be using the following devices:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;1) One (1) Redfone Fonebridge2 Dual Port T1/E1&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img2.jpg" width=250 height=78&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;2) Two (2) Elastix Appliances ELX-025 loaded with Elastix 1.5.2-2 Stable, with two (2) network interfaces each:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img4.jpg" width=249 height=128&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;In Part 1 of this article we will only use one (1) Elastix appliance. In Part 2 we will use both Elastix appliances in order to setup a high availability environment.&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;STRONG&gt;CONNECTING THE DEVICES&lt;BR&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;For the purposes of this article we will use a single Redfone Fonebridge2 to act as both the Telco T1/E1 provider and also as the receiver T1/E1 device. We do this for lab testing since it does not require an actual T1/E1 trunk from the Telco. In order to do this, we will create a loopback between the two ports (labeled T1/E1 1 and 2) of the Fonebridge2 (one to simulate the T1/E1 from the Telco and the other to receive the calls from the simulated T1/E1). The cable used for this loopback needs to be crossover. A pin-out diagram for the cable is provided below for your reference.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img29.jpg" width=300 height=102&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Now we need to connect the Redfone Fonebridge2 to our Elastix appliance. For this, we connect the port on the Fonebridge2 labeled "Ethernet FB1" to the second network interface of the Elastix appliance (Ethernet 1). Please remember that the first network interface of the Elastix appliance, Ethernet 0, is reserved for connecting the appliance to the network (and IP phones). Here is a picture of how the setup will look so far including the loopback connection. The picture does not show the connectivity of the appliance to the network through Ethernet 0.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img6.jpg" width=250 height=277&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;The Fonebridge2 comes with two (2) Ethernet interfaces. "Ethernet FB1" is preconfigured with as 192.168.1.254/24, and "Ethernet FB2" is preconfigured as 192.168.1.253/24. Due to this, we will configure the second network interface (Ethernet 1) in the Elastix appliance as 192.168.1.200/24 (We use 200 here, but you could choose any unused IP address in the range).&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;STRONG&gt;COMMUNICATING WITH THE FONEBRIDGE2&lt;/STRONG&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;If you are using an Elastix appliance everything should be ready for you to start configuring (make sure you have a secondary network card). If you are using a server of your own, please make sure to have Elastix 1.5.2-2 Stable installed properly with two network interfaces. The actual installation of Elastix is outside the scope of this document. For more information on this please visit &lt;A href="http://www.elastix.org"&gt;www.elastix.org&lt;/A&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;1) We now need to install the "fonulator" utility provided by Redfone. For this, we issue the following command:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@elastix~]# rpm -ivh &lt;A href="http://support.red-fone.com/downloads/fonulator/fonulator-2.0.0-36.i386.rpm"&gt;http://support.red-fone.com/downloads/fonulator/fonulator-2.0.0-36.i386.rpm&lt;/A&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img7.jpg" width=554 height=75&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Please confirm that the "fonulator" was installed successfully by issuing the following command:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@elastix~]# fonulator -V&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img8.jpg" width=557 height=60&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;2) We need to download and configure a sample redfone.conf file as follows.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@elastix~]# cd /etc/&lt;BR&gt;[root@elastix etc]# wget &lt;A href="http://support.red-fone.com/downloads/fonulator/redfone.conf"&gt;http://support.red-fone.com/downloads/fonulator/redfone.conf&lt;/A&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 553px; HEIGHT: 162px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img9.jpg"&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Using your preferred text editor you need to modify the redfone.conf sample file according to your needs. Here is what we have for our redfone.conf configuration.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img10.jpg" width=553 height=298&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Please note in this file that we are using the directive "fb=192.168.1.254" because we are using a single Elastix appliance. In Part 2 of this article, when we setup high availability with (2) two Elastix appliances, we will use the "FB1=" and "FB2=" directives instead.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;3) Download the "fonulator script" as follows.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@elastix etc]# cd init.d/&lt;BR&gt;[root@elastix init.d]# wget &lt;A href="http://support.red-fone.com/downloads/fonulator/old/fonulator_initd_script"&gt;http://support.red-fone.com/downloads/fonulator/old/fonulator_initd_script&lt;/A&gt;&lt;BR&gt;[root@elastix init.d]# mv fonulator_initd_script fonulator&lt;BR&gt;[root@elastix init.d]# chmod +x fonulator&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img11.jpg" width=553 height=209&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;4) Now we need to download the "dahdi init script" for use with the Fonebridge2.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@elastix init.d]# mv dahdi /opt/dahdi.old&lt;BR&gt;[root@elastix init.d]# wget &lt;A href="http://support.red-fone.com/downloads/elastix/dahdi"&gt;http://support.red-fone.com/downloads/elastix/dahdi&lt;/A&gt;&lt;BR&gt;[root@elastix init.d]# chmod 755 dahdi&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img12.jpg" width=555 height=173&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Here we need to modify the shutdown sequence for some services to prevent a current bug. If the network services are shutdown before dahdi, you will see a kernel panic. This will happen during Elastix shutdown or restart. In order to avoid this issue, you need to modify the sequence by issuing the commands below. Surely this bug will go away in future versions and you won't have to do this any longer.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@elastix init.d]# cd /etc/rc0.d/&lt;BR&gt;[root@elastix rc0.d]# mv K92dahdi K90dahdi&lt;BR&gt;[root@elastix rc0.d]# mv K90network K92network&lt;BR&gt;[root@elastix rc0.d]# cd ../rc6.d/&lt;BR&gt;[root@elastix rc6.d]# mv K92dahdi K90dahdi&lt;BR&gt;[root@elastix rc6.d]# mv K90network K92network&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img13.jpg" width=556 height=123&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;5) At this point, we need to test the communication between our Elastix appliance and the Fonebridge2 by using the "fonulator".&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@elastix rc6.d]# fonulator -vq&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img14.jpg" width=555 height=179&gt;&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;STRONG&gt;CONFIGURING DAHDI AND ELASTIX/ASTERISK&lt;/STRONG&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;At this point we need to configure the Elastix appliance (or server) to use the external Redfone Fonebridge2 to communicate telephonically with the outside world.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;1) Let's start by editing the system.conf file for dahdi. Feel free to use the text editor of your choice. We will be using the "vim" editor. The configuration depicted below is used for an E1 trunk. If you will be configuring a T1, this file will need to change accordingly. Basically, this file is telling dahdi to target the external Fonebridge2's IP address using the ethmf technology to connect calls.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img15.jpg" width=553 height=31&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img16.jpg" width=553 height=359&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Please note that the provided above is only a sample file for our setup.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;2) Next we must tell dahdi how to treat the T1/E1 spans in the Fonebridge2. We do this by modifying (or creating if it does not exist yet) the dahdi-channels file. The following picture shows our sample configuration. Please keep in mind that we are defining this for an E1. If you are using a T1 you'll need to modify it accordingly. Also note that the group 1 (corresponding to span 1 of the Fonebridge2) will be configured as CPE and group 2 (corresponding to span 2 of the Fonebridge2) will be configured to emulate an E1 from the Telco. Remember we are doing a loopback on the Fonebridge2. Again, we will be using "vim" as our text editor but feel free to use whatever you are comfortable with.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@elastix dahdi]# vim ../asterisk/dahdi-channels.conf&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img17.jpg" width=554 height=354&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Please make sure to set the permissions and ownership correctly:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@elastix dahdi]# chmod 664 /etc/asterisk/dahdi-channels.conf&lt;BR&gt;[root@elastix dahdi]# chown asterisk:asterisk /etc/asterisk/dahdi-channels.conf&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;3) We must now restart Asterisk for the changes to the configuration files to take effect. We perform this by issuing the following commands:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@elastix dahdi]# amportal stop&lt;BR&gt;[root@elastix dahdi]# service asterisk stop&lt;BR&gt;[root@elastix dahdi]# amportal start&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img18.jpg" width=553 height=350&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;4) Finally, we need to make sure that all channels in the Fonebridge2 have been configured correctly. We verify the channels as follows.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@elastix dahdi]# lsdahdi&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img19.jpg" width=554 height=413&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;If we have done everything correctly up to now, we will notice that the LEDs on the Fonebridge2 are now lit up signaling the correct configuration of our devices.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img20.jpg" width=226 height=111&gt;&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;STRONG&gt;TESTING THE ELASTIX / FONEBRIDGE2 SETUP&lt;/STRONG&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;In this section we will make sure that all of our work has been effective by making calls according to our initial schematic diagram.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;1) First, we create the two (2) SIP extensions that we'll need. In this case extension 503 belonging to "Jorge" and extension 509 belonging to "Mauro" are created:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img21.jpg" width=600 height=212&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;We can verify that both extensions have been created properly by using the CLI functionality from the Elastix interface:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;A href="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img22.jpg"&gt;&lt;IMG style="WIDTH: 600px; HEIGHT: 125px" border=0 src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img22.jpg" width=600 height=125&gt;&lt;/A&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;2) Now we must define the g1 trunk since we are using a group 1 in our dahdi-channels.conf file earlier in this article. We do this by creating a group within Elastix as follows:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img23.jpg" width=450 height=417&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;3) Now we need to add an outgoing route and assign group 1 (g1) to it. This will basically tell Elastix to send all calls out through the g1 trunk (associated to span 1 of the Fonebridge2).&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img24.jpg" width=450 height=479&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;4) In the same manner we must tell Elastix to be ready to receive calls. We do this by creating an incoming route. In our case, we will send all received calls to extension 503.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img25.jpg" width=450 height=522&gt;&lt;BR&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img26.jpg" width=450 height=508&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;5) We can finally proceed to make a call from extension 509 to extension 503. We do this by dialing 1503 (remember that we set our outgoing route to respond to "1|XXX". The result should be that a call is connected from extension 509 to extension 503. You can verify that it all went well by looking at the console report shown below.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img27.jpg" width=600 height=454&gt;&lt;BR&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img28.jpg" width=600 height=435&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;If you have reached this point successfully, congratulations! You are now ready to implement a high availability environment with Elastix and the Redfone Fonebridge2 in Part 2 of this article.&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Alfredo Zambrano&lt;/P&gt;</description><category>HOW-TO</category><comments>http://blog.elastixdepot.com/2009/11/19/configuring-a-redfone-fonebridge2-with-elastix-part-1.aspx#Comments</comments><guid isPermaLink="false">3f6786d3-d0bb-4caf-bd2e-a4b1f89d95ab</guid><pubDate>Fri, 20 Nov 2009 01:43:00 GMT</pubDate></item><item><title>Configuring a Redfone Fonebridge2 with Elastix (Part 2)</title><link>http://blog.elastixdepot.com/2009/11/19/configuring-a-redfone-fonebridge2-with-elastix-part-2.aspx?ref=rss</link><dc:creator>Jose L Landivar</dc:creator><description>&lt;BR&gt;This is part 2 of the two-part article on configuring Elastix with Redfone Fonebridge2 devices. In this part, we will cover all the details of setting up a robust high availability cluster with Elastix and a T1/E1 interface. At the end of this article, you will be able to implement high availability in any environment so if either server were to fail for any reason, the other will take all future calls.&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;STRONG&gt;SCHEMATIC DIAGRAM&lt;/STRONG&gt;&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;Our objective for this article is to assemble a cluster of two (2) Elastix servers with a Redfone Fonebridge2 device. The following is the diagram of the solution that we are trying to accomplish.&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/SchematicDiagramPart2.jpg?a=4"&gt;&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Basically, the call originates in extension 509 in the Elastix cluster (actually registered with the primary Elastix appliance) and then gets routed to the Fonebridge2 device and out the span 1. The call then loopsback from span 1 to span 2 of the Fonebridge2. After this, the call is received by the primary Elastix appliance and terminated on extension 503. The secondary Elastix appliance does not intervene up until this point. When we unplug the primary Elastix appliance from the network, we can try the call again and the call path is exactly the same but it's routed through the cluster by the secondary Elastix appliance (which would actually now be the primary). In either case, the call should complete without problems demonstrating the reliability of this environment.&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;STRONG&gt;EQUIPMENT REQUIRED&lt;/STRONG&gt;&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;For the purposes of this article, we will be making use of the following equipment:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;1) One (1) Redfone Fonebridge2 Dual Port T1/E1:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 250px; HEIGHT: 79px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img110.jpg?a=13" width=700&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;2) Two (2) Elastix Appliances ELX-3000 loaded with Elastix 1.5.2-2 Stable, with two (2) network interfaces each:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 250px; HEIGHT: 82px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img210.jpg?a=34" width=700&gt;&lt;/P&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 250px; HEIGHT: 75px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img31.jpg?a=55" width=700&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Please ensure to connect the devices according to the diagram above before continuing. You could review the "CONNECTING THE DEVICES" section of Part 1 for more information &lt;A href="http://blog.elastixdepot.com/2009/09/17/configuring-a-redfone-fonebridge2-with-elastix-part-2.aspx"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="OUTLINE-STYLE: none; WIDTH: 250px; HEIGHT: 240px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img71.jpg?a=78" width=700&gt;&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;STRONG&gt;INSTALLING AND PREPARING ELASTIX&lt;/STRONG&gt;&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;If you purchased an Elastix appliance there is no need to reinstall your Elastix software since a portion of your hard drive has already been reserved for use with high availability applications. If you are setting up an Elastix server of your own please install Elastix ON BOTH SERVERS according to the following specifications.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;1. Boot Elastix from Installation CD.&lt;/P&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;2. In Boot menu, select 'advanced' and press&amp;lt;Enter&amp;gt;.&lt;/P&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;3. Partition the disk space manually based on the following example of a 120GB hard drive:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;root (/), ext3, 60% of total hard disk capacity (sda1) 
&lt;LI&gt;SWAP, twice the size of available RAM 
&lt;LI&gt;Boot (/boot) 100 MB 
&lt;LI&gt;Free unformatted space, fill remaining space&lt;/LI&gt;&lt;/UL&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 400px; HEIGHT: 248px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img41.jpg?a=49" width=700&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 400px; HEIGHT: 250px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img51.jpg?a=95" width=700&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;4. All other choices are standard installation options so just follow on-screen instructions.&lt;/P&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;5. After installation is finished, please log into the system and update any new packages from the Elastix repository. We do this by executing the following command:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]#&amp;nbsp;yum –y update&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;6. Check the /etc/grub/grub.conf file and ensure that the first kernel scheduled to boot is not the Xen kernel which could cause problems.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 553px; HEIGHT: 418px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img61.jpg?a=84" width=700&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;NOTE: At some point during installation or soon after, please set the IP address and hostname for each server. In our example we have assigned 192.168.50.14 to the primary server with hostname "artemisa.elastixdepot.com" and 192.168.50.15 to the secondary server with hostname "apolo.elastixdepot.com".&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Now that you have both Elastix servers installed, we can proceed to set up the DRDB service to replicate and keep both servers synchronized.&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;STRONG&gt;DRDB AND HEARTBEAT PREPARATIONS&lt;/STRONG&gt;&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Whether you are using Elastix appliances or you installed your own Elastix server you will need to create a new partition in the unused space that you left in your hard drive. This must be done on both servers.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;1. Create a partition that will contain the data to be replicated between both servers as follows:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]#&amp;nbsp;fdisk /dev/hda&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Command to add a new partition (n) 
&lt;LI&gt;Primary (p) 
&lt;LI&gt;Partition number (4)&lt;/LI&gt;&lt;/UL&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;IMPORTANT NOTE: If the two servers have hard drives of different sizes, it is imperative that the size of the replication partition is identical in both servers, otherwise, they will never be able to synchronize over DRBD. Due to this requirement, please select the desired size of the partition exactly the same in the continuing options of the fdisk command. In our case, we chose 3GB (3072M).&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;First cylinder (&amp;lt;enter&amp;gt; to choose default) 
&lt;LI&gt;Last cylinder (+3072M) 
&lt;LI&gt;Command to select a partition (t) 
&lt;LI&gt;Choose the correct partition (4) 
&lt;LI&gt;Select type of the partition (83) 
&lt;LI&gt;Command to save all changes (w) 
&lt;LI&gt;Reboot both servers&lt;/LI&gt;&lt;/UL&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 553px; HEIGHT: 539px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img81.jpg?a=26" width=665&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Verify that the partition was created correctly with the "fdisk -l" command.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 553px; HEIGHT: 187px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img91.jpg?a=36" width=613&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;2. Format the newly created partition (in our case with the "mke2fs -j /dev/hda4" command).&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 553px; HEIGHT: 353px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img101.jpg?a=22" width=643&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;3. Now, you must erase some file system structure information from the partition that we just created in the previous step. If we don't do this, this file system structure information will also be replicated between the servers and may cause problems.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 400px; HEIGHT: 66px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img111.jpg?a=21" width=546&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;4. Install DRBD, HEARTBEAT and all dependencies with yum.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# rpm -ivh &lt;A href="http://vault.centos.org/5.2/extras/i386/RPMS/drbd82-8.2.6-1.el5.centos.i386.rpm&lt;/a&gt;&lt;br&gt;[root@artemisa"&gt;vault.centos.org/5.2/extras/i386/RPMS/drbd82-8.2.6-1.el5.centos.i386.rpm&lt;/A&gt;&lt;BR&gt;[root@artemisa ~]# yum install kmod-drbd82&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 553px; HEIGHT: 421px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img121.jpg?a=47" width=700&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# yum install heartbeat&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 553px; HEIGHT: 486px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img131.jpg?a=98" width=602&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# yum install OpenIPMI-libs openhpi heartbeat-libs heartbeat-stonith&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 553px; HEIGHT: 456px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img141.jpg?a=0" width=643&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;5. Make sure that hostnames are correctly configured for IP resolution in the file (/etc/hosts) IN BOTH SERVERS. The /etc/hosts files in both servers should contain the same entries. Please note that the IP address for the primary server (artemisa) is 192.168.50.14 and for the secondary server (apolo) is 192.168.50.15. As you will see later, the cluster will share a floating IP address of 192.168.50.16.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 400px; HEIGHT: 116px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img151.jpg?a=60" width=451&gt;&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;STRONG&gt;CONFIGURING DRDB&lt;/STRONG&gt;&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;1. DRBD allows us to write in the partition declared in both cluster members, in our case /dev/hda4. We must create a virtual partition called /dev/drdb0 IN BOTH SERVERS. Why?&lt;/P&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;2. Edit /etc/drbd.conf IN BOTH SERVERS. The file drbd.conf must be identical in both servers. Modify this sample file according to your particular requirements:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 400px; HEIGHT: 357px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img161.jpg?a=25" width=482&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;3. Before continuing, change the name for the Elastix server from web interface. Why? Delete?&lt;/P&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;4. Now, we create the metadata for /dev/drdb0 in the two servers. This is a required step to setup the environment for DRDB. We do this with the following command:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# drbdadm create-md r0&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 553px; HEIGHT: 298px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img171.jpg?a=65" width=640&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;5. Start DRDB services IN BOTH SERVERS to initiate sync process.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# service drbd start&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;6. Verify that the synchronization process is ready with the following command:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# service drbd status&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 553px; HEIGHT: 166px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img181.jpg?a=38" width=641&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;7. Initially, both servers will be secondary (as seen in the previous screen as "Secondary/Secondary"). We need to further designate which one will be the primary server.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Run the following command IN THE PRIMARY SERVER ONLY:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# drbdsetup /dev/drbd0 primary -o&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;And this command IN THE SECONDARY SERVER ONLY:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# drbdadm secondary r0&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;8. Check DRDB status again with the command "service drbd status". The result of this command should be similar to the one below for the primary server.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 553px; HEIGHT: 139px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img211.jpg?a=28" width=640&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;And the following for the secondary server.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 553px; HEIGHT: 136px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img221.jpg?a=93" width=643&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;9. We can determine a server's role by executing this command ON BOTH SERVERS:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# drbdadm state r0&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;The primary server should reply something like this:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 250px; HEIGHT: 50px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img241.jpg?a=1" width=283&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;The secondary server should reply something like this:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 250px; HEIGHT: 52px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img251.jpg?a=90" width=259&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;10. We will mount the virtual partition&amp;nbsp;/dev/drbd0 as "/replica" in the primary server, move the contents of relevant files to the /replica directory and the create symbolic links in the main file system to the new location of the relevant files as follows. In the secondary server we will create symbolic links in the same fashion and remove the contents of the relevant files as they will be replicated into the /replica directory by DRDB and the directory mounted by HEARTBEAT when the secondary server is awakened.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;The relevant files are located in:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;/etc/asterisk 
&lt;LI&gt;/var/lib/asterisk 
&lt;LI&gt;/usr/lib/asterisk 
&lt;LI&gt;/var/spool/asterisk 
&lt;LI&gt;/var/lib/mysql 
&lt;LI&gt;/var/log/asterisk 
&lt;LI&gt;/var/www&lt;/LI&gt;&lt;/UL&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Perform the following command ON BOTH SERVERS:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# mkdir /replica&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Perform the following commands IN THE PRIMARY SERVER ONLY.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# mount /dev/drbd0 /replica&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 553px; HEIGHT: 396px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img261.jpg?a=85" width=646&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# cd /replica&lt;BR&gt;[root@artemisa replica]# tar -zcvf etc-asterisk.tgz /etc/asterisk&lt;BR&gt;[root@artemisa replica]# tar -zxvf etc-asterisk.tgz&lt;BR&gt;[root@artemisa replica]# tar -zcvf var-lib-asterisk.tgz /var/lib/asterisk&lt;BR&gt;[root@artemisa replica]# tar -zxvf var-lib-asterisk.tgz&lt;BR&gt;[root@artemisa replica]# tar -zcvf usr-lib-asterisk.tgz /usr/lib/asterisk/&lt;BR&gt;[root@artemisa replica]# tar -zxvf usr-lib-asterisk.tgz&lt;BR&gt;[root@artemisa replica]# tar -zcvf var-spool-asterisk.tgz /var/spool/asterisk/&lt;BR&gt;[root@artemisa replica]# tar -zxvf var-spool-asterisk.tgz&lt;BR&gt;[root@artemisa replica]# tar -zcvf var-lib-mysql.tgz /var/lib/mysql/&lt;BR&gt;[root@artemisa replica]# tar -zxvf var-lib-mysql.tgz&lt;BR&gt;[root@artemisa replica]# tar -zcvf var-log-asterisk.tgz /var/log/asterisk/&lt;BR&gt;[root@artemisa replica]# tar -zxvf var-log-asterisk.tgz&lt;BR&gt;[root@artemisa replica]# tar -zcvf var-www.tgz /var/www/&lt;BR&gt;[root@artemisa replica]# tar -zxvf var-www.tgz&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Perform the following commands ON BOTH SERVERS:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa replica]# rm -rf /etc/asterisk&lt;BR&gt;[root@artemisa replica]# rm -rf /var/lib/asterisk&lt;BR&gt;[root@artemisa replica]# rm -rf /usr/lib/asterisk/&lt;BR&gt;[root@artemisa replica]# rm -rf /var/spool/asterisk&lt;BR&gt;[root@artemisa replica]# rm -rf /var/lib/mysql/&lt;BR&gt;[root@artemisa replica]# rm -rf /var/log/asterisk/&lt;BR&gt;[root@artemisa replica]# ln -s /replica/etc/asterisk/ /etc/asterisk&lt;BR&gt;[root@artemisa replica]# ln -s /replica/var/lib/asterisk/ /var/lib/asterisk&lt;BR&gt;[root@artemisa replica]# ln -s /replica/usr/lib/asterisk/ /usr/lib/asterisk&lt;BR&gt;[root@artemisa replica]# ln -s /replica/var/spool/asterisk/ /var/spool/asterisk&lt;BR&gt;[root@artemisa replica]# ln -s /replica/var/lib/mysql/ /var/lib/mysql&lt;BR&gt;[root@artemisa replica]# ln -s /replica/var/log/asterisk/ /var/log/asterisk&lt;BR&gt;[root@artemisa replica]# ln -s /replica/var/www /var/www&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;11. Finally, we must restart mysql ON BOTH SERVERS:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa replica]# service mysqld restart&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;STRONG&gt;CONFIGURING HEARTBEAT&lt;/STRONG&gt;&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;We will be making use of the HEARTBEAT service to awaken the secondary service in the case it's detected that the primary server has stopped responding. Both servers must have HEARTBEAT enabled. Please follow the following steps.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;1. Remember to stop all services that will be controlled by heartbeat IN BOTH SERVERS (and make sure that they don't start during boot time). These services will be managed by HEARTBEAT on the server that is in control in that moment. You can accomplish all this with the following commands:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# chkconfig asterisk off&lt;BR&gt;[root@artemisa ~]# chkconfig mysqld off&lt;BR&gt;[root@artemisa ~]# chkconfig httpd off&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;2. Edit file/etc/ha.d/ha.cf. This is a basic configuration of the file that provides all the functionalities we require. Please make sure both servers have the same exact contents in this file. In the following picture we show the contents in the primary server only.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 250px; HEIGHT: 190px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img271.jpg?a=90" width=323&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;3. Edit /etc/ha.d/haresources. In this file we will specify which is our primary server initially, which partition will be mounted when the server is brought up as primary, our floating IP (192.168.50.16 in this example), network interface (eth2 in this example) and the init scripts from init.d that will be awakened in case of a server failure (fonulator,asterisk, mysqld y httpd). Please note that the order of this list is important. Also note in the pictures below that /etc/ha.d/haresources on both servers contain the primary server name (artemisa.elastixdepot.com); in fact, both files are exactly the same.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 553px; HEIGHT: 114px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img291.jpg?a=26" width=659&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 553px; HEIGHT: 128px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img30.jpg?a=72" width=643&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;NOTE: Ensure that all the parameters are specified in a single line in this file.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;4. Edit /etc/ha.d/authkeys and change the key to one of your preference. Please make sure that both servers contain the same key. This provides security and authentication capabilities between nodes.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 553px; HEIGHT: 106px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img311.jpg?a=53" width=659&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;5. Change permissions to file/etc/ha.d/authkeys.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# chmod 600 /etc/ha.d/authkeys&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;6. Configure HEARTBEAT to initiate at server boot time.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# chkconfig --add heartbeat&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;7. Unmount /replica IN THE PRIMARY SERVER ONLY. We do this because we are going to restart HEARTBEAT and it will automatically mount /replica when it comes up.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# umount /replica&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;8. Restart DRDB IN BOTH SERVERS.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# service drbd restart&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;9. Verify that BOTH SERVERS are secondary initially.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# drbdadm state r0&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;The result should be ‘Secondary/Secondary’ in both servers.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;10. Restart heartbeat ON BOTH SERVERS.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# service heartbeat restart&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;11. Wait about a minute and recheck the server status ON BOTH SERVERS.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# drbdadm state r0&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;This time, the result should be ‘Primary/Secondary’ on primary server and 'Secondary/Secondary' in the secondary server.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;12. Execute ‘df –h’ ON THE PRIMARY SERVER and confirm that the /dev/drbd0 partition is mounted and in use.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# df -h&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Filesystem Size Used Avail Use% Mounted on&lt;BR&gt;/dev/sda1 5.9G 1.9G 3.8G33% /&lt;BR&gt;tmpfs 1.5G 0 1.5G 0%/dev/shm&lt;BR&gt;/dev/drbd0 138G 305M 131G1% /replica&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;13. You can monitor the synchronization process with following command:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# cat /proc/drbd&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;STRONG&gt;INSTALLING THE FONEBRIDGE&lt;/STRONG&gt;&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;We must now install the actual Redfone Fonebridge2 device. You may find more detailed instructions on how to do this in Part 1 of this article &lt;A href="http://blog.elastixdepot.com/2009/09/17/configuring-a-redfone-fonebridge2-with-elastix-part-2.aspx"&gt;here&lt;/A&gt;. Please follow the following steps ON BOTH SERVERS:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;1. Install the fonulator utility from the online repository.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# rpm -ivh &lt;A href="http://support.red-fone.com/downloads/fonulator/fonulator-2.0.0-36.i386.rpm"&gt;support.red-fone.com/downloads/fonulator/fonulator-2.0.0-36.i386.rpm&lt;/A&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;2. Download a demo redfone.conf from the online repository.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# cd /etc/&lt;BR&gt;[root@artemisa etc]# wget &lt;A href="http://support.red-fone.com/downloads/fonulator/redfone.conf"&gt;support.red-fone.com/downloads/fonulator/redfone.conf&lt;/A&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;3. Edit redfone.conf to meet your needs. Please see Part 1 for more information on this &lt;A href="http://blog.elastixdepot.com/2009/09/17/configuring-a-redfone-fonebridge2-with-elastix-part-2.aspx"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;4. Download the fonulator initd script from the online repository.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa etc]# cd /etc/init.d&lt;BR&gt;[root@artemisa init.d]# wget &lt;A href="http://support.red-fone.com/downloads/fonulator/old/fonulator_initd_script"&gt;support.red-fone.com/downloads/fonulator/old/fonulator_initd_script&lt;/A&gt;&lt;BR&gt;[root@artemisa init.d]# mv fonulator_initd_script fonulator&lt;BR&gt;[root@artemisa init.d]# chmod +x fonulator&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;5. Reboot BOTH SERVERS and confirm proper functionality in both. Under regular conditions, your primary server must boot, mount the DRDB partition and initiate the scripts specified in /etc/ha.d/haresources. The secondary server must boot, NOT mount the DRDB partition and NOT initiate the scripts specified in /etc/ha.d/haresources. Why? Any particular order of booting?&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;6. Verify that the DRDB partition is mounted IN THE PRIMARY SERVER by executing ‘df –h’. It should show something similar to:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa init.d]# df -h&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Filesystem Size Used Avail Use% Mounted on&lt;BR&gt;/dev/sda1 5.9G 1.8G 3.8G32% /&lt;BR&gt;tmpfs 125M 0 125M 0%/dev/shm&lt;BR&gt;/dev/drbd0 5.7G 409M 5.0G8% /replica&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;7. It is recommended that you use the dahdi init script provided by Redfone due to some earlier issues with the default. We will backup the default dahdi script and then download the one from Redfone. Please do the following ON BOTH SERVERS.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa init.d]# mv /etc/init.d/dahdi ~/dahdi.backup&lt;BR&gt;[root@artemisa init.d]# wget &lt;A href="http://support.red-fone.com/downloads/elastix/dahdi"&gt;support.red-fone.com/downloads/elastix/dahdi&lt;/A&gt;&lt;BR&gt;[root@artemisa init.d]# chmod 755 /etc/init.d/dahdi&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;8. Sometimes we run into problems with an erroneous detection of another Asterisk instance running. To prevent this, we'll implement a work-around by changing the exit value of the 'exit' from 1 to 0 in the /etc/init.d/asterisk file ON BOTH SERVERS. Please see the before and after pictures below.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# vim /etc/init.d/asterisk&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 553px; HEIGHT: 129px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img38.jpg?a=43" width=644&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="WIDTH: 553px; HEIGHT: 126px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img39.jpg?a=72" width=642&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;9. In this version of Elastix (1.5.2-2 Stable) there is an issue with a kernel panic occurring when we shutdown the network service before dahdi. Therefore, we must change the order for shutting down these services as follows:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;[root@artemisa ~]# cd /etc/rc0.d/&lt;BR&gt;[root@artemisa rc0.d]# mv K92dahdi K90dahdi&lt;BR&gt;[root@artemisa rc0.d]# mv K90network K92network&lt;BR&gt;[root@artemisa rc0.d]# cd ../rc6.d/&lt;BR&gt;[root@artemisa rc0.d]# mv K92dahdi K90dahdi&lt;BR&gt;[root@artemisa rc0.d]# mv K90network Kk92network&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Congratulations! You have successfully finished setting up your high availability environment. Now we must make sure it's working well.&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;STRONG&gt;TESTING OUR HIGH AVAILABILITY CLUSTER&lt;/STRONG&gt;&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;After having performed all configurations properly and made the connections properly you should have something similar to this:&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=center&gt;&lt;IMG style="OUTLINE-STYLE: none; WIDTH: 250px; HEIGHT: 240px" src="http://images.quickblogcast.com/7/2/9/1/9/202593-191927/img411.jpg?a=22" width=700&gt;&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Now we need to make sure all this hard work will pay off. We should be able to define our extensions 503 and 509 (please see Diagram at the top of this article) in our high availability cluster. In order to do this, we need to direct our browser to the floating IP we defined for the cluster. In our case this would be 192.168.50.16. This request from your browser is actually being handled by the primary server unless it were to fail. In case of failure of the primary server, the secondary server will respond any request to 192.168.50.16.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;In either case we will be presented with an Elastix GUI where we can specify the required extensions. Please refer to Part 1 of this article (TESTING THE ELASTIX / FONEBRIDGE2 SETUP section) for more information and screenshots of how to do this &lt;A href="http://blog.elastixdepot.com/2009/09/17/configuring-a-redfone-fonebridge2-with-elastix-part-2.aspx"&gt;here&lt;/A&gt;. After the extensions are setup, we can initiate a call from extension 509 and dial 1503 (we defined an outgoing route of '1|XXX' in Part 1 of this article). The call should be completed and the phone in extension 503 should ring.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;In order to test our high availability setup you must now unplug the primary server's ethernet cable from the switch (to simulate a failure of this server). After a couple of minutes try making the same call from 509 to 1503. The call should complete without any problems although the call is now being routed through the secondary server.&lt;/P&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Voila! There you have it. You have just completed your very own high availability clustered PBX with Elastix and Redfone.&lt;/P&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P style="MARGIN-BOTTOM: 0cm" align=justify&gt;Alfredo Zambrano&lt;/P&gt;</description><category>HOW-TO</category><comments>http://blog.elastixdepot.com/2009/11/19/configuring-a-redfone-fonebridge2-with-elastix-part-2.aspx#Comments</comments><guid isPermaLink="false">f26b9192-8e51-4b3c-a499-0b78ccb88962</guid><pubDate>Fri, 20 Nov 2009 01:40:00 GMT</pubDate></item></channel></rss>
