
In order to install Swara, you need to be reasonably proficient with Linux in general and your distribution (in this case Ubuntu) in particular.
This means you shoudl be able to install your own applications using apt-get and be able to troubleshoot broken downloads and dependencies.
If this is all g(r)eek to you, please find someone who know their way around a Linux system to at least look over your shoulder, so that you don’t waste time with trivial issues. Of course spending time solving trivial issues is the best way to get good with any system.
To get Swara installed on Ubuntu, you need:
- An Ubuntu system (d-uh), preferably a newer version, 64 and 32 bit are both supported
- If you are installing a fresh system, we recommend Ubuntu Server (the latest edition). While installing the system, please make sure to install the following:
- OpenSSH Server
- LAMP
- Mail Server
- An internet connection (and patience depending on where you’re installing from)
- Root credentials (yes, I know this is insecure and one day I promise I will update this page to reflect a minimal permission set
Steps:
- Open a terminal (CTRL+ALT+T)
- Run
sudo su - and provide your credentials
- Run the following commands to install the dependencies:
# apt-get install lame asterisk mysql-server wget gcc g++ bison zlib1g zlib-bin openssl php5-mysql php5 apache2 python-mysqldb
# apt-get install python-setuptools
# easy_install MySQL-Python
# easy_install tweepy
# easy_install oauth2
# easy_install stopwatch
# easy_install simplejson
- Turn off all firewalls
- Set up required services to start on boot:
# /usr/bin/mysql_secure_installation (Answer yes to every question, set a new password for the root user)
# mysql -u root -p
mysql>create database swara;
mysql>exit
- Download Swara and install:
# wget https://github.com/mojolab/swara/tarball/developers
# mv developers /opt/swara.tgz
# cd /opt
# tar xvzf swara.tgz
# mv mojolab-swara swara
# cd /var/www/
# ln -s /opt/swara/web /var/www/swara
# cd /usr/share/asterisk
# mkdir orig && mv sounds agi-bin orig/
# ln -s /opt/swara/bin agi-bin && ln -s /opt/swara/sounds sounds
# cd /opt/swara/conf
# <Edit swara.conf and put in your database password>
# cp swara.conf /etc
# cp extensions.conf /etc/asterisk
# cp sip.conf /etc/asterisk
# mysql -u root -p swara < swaradb.sql
# cd /opt/swara/web
# mkdir /opt/swara/sounds/web && ln -s /opt/swara/sounds/web audio
# ln -s /opt/swara/sounds/web upload
# chmod a+rwx -R /opt/swara
# touch /var/log/swara.log
# chmod a+rwx -R /var/log/swara.log
- Open a browser and go to http://<yourIPAddress>/swara/install.php

- Check that the permissions are correct and click “Next”
- Enter the details for your setup as shown, click “Next”

- Open the file “/opt/swara/web/loudblog/custom/config.php” in a text editor, remove all the existing contents and replace with the contents of the text box in the browser
- Save and close the file
- Go back to the browser and click “Next”
- This will complete the setup
This completes the web and IVR setup on the server side. Next we need to set up clients and test the IVR to confirm that it works.
- Install a softphone application such as XLite, Twinke or MySJPhone.
- Configure it with the SIP account details of the server with the following:
- SIP Server : Your Ubuntu machine’s IP address
- Username: mysjphone
- Password: blablabla
- Use the softphone to call the SIP extension: swara-local
- You should hear the IVR prompts
- If you press 1 you should be able to record a new message, which will in turn show up on the Postings page,
Like this:
Like Loading...