Line 11: |
Line 11: |
| | | |
| Step 1: Install ssh, lamp and other required packages | | Step 1: Install ssh, lamp and other required packages |
− | sudo apt-get install openssh-client openssh-server | + | sudo apt install linux-headers-`uname -r` gcc g++ make libnewt-dev libncurses5-dev openssl libssl-dev zlib1g-dev libxml2-dev libjansson-dev uuid-dev libsqlite3-dev git autoconf automake |
− | sudo apt-get install tasksel
| |
− | sudo tasksel install lamp-server
| |
− | sudo apt-get install ncurses-dev libxml2-dev g++
| |
− | sudo apt-get install lame mysql-server wget gcc g++ bison zlib1g zlib-bin openssl php5-mysql php5 apache2 python-mysqldb
| |
| | | |
| Step 2: Enter superuser mode and run below commands to install python packages required for asterisk. | | Step 2: Enter superuser mode and run below commands to install python packages required for asterisk. |
Line 31: |
Line 27: |
| | | |
| | | |
− | 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''' file. Run below commands to install it | + | 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-13.13.1.tar.gz''' file. Run below commands to install it |
| cd /usr/src | | cd /usr/src |
− | sudo tar -xvzf ~/Downloads/asterisk-1.6.2.23.tar.gz | + | sudo tar -xvzf ~/Downloads/asterisk-13.13.1.tar.gz |
− | sudo apt-get install ncurses-dev libxml2-dev g++
| + | cd asterisk-13.13.1 |
− | cd asterisk-1.6.2.23 | + | ./configure |
− | sudo ./configure | + | make clean |
− | sudo make clean | + | make |
− | sudo make | |
| sudo make install | | sudo make install |
| sudo make samples | | sudo make samples |
| | | |
− | Step 5: Create new database for swara in mysql | + | Step 5: Enter superuser mode and run below commands to install and setup Swara |
− | /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 | | wget https://github.com/ccidmysore/swara/tarball/developers |
| mv developers /opt/swara.tgz | | mv developers /opt/swara.tgz |
Line 57: |
Line 46: |
| ln -s /opt/swara/web /var/www/swara | | ln -s /opt/swara/web /var/www/swara |
| | | |
− | Step 7: Set up symlinks and Asterisk configurations | + | Step 6: Set up symlinks and Asterisk configurations |
| | | |
| ln -s /opt/swara/web /var/www/html | | ln -s /opt/swara/web /var/www/html |
Line 74: |
Line 63: |
| cp extensions.conf /etc/asterisk | | cp extensions.conf /etc/asterisk |
| cp sip.conf /etc/asterisk | | cp sip.conf /etc/asterisk |
− | mysql -u root -p swara < swaradb.sql
| |
| cd /opt/swara/web | | cd /opt/swara/web |
| mkdir /opt/swara/sounds/web && ln -s /opt/swara/sounds/web audio | | mkdir /opt/swara/sounds/web && ln -s /opt/swara/sounds/web audio |
Line 82: |
Line 70: |
| chmod a+rwx -R /var/log/swara.log | | chmod a+rwx -R /var/log/swara.log |
| | | |
− | Step 8: Download and install chan_dongle-1.1.r14.tgz from https://code.google.com/archive/p/asterisk-chan-dongle/downloads | + | Step 8: Download and install chan_dongle from https://github.com/wdoekes/asterisk-chan-dongle |
| cd ~/Downloads | | cd ~/Downloads |
− | tar -xvf chan_dongle-1.1.r14.tgz | + | git clone https://github.com/wdoekes/asterisk-chan-dongle.git |
− | cd chan_dongle-1.1.r14 | + | cd asterisk-chan-dongle |
− | sudo ./configure | + | ./configure |
− | sudo make | + | make |
| sudo make install | | sudo make install |
| | | |
| Step 9: Setup chan dongle with Asterisk: | | Step 9: Setup chan dongle with Asterisk: |
− | cd ~/Downloads/chan_dongle-1.1.r14/etc/ | + | cd ~/Downloads/asterisk-chan-dongle/etc/ |
| <Copy the dongle.conf file to /etc/asterisk/> | | <Copy the dongle.conf file to /etc/asterisk/> |
− | sudo cp ~/Downloads/chan_dongle-1.1.r14/etc/dongle.conf /etc/asterisk/ | + | sudo cp ~/Downloads/asterisk-chan-dongle/etc/dongle.conf /etc/asterisk/ |
| <Open the file /etc/asterisk/dongle.conf and set the IMEI setting with the IMEI number of the dongle> | | <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 | | sudo gedit /etc/asterisk/dongle.conf |