2. Kannel Installation and Configuration as SMS gateway Server
Installation
1. Download latest version of Kannel http://www.kannel.org/download.shtml
2. Unzip it into some directory
3. Before installation of Kannel we have to install a dependency libxml2. To install libxml2 we can
download it from the following link. ftp://gd.tuwien.ac.at/pub/libxml/
a. After extracting the package cd into the directory where it is extracted.
b. Type ./configure
c. make
d. make install
e. to check whether the installation is successful or not type this command: make tests
4. After installation of libxml2 now we will be able to install the Kannel. Now repeat the above
steps which we repeated for the libxml2 installation
a. cd into directory where Kannel is unzipped and then type the following commands
b. ./configure
c. make
d. make install
5. Now Kannel is installed and ready for the configuration
Configuration
6. Kannel has three parts bearerbox, smsbox and wapbox. We will need only two bearerbox and
smsbox as we are going to setup it as SMS gateway server. Bearerbox is the main queue and
smsbox handles the smscs.
7. Now we need configuration of each beaerbox and smsbox to run the Kannel according to device
attached. Configuration of bearerbox and smsbox is written into a configuration file sometimes
but not necessarily named as ‘smskannel.conf’.
8. How to find the ‘smskannel.conf’? Open the terminal and type this command > locate
smskannel.conf. Now you the open the ‘smskannel.conf’ by the path returned by the command.
a. After opening the ‘smskannel.conf’ you will see different types of groups there. E.g.
Core group, smsc group, modem group and smsc service groups. You can refer Kannel
installation guide for further information.
9. By default bearerbox and smsbox installation files lies in /usr/local/sbin
10. Now copy the ‘smskannel.conf’ into /usr/local/sbin
11. Modem which will be used with Kannel should support ‘AT+CNMI’ command otherwise modem
will not work with Kannel.
12. We can check if our modem is detected or not by this command > ls /dev . If modem is being
detected then we will see ttyACM0 / ttyUSB0 in result.
13. To check whether’ AT+CNMI’ command is supported on the modem or not we have to test it
through serial port. In Linux we can open our device through serial port using ‘minicom’.
3.
4.
5. If get error in return then you cannot use that modem with Kannel and if you get out put something like
above then you can use that modem with Kannel.
14. Now run the bearerbox by this command
bearerbox smskannel.conf
15. Now run smsbox by this command opening a new terminal and going into directory
smsbox smskannel.conf
16. smskannel.conf for Motorola Razer V3 is given below
*******************************smskannel.conf starts here********************************
# 1% gw/bearerbox gw/smskannel.conf
# 2% gw/smsbox gw/smskannel.conf
# 3% test/fakesmsc -i 0.1 -m 100 "123 345 text nop"
# CORE
# There is only one core group and it sets all basic settings
# of the bearerbox (and system). You should take extra notes on
8. #access-log = "/tmp/access.log"
#---------------------------------------------
# SEND-SMS USERS
# These users are used when Kannel smsbox sendsms interface is used to
# send PUSH sms messages, i.e. calling URL like
# http://kannel.machine:13013/cgi-bin/sendsms?username=tester&password=foobar...
group = sendsms-user
username = tester
password = foobar
#user-deny-ip = ""
#user-allow-ip = ""
#---------------------------------------------
# SERVICES
group = sms-service
keyword = nop
text = "You asked nothing and I did it!"
# There should be always a 'default' service. This service is used when no
# other 'sms-service' is applied.
group = sms-service
keyword = default
text = "Kannel Configured by Mahtab Rasheed: Reply from Kannel"
catch-all = yes
max-messages = 1
9. group = sms-service
keyword = Mahtab
text = "How are u Mahtab?"
group = sms-service
keyword = majid
text = "How are u Majid Hussain?"
group = sms-service
keyword = hammad
text = "Sir we are fine....This message is from Sir Hammad"
*******************************smskannel.conf ends here*********************************