Project Objective:


Author:


System details and Assumptions:


Note:


Setting up the Kannel server:


cd /home/ubuntu
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential wget libssl-dev libncurses5-dev libnewt-dev libxml2-dev linux-headers-$(uname -r) libsqlite3-dev uuid-dev lynx-cur
sudo apt-get build-dep linux-image-$(uname -r)
sudo apt-get install kernel-package

bison -V
sudo apt-get remove bison
sudo apt-get install python-dev
sudo apt-get install python3-dev

wget ftp://xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz
tar zxvf libxml2-2.9.4.tar.gz
cd libxml2-2.9.4/
./configure
make
sudo make install
cd ..

wget ftp://ftp.gnu.org/gnu/m4/m4-1.4.10.tar.gz
tar -xvzf m4-1.4.10.tar.gz
cd m4-1.4.10
./configure –prefix=/usr/local/m4
make
sudo make install
cd ..

wget http://ftp.gnu.org/gnu/bison/bison-2.7.tar.gz
tar zxvf bison-2.7.tar.gz
cd bison-2.7/
ls /usr/local/m4/bin/
PATH=$PATH:/usr/local/m4/bin/
./configure –prefix=/usr/local/bison –with-libiconv-prefix=/usr/local/libiconv/
make
sudo make install
cd ..

sudo apt-get install apache2
(Testing: open this page in a web browser: http://35.154.95.122)
sudo /etc/init.d/apache2 restart

wget http://www.kannel.org/download/1.4.4/gateway-1.4.4.tar.gz
tar zxvf gateway-1.4.4.tar.gz
cd gateway-1.4.4/
./configure
touch .depend
make depend
make
make check
sudo make install

cd /var/log
sudo mkdir kannel

cd /usr/local/sbin/
sudo cp /home/ubuntu/gateway-1.4.4/gw/smskannel.conf .

Configure the Kannel server (You can delete the content in existing configuration file and add the below configuration using a text editor):


cd /usr/local/sbin
sudo nano smskannel.conf

group = core
admin-port = 13000
admin-password = Test12
status-password = Test12
admin-deny-ip = “...
admin-allow-ip = “127.0.0.1;49.206.51.129;35.154.95.122”
smsbox-port = 13001
box-deny-ip = “...
box-allow-ip = “127.0.0.1;49.206.51.129;35.154.95.122”
log-file = “/var/log/kannel/bearerbox.log”
log-level = 1
access-log = “/var/log/kannel/access.log”
dlr-storage = internal

group = smsc
smsc = smpp
smsc-id = SMPPSim
allowed-smsc-id = SMPPSim
preferred-smsc-id = SMPPSim
host = 172.31.18.204
port = 2775
transceiver-mode = yes
smsc-username = smppclient1
smsc-password = Test12
system-type=default

group = smsbox
bearerbox-host = 127.0.0.1
sendsms-port = 13013
global-sender = 13013
sendsms-chars = “0123456789 +-“
log-file = “/var/log/kannel/smsbox.log”
log-level = 0
access-log = “/var/log/kannel/access.log”

group = sendsms-user
username = chandramouli
password = Test12
user-deny-ip = “...
user-allow-ip = “127.0.0.1;49.206.51.129;35.154.95.122”

group = sms-service
keyword = nop
text = “You asked nothing and I did it!”

group = sms-service
keyword = default
text = “No service specified”

Setting up the SMSC server:


cd /home/ubuntu
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential wget libssl-dev libncurses5-dev libnewt-dev libxml2-dev linux-headers-$(uname -r) libsqlite3-dev uuid-dev
sudo apt-get build-dep linux-image-$(uname -r)
sudo apt-get install kernel-package

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
(Testing: javac -version)
sudo apt-get install oracle-java8-set-default
sudo update-alternatives –config java
(Note: Select Auto mode)
sudo update-alternatives –config java
(Note: Copy the path something like /usr/lib/jvm/java-8-oracle)
sudo nano /etc/environment
(Add the below line at end of the file)
JAVA_HOME=”/usr/lib/jvm/java-8-oracle”
source /etc/environment
(Testing: echo $JAVA_HOME)

Note: Download “SMPPSim.tar.gz” from “http://www.seleniumsoftware.com/downloads.html” web site and save it in to your home folder.
cd /home/ubuntu
tar -zxvf SMPPSim.tar.gz

Deploy the REST API code (Non-Developer approach) in Kannel server:


cd /home/ubuntu
git clone https://github.com/ReachCMP/plivosms.git

Deploy the REST API code (Developer approach) in Kannel server:


Login to the Kannel server
sudo apt-get install git-all
cd /usr/local/
sudo wget https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz
sudo tar zxvf go1.8.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
cd
sudo nano .profile
export PATH=$PATH:/usr/local/go/bin
export GOROOT=/usr/local/go
export GOPATH=/home/ubuntu/go
source ~/.profile
cd /home/ubuntu/
mkdir go
cd go
mkdir src
cd src
git clone https://github.com/ReachCMP/plivosms.git

Run the services:


Login to the SMSC server and execute the below commands to start SMSC simulator:

Open another terminal and login to the Kannel server and execute the below commands to start BearerBox:

Open another terminal and login to the Kannel server and execute the below commands to start SMSBox:

Open another terminal and login to the Kannel server and execute the below commands to start REST API service (Non-Developer approach):

Open another terminal and login to the Kannel server and execute the below commands to start REST API service (Developer approach):

Alternatively, you can run the unit tests using the below command:

And run the project using the below command:

Testing with out using API:


Below are the some of the URLs to do some operations from the web browser:

Testing with REST API: