This is one of the easiest posts I've ever made. I'll show how to install FreeSWITCH which is only 5~7 lines of work but first we need to declare and install the prerequisite OS, UBUNTU 1.04 Server and even before that need to create a new Virtual Machine on my XENSERVER using XENCLIENT.
ADDING NEW VM USING XENCENTER ON XENSERVER
|Simple Click on "NEW VM"|
|Using Other Install Media as Template|
|I've Ubuntu Server 11.04 server ISO placed in my windows shared folder|
|Select which XENSERVER to create this Virtual Machine|
|Assign CPUs and Memory to VM|
|Create a Disk Storage [HDD} for VM|
|Select Capacity and Storage Space for VM-HDD|
|Selecting xenserver's storage as storage space of new VM|
INSTALL UBUNTU ON NEW Vitual Machine
Follow this post by one of my senior senior friend on step-by-step Ubuntu Server installation guide to install OS on the newly created Virtual Machine.
SETTING UP SSH ACCESS TO NEW VM
Since I assigned this new Virtual machine a private network with Private IP: 192.168.30.4. According to my virtual router's configurations in this post This IP can access internet but I definitely need to add another Destination NAT rule in my router to gain SSH access from outside world to this server.
GW-Vyatta#set nat destination rule 10 inbound-interface eth0 GW-Vyatta#set nat destination rule 10 destination port 22304 GW-Vyatta#set nat destination rule 10 translation address 192.168.30.4 GW-Vyatta#set nat destination rule 10 translation port 22 GW-Vyatta#set nat destination rule 10 protocol tcp GW-Vyatta#commit
This is How it looks like now
INSTALLING FREESWITCH on UBUNTU SERVER
Now the final phase of this post, installing our favorite VoIP Server FreeSWITCH. SSH into the FS server and on console execute these commands.
Download pre-requisite libraries and packages for FreeSWITCH.
FS-Server:#apt-get install gcc bison flex make openssl libmysqlclient15-dev libradiusclient-ng-dev mysql-server libxmlrpc-c3-dev subversion subversion-tools automake1.9 gcc-4.1 autoconf make wget libtool g++ debhelper automake1.9 autoconf libtool unixodbc-dev libasound2-dev libssl-dev libogg-dev libvorbis-dev libperl-dev libgdbm-dev libdb-dev libgnutls-dev libspandsp-dev libtiff4-dev libncurses5 libncurses5-dev screen bridge-utils libmysql++-dev libconfuse-dev libpcre3-dev curl libxml2-dev libmemcache-dev build-essential git-core
Download freeswitch source code. This takes a long time downloading almost 80~100 MB of data on slower network.
FS-Server:#git clone git://git.freeswitch.org/freeswitch.gitBuild configurations file required for compiling FreeSWITCH.
FS-Server:#./bootstrap.sh./configure sets compilation options
FS-Server:#./configureAt this point you can edit the file "modules.conf" to include any modules you like to be installed with your freeswitch setup.
Now execute make and make install commands to compile and create binary files.
FS-Server:#make && make install
Now Sit back and do something usefull (:P), hopefully if no errors are encountered then it'll take approximately 7~15 minutes. Once it completes you can follow the printed instructions to install any additional sound files if you like.
At the end just put symoblic Links:
Now, Start FreeSWITCH server for the first time.FS-Server:#ln -s /usr/local/src/freeswitch/bin/freeswitch /usr/sbin/ FS-Server:#ln -s /usr/local/src/freeswitch/bin/fs_cli /usr/sbin/
Thats it You're now connected to FreeSWITCH console.FS-Server:#cd / FS-Server:#freeswitch -nc FS-Server:#fs_cli -r
Next thing I'm going to do is setup my virtual topology such that SIP Users registering on OpenSIPS can make calls to FreeSWITCH and they get a two-way audio. I'll be using Media-Proxy (hopefully) and echo application in FreeSWITCH to test this. Till then bye-bye.