-->
🏠 🔍
SHAREOLITE

How to setup and use Kannel gateway as SMS gateway


Kannel is an Open source SMS (Short Messaging Service) gateway which is developed on Unix environment. This is one of the widely used SMS gateway worldwide to interface with mobile operators messaging centers to send and receive short messages from mobile subscribers using SMPP (Short message Peer to Peer ) protocol.  Here we have tried to explain the basics in a simple way on how it can be setup , configured to connect to a messaging center for sending or receiving short messages.

Below is an overview of Kannel when used a SMS gateway.


As shown in above self explanatory image, it comprises of two processes - SMS Box and Bearer Box.

  • SMS Box - This process interfaces your application program with kannel bearerbox process. Application communicate by calling a HTTP URL which has the user authentication details , the short message , the subscriber mobile number ,  the source number etc . This process authenticates these details and further authorize by relaying the message to Bearer Box process.
  • Bearer Box - This process interfaces your system with the operator short message centers over TCP/IP i.e, mobile operators usually share SMS center IP and port to which a TCP connection has to be established and further follow the SMPP protocol methods to send and receive messages.This process takes care of encoding & decoding of messages between SMSBox and external SMS centers.
How to install this on a Linux system : 

We recommend you download the stable release from kannel website under this link which is usually a source tar file.In our example , we have the stable release version gateway.1.4.3.


Kannel GW requires the following pre-requisites . Make sure these packages (versions do not matter ) are installed before proceeding with installation 

[root@shareolitelab ~]# rpm -qa | grep libxml
libxml2-1.6.16-10
libxml2-devel-2.6.18-11
libxml2-python-2.6.16-10

Extract the package files 
[root@shareolitelab ~]# tar –zxvf gateway-1.4.3.tar.gz
[root@shareolitelab ~]# cd gateway-1.4.3
[root@shareolitelab ~]# ./configure -disable-ssl
[root@shareolitelab ~]# make
[root@shareolitelab ~]# mkdir –p /kannel/bin        ( Binaries bearerbox & smsbox will be copied here )
[root@shareolitelab ~]# mkdir –p /kannel/cfg        ( Configurations )
[root@shareolitelab ~]# mkdir –p /kannel/util        ( Utils for managing the process )
[root@shareolitelab ~]# mkdir –p /kannel/log        ( Debug logs  )
[root@shareolitelab ~]# make bindir=/kannel/bin install
[root@shareolitelab ~]# cd /kannel/bin
[root@shareolitelab ~]# cp /usr/local/sbin/*box  /kannel/bin/

[root@shareolitelab ~]# vi doc/examples/kannel.conf  ( This has the sample configuration file )

Click here for the next article on kannel gateway configuration , startup , shutdown , sending SMS procedures.

Hope this is useful to some SMPP Kannel beginners. Steps on configuration , startup and verification will be shared shortly.


Comments

–>