Wednesday, July 6, 2011

KANNEL

Kannel is a compact and very powerful open source WAP and SMS gateway.This time i got a chance to implement it.I was perplex  and was surprised why the deveolpers of it haven't documented it even they are using it since decades.So i am documenting it so that others can take a quick start and do not face the problems that i faced.Please follow it step by step and ask if you get any problem anywhere.
I am going to explain how to compile,install and configure it.My System is Ubuntu(10.04).Just follow these steps.

1) Open terminal and install it
sudo apt-get install build-essential bison libxml2-dev libmysqld-dev

Now install it.
sudo apt-get install libtool
Now download the source code of kannel from Click to download

2) Compile and Install it now as:
./configure
make
make install


3)Now you need configuration files .Download those from here Click to download
Now make the changes as per your own needs e.g change the Phone/Modem name as per your's etc.

4) Attach your phone/modem to your computer and select Pc suite or Nokia mode option.
Note:You should know at which port your phone or modem is connected so use 'dmesg' command to know it.

5) Start the bearerbox and smsbox by issuing the following commands in different terminals.
For bearbox:
sudo bearerbox -v 1 /path-to-config file

For Sms-box:
sudo smsbox -v 1 /path-to-config file

Now Kannel is configured and you are ready to use it.You can now send sms from browser (Url).Use following url and make your changes for username and password and paste it in browser's url and then enter.Message will be send to the given number.
Url is:
http://127.0.0.1:13018/cgi-bin/sendsms?username=your-username&password=your-password&to=+91-Enter a number to which you want to send a sms&text=Hello+world

Done!!!
Please don't hesitate to ask if you face any problem.

1 comment:

  1. make
    make all-recursive
    make[1]: Entering directory `/home/sofat/gateway-1.4.3/sqlbox'
    Making all in gw
    make[2]: Entering directory `/home/sofat/gateway-1.4.3/sqlbox/gw'
    gcc -DHAVE_CONFIG_H -I. -I.. -I../gw -I../gw -g -O2 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -I/usr/local/include/kannel -g -O2 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES= -I/usr/include/libxml2 -MT sqlbox.o -MD -MP -MF .deps/sqlbox.Tpo -c -o sqlbox.o sqlbox.c
    sqlbox.c:96:2: error: #error You need support for at least one DB engine. Please recompile Kannel.
    make[2]: *** [sqlbox.o] Error 1
    make[2]: Leaving directory `/home/sofat/gateway-1.4.3/sqlbox/gw'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/sofat/gateway-1.4.3/sqlbox'
    make: *** [all] Error 2

    ReplyDelete