As this tutorial is about configuring Kannel to be used for an SMS application we will only consider the SMS centre , the BearerBox and the SMSBox.
Configuration
Now before moving any further make sure your Web Server(apache2) is up and working.
Open /etc/kannel/kannel.conf with your editor and add the following lines.
1. The Core Group (BearerBox)
group = core
admin-port = 13000
smsbox-port = 13001
admin-password = bar
status-password = foo
log-file = "/var/log/kannel/bearerbox.log"
log-level = 0
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
2. The SMS Centre Group
group = smsc
smsc = at
modemtype = Samsung Electronics Co., Ltd S5230
device = /dev/ttyACM0
speed = 19200
my-number = +918009657517
sms-center = +919020000500
validityperiod = 167
3. The Modems Group
group = modems
broken = true
id = Samsung Electronics Co., Ltd S5230
name = "Samsung Electronics Co., Ltd S5230"
detect-string = "S5230"
init-string = "AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0 "
speed = 115200
enable-mms = true
message-storage = sm
Now this one is difficult as you have to find init-strings for your modem . To find that you can install wvdial and check its wvdial.conf file or you can go to the modem manufacturer website and check out its manual or google it out ,well i will suggest you to use first way.I am using Samsung S5230 as my primary modem here which will be used to send sms on behalf of me.
4. The SMSBox Group
group = smsbox
bearerbox-host = localhost
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"
5. Send SMS User Group
group = sendsms-user
username = kannel
password = kannel
concatenation = true
max-messages = 3
max-messages = 10
6.SMS Service Group
group = sms-service
keyword = default
get-url = "http://localhost/kannel/receivesms.php?sender=%p&text=%b"
accept-x-kannel-headers = true
max-messages = 3
concatenation = true
catch-all = true
catch-all = true
Starting Kannel Boxes
1. Start the BearerBox
Open terminal and type the following command
sudo bearerbox -v 0 /etc/kannel/kannel.conf
 |
Bearerbox Working |
 |
Bearerbox Working |
(you will get this screen if your configuration file has not mistakes)
2. Start the SMSBox
Open terminal and type the following command
sudo smsbox -v 0 /etc/kannel/kannel.conf
 |
smsbox |
(this will start the SMSBox)
Your done, you can check the status of the services by navigating to “http://localhost:13000/status?password=foo” with your browser
 |
Kannel |