How to install and configure kannel

Kannel is an open source WAP and SMS gateway. With the help of Kannel ,one can connect with the operators SMSC to send and receive SMS.

Kannel also operates as Push Proxy Gateway , or PPG, making possible for content servers to send data to the phones.

How to configure Kannel.

1 ) Requirements
Kannel requires the following software environment:
•C compiler and libraries for ANSI C, with normal Unix extensions such as BSD sockets and related tools.
(GNU’s GCC tool-chain is recommended)
•The Gnome XML library (known as gnome-xml and libxml), version 2.2.5 or newer.
See http://xmlsoft.org/xml.html.
If you are installing it from your distribution’s packages, you’ll need libxml2-dev
in addition to run-time libxml2 package libraries.
•GNU Make.
•An implementation of POSIX threads (pthread.h).

2)Getting the source code:

The source code to Kannel is available for download at http://www.kannel.org/download.shtml.
3) Compiling the gateway
Go to your Kannel source directory( where you unpack Kannel source) and run the following commands.

./configure
Make

The configure script investigates various things on your computer for the Kannel compilation needs and writes out the Makefile used to compile Kannel. make then runs the commands to actually compile Kannel.

For detailed instruction on using the configuration script, see file INSTALL.
That file is a generic documentation for configure. Kannel defines a few additional options:

After this you can copy the bearerbox, smsbox and wapbox binary from gw directory to the directory.

from which you want to run kannel. Say you want to run the kannel from /home/admin/kannel than run the following command.

cp /kannel-source-directory/gw/smsbox /home/admin/kannel
cp /kannel-source-directory/gw/bearerbox /home/admin/kannel
cp /kannel-source-directory/gw/wapbox /home/admin/kannel

Now you are ready to use Kannel as SMS/WAP gateway.

To the run the Kannel you require a configuration file. The configuration file can be divided into three parts:
bearerbox configurations, smsbox configurations and wapbox configurations. Bearerbox part has one ‘core’

group and any used SMS center groups, while wapbox part has only one wapbox group. In smsbox part there is one smsbox group and then number of sms-service and sendsms-user groups.
Following is the sample kannel configuration file called testkannel.conf , put this file in your Kannel directory. In our case it is /home/admin/kannel.

group = core
admin-port = 22603
smsbox-port = 22601
admin-password = anypassword
status-password = foo
admin-deny-ip = “”
admin-allow-ip = “”
log-file = “kannel.log”
log-level = 0
box-deny-ip = “*.*.*.*”
box-allow-ip = “127.0.0.1”
access-log = “access.log”
store-file = “kannel.store”

# SMSC CONNECTIONS
group = smsc
smsc = SMPP
host = IP addres(provided by your operator)
port = 1100(provided by your operator)
smsc-username = provided by your operator
smsc-password = provided by your operator
keepalive = 25

# SMSBOX SETUP

group = smsbox
bearerbox-host = localhost
sendsms-port = 10000
log-file = “smsbox.log”
log-level = 0
#access-log = “access.log”

# SEND-SMS USERS

group = sendsms-user
username = anypassword
password = anypassword
#user-deny-ip = “”
#user-allow-ip = “”
group = sms-service
keyword = default
text = This facility is down for maintenance. Sorry for the inconvenience. Please try again after some time.
accept-x-kannel-headers = true
max-messages = 1
concatenation = true

For details regarding these keywords and other option , please refer www.kannel.org

4 )Starting the gateway

./bearerbox -v 1 configurationfilename
./smsbox -v 1 configurationfilename
5) Stopping the gateway

lynx -dump http://localhost:22603/shutdown?password=anypassword

For information regarding this document, please refer www.kannel.org