In this First tutorial we gonna have a look at the kannel architecture and how to Install configure it as an sms gateway with Samsung S5230 Mobile modem.
To install kannel :
1:For ubuntu Users
Goto software center or synaptic manager and select kannel from list.
Alternative: Via terminal
If you are more at ease using terminal
If you are more at ease using terminal
- Check that libxml2 is installed on your system : dpkg -l libxml2
- else : sudo apt-get install libxml2
- Install kannel from debian or kannel repository : sudo apt-get install kannel2
/* If you have any installation problem just leave comment below*/
Kannel architecture
(you will get this screen if your configuration file has not mistakes)
Kannel Architecture |
The architecture of is divided in three kinds of processes called boxes:
- BearerBox is the core of the architecture – it implements the WDP layer (provide basic core services)
- SMSBox implements the rest of the SMS gateway functionality (can have multiple SMSBox)
- WAPBox implements WAP protocol stack and WAP Push (can have multiple WAPBox)
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.
You can find more details explanations about the architecture in here.
Configuration
Now before moving any further make sure your Web Server(apache2) is up and working.
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 |
Thanks for the Nice blog to having information of sms gateway and get detail of Top 5 Bulk SMS Service Provider in India to send promotional sms.
ReplyDeleteCompanies can also purchase the Bulk SMS software that offers a wide range of functionality such as customizable speed options padisoft company
ReplyDelete