Professional Documents
Culture Documents
Step 2: Enter superuser mode and run below commands to install python
packages required for asterisk.
sudo -s
<Enter your password>
apt-get install python-setuptools
easy_install MySQL-Python
easy_install tweepy
easy_install oauth2
1 of 6 easy_install stopwatch
05/08/2017 05:09 PM
easy_install simplejson
IVRS Installation - Karnataka Open Educational ... http://www.karnatakaeducation.org.in/KOER/en/i...
easy_install MySQL-Python
easy_install tweepy
easy_install oauth2
easy_install stopwatch
easy_install simplejson
Step 4: Installing asterisk. Note install only this version of asterisk in this way
only. Go to http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/ link
and download asterisk-1.6.2.23.tar.gz le. Run below commands to install it
cd /usr/src
sudo tar -xvzf ~/Downloads/asterisk-1.6.2.23.tar.gz
sudo apt-get install ncurses-dev libxml2-dev g++
cd asterisk-1.6.2.23
sudo ./configure
sudo make clean
sudo make
sudo make install
sudo make samples
/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
Step 6: Enter superuser mode and run below commands to install and setup
Swara
wget https://github.com/ccidmysore/swara/tarball/developers
mv developers /opt/swara.tgz
cd /opt
tar xvzf swara.tgz
mv ccidmysore-swara-1cc734f swara
cd /var/www/
ln -s /opt/swara/web /var/www/swara
ln -s /opt/swara/web /var/www/html
<create folder name as asterisk in /usr/share>
mkdir -p /usr/share/asterisk
ln -s /opt/swara/bin /usr/share/asterisk/agi-bin
ln -s /opt/swara/bin /usr/share/asterisk/sounds
cp /opt/swara/conf/extensions.conf /opt/swara/conf/sip.conf /etc/asterisk
cd /usr/share/asterisk
mkdir orig && mv sounds agi-bin orig/
ln -s /opt/swara/bin agi-bin && ln -s /opt/swara/sounds sounds
2 of 6 cd /opt/swara/conf 05/08/2017 05:09 PM
<Edit swara.conf and put in your database password>
sudo gedit swara.conf
cp swara.conf /etc
IVRS Installation - Karnataka Open Educational ... http://www.karnatakaeducation.org.in/KOER/en/i...
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>
sudo gedit swara.conf
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
cd ~/Downloads
tar -xvf chan_dongle-1.1.r14.tgz
cd chan_dongle-1.1.r14
sudo ./configure
sudo make
sudo make install
cd ~/Downloads/chan_dongle-1.1.r14/etc/
<Copy the dongle.conf file to /etc/asterisk/>
sudo cp ~/Downloads/chan_dongle-1.1.r14/etc/dongle.conf /etc/asterisk/
<Open the file /etc/asterisk/dongle.conf and set the IMEI setting with the IMEI number of the dongle>
sudo gedit /etc/asterisk/dongle.conf
<Save and close the dongle.conf file after adding IMEI number of the dongle>
<Open the file "/etc/asterisk/dongle.conf" and set the values for Context as "from-sip" and exten as "swara-local">
sudo gedit /etc/asterisk/dongle.conf
<Save and close the dongle.conf file
cd ~/Downloads
wget http://karnatakaeducation.org.in/swarabinFiles.zip
unzip swarabinFiles.zip
cd swarabinFiles/
sudo cp -r bin/ /opt/swara/
sudo cp -r conf/ /opt/swara/
sudo cp -r libs/ /opt/swara/
sudo cp -r tools/ /opt/swara/
3 of 6 05/08/2017 05:09 PM
Step 12: Setup Asterisk to use swara congs
IVRS Installation - Karnataka Open Educational ... http://www.karnatakaeducation.org.in/KOER/en/i...
<Edit /etc/asterisk/extensions.conf>
sudo gedit /etc/asterisk/extensions.conf
<Under [from-sip], change>
exten => swara-local,n,AGI(menu_system_localized.py)
to
exten => swara-local,n,AGI(/opt/swara/bin/menu_system_localized1.py)
<Save and close the file after changing as shown above>
Installation is now completed. Now to run the IVRS and send voice-sms, connect
the USB dongle to the USB drive and follow below steps:
1. Open the terminal. change to root using the command "sudo -s"
2. Now run the command "asterisk -vvvvvvc". This should run without fail and the CLI prompt should come
3. On the CLI command prompt run the command "agi set debug on"
4. Call to the number and you should hear the IVR prompt
5. Stop to this run "core stop gracefully"
6. Stop and Restart " core restrat gracefully"
7. check Dongle is ready "dongle show devices"
Sending Voice-SMS
Below steps can be followed to send Voice-SMS with above set-up. Get the
Voice-SMS GUI from this link http://karnatakaeducation.org.in/VoiceBlast.zip.
Extract the le to get VoiceBlast folder inside your Downloads folder. To be able to
run IVRS without going to Terminal, please run below comm
sudo visudo
Now press Ctrl+O and then press Enter and then Ctrl+X to come out of editor.
gedit /home/ubuntu/Downloads/VoiceBlast/voiceblast.sh
This will open edit window, now paste the below code into it and save the le.
4 of 6 05/08/2017 05:09 PM
#!/bin/bash
cd ~/Downloads/VoiceBlast/ && sudo ./VBlast4.py
IVRS Installation - Karnataka Open Educational ... http://www.karnatakaeducation.org.in/KOER/en/i...
This will open edit window, now paste the below code into it and save the le.
#!/bin/bash
cd ~/Downloads/VoiceBlast/ && sudo ./VBlast4.py
Right click on Applications, select Edit menu. Click on Oice on the left side and
click on New Item on the right side. Type IVRS 1 as name and type below
command in the Command eld:
Again click on New Item and Type IVRS 2 for Name eld. Then in Command eld
type the following:
/home/ubuntu/Downloads/VoiceBlast/voiceblast.sh
Before proceeding with below steps, please ensure you have the following with
you - Android phone, Audacity software, Tape-a-talk
app on your Android and
earphones if available.
1. Install Tape-a-talk
app on your Android
phone.
2. This IVRS platform requires audio recording in *.wav format, so please
record using Tape-a-talk which outputs *.wav format audio by default.
3. Set frequency in the android app to 8,000GHz which is another requirement
for IVRS.
5 of 6 05/08/2017 05:09 PM
4. Hold your phone at exactly 450 degree angle and at half-feet distance from
your mouth for better audio capture by phone's microphone.(Use earphones
if available)
IVRS Installation - Karnataka Open Educational ... http://www.karnatakaeducation.org.in/KOER/en/i...
6 of 6 05/08/2017 05:09 PM