Using Kannel as an SMS gateway

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Will White's picture

I found Kannel, an open source WAP/SMS Gateway that runs on Linux. According to their project's website, it is possible to run Kannel on a machine with a GSM mobile phone connected to it and have yourself an SMS gateway. I will definitely take a close look at this project. I'm going to try to get it running this weekend. If I can, writing a driver for this system makes a lot of sense. It will make SMS more accessible to smaller organizations.

Comments

SMS for the masses

mlncn's picture

That would be fantastic.

~ ben melançon

member, Agaric Design Collective
http://AgaricDesign.com - "Open Source Web Development"

benjamin, agaric

It will be great if gammu is supported too

wuf31's picture

Please take a look at http://www.gammu.org/wiki/index.php?title=Gammu:SMSD
Gammu runs on both win32 and linux, so smaller organization who aren't familiar with linux, can still use it.
This way, you can make the sms framework a lot more accesible.

problem with smsbox

ornella81-gdo's picture

Hi,

to start kannel from the command line I had to launch the following command:
./bearerbox -v 1 smskannel.conf
./smsbox -v 1 smskannel.conf
Then, every time I successfully send an SMS through a GSM Phone (Nokia Communicator 9500) using Kannel, the service smsbox is stopped by itself. If I want to send another SMS I had to start again the smsbox (command ./smsbox -v 1 smskannel.conf).
How can I modify the configuration file smskannel.conf in order to make the smsbox always on?

Thanks,

Ornella

gsmlib

haggan's picture

Hey what about just using gsmlib? http://www.pxh.de/fs/gsmlib/index.html

I am willing to help out adapting gsmlib for this project!

kannel support?

rgucci's picture

Is there any development on kannel support?

I have a project right now that uses clickatell, but I find using kannel for testing is very useful, rather than having to spend credits on clickatell.

I have built a quick and dirty sms_kannel testing module, totally based on clickatell, only supports basic sms sending for now. May upload it here if anyone is interested.

Russell JVM Gutierrez
Manager, Hong Kong Projects
flippingNORMALS
Web | Social Media | Mobile

Russell JVM Gutierrez

SMS sending using webform

Stevik's picture

Please do upload it i would like to try it out becoz am looking at the cheapest way to send SMS from my site and i stuck
thank you

did you remove your upload? i

habeotron's picture

did you remove your upload? i can see smskannel.conf testing module. can you upload it again? iam new to kannel

kannel test module

rgucci's picture

Here is the sms_kannel module I use for testing. It is mostly based on the existing sms_clickatell module.
Useful for testing, not for production use!

Just create a directory sms_kannel in smsframework/modules, copy the two files and rename to sms_kannel.info and sms_kannel.module.

Russell JVM Gutierrez
Manager, Hong Kong Projects
flippingNORMALS
Web | Social Media | Mobile

Russell JVM Gutierrez

kannel gateway development

rgucci's picture

Is there any further development on this?
I have been trying to develop a Kannel gateway, so far I can send and receive messages to a seperate Kannel service running on another box.

Send:
- uses GET method to send an sms (i.e. http://localhost:13013/cgi-bin/sendsms?username=kanneluser&password=foob...)

Receive
- sms service in kannel uses GET method to a drupal url (ie. http://example.com/sms/sms-kannel/from=xxxxxxx&message=yyyyyyyyyyy)

Would be happy to provide the code I have now. Any interest in including this in the framework?

Russell JVM Gutierrez
Manager, Hong Kong Projects
flippingNORMALS
Web | Social Media | Mobile

Russell JVM Gutierrez

Xuguang Long's picture

Hi, rgucci,

In your set up, do you still need a local GSM operator's SMSC to forward your SMS message to your HTTP server?

Cheers,

Xuguang from England

For my setup, I had a GSM

rgucci's picture

For my setup, I had a GSM phone connected to my kannel box via usb. Kannel acts as your SMS gateway (send/receive using HTTP). Kannel uses the GSM phone (with a SIM from your operator) -- this is just one simple config, I think kannel has more options on how to send or receive sms. For small loads, this should be sufficient (within an organization, for example).

Russell JVM Gutierrez

kannel gateway development

ycwjjjj's picture

Yes, I am so interested to have this framework. I will try to set up the kannel and get familiar the modules.
BTW, it is also cool if Kannel can be run in Window, hope sooner it can be.

You can run it in Windows

vekou's picture

Yes, you can run it in Windows! But of course, you'll need additional steps, since there is no official build for it. Since Kannel is opensource, you may download the source code, then compile it using Cygwin.

Easiest way, use virtualbox

rgucci's picture

Easiest way, use virtualbox to run an easy linux distro like Ubuntu in your windows machine.

Russell JVM Gutierrez

Kannel gateway development

shekhar_mittal's picture

Has there any development happened on this? I am very interested in this kind of integration for our website.

-Shekhar

Let's get this rolling

aspope's picture

Given that plenty of people are interested we should build a stable module for inclusion into the framework.

It looks like @rgucci has done quite a bit of work on this so his test module would be a good place to begin, if it's cool with him.

I don't know much about how Kannel works but the documentation suggests that it is pretty comprehensive software. I am assuming that everybody uses this with HTTP. Can anybody provide details about the following to aid development?

Cheers all,

Phase 1

Oschtan's picture

Why would the basis of the request, for example, Russia does not initially make a module with these fields: IP, port, login, password, number, sender, recipient, charset and coding
http://10.10.10.10:13013/cgi-bin/sendsms?username=user&password=password&from=89232222222&to=89132222222&text=Привет+мир!&charset=UTF-8&coding=2
Although Charset (Windows-1252 (default)/1251/UTF -8 and other) and coding (0-default, 1,2) are required to indicate if a message is typed not in Latin.
In reaching for sending reports "0: Accepted for delivery"

Group Status?

dboeger's picture

Has this topic died? I'm looking to integrate SMS notification into a drupal build using the SMS to update a google map layer with a status update. I'm hoping to find an initial solution that is open source like Kannel to start and test with. Is anyone still working on this, or can someone point me in the right direction? Russell are you still working on this?

Thanks for your help.

Building a module

aspope's picture

@dboeger,
If you want I can hack up a gateway module for you this weekend, but since I haven't used Kannel before it may only provide only basic send+receive functionality. @rgucci's post above has some example URLs that would be useful as a starting point, and another @aspope post in this thread has a link to the Kannel technical documon.

Of course, the best way to increase your PHP knowledge is to use it for a good project, so if you would like to have a go at making a gateway yourself then take a look at http://drupal.org/node/362258 (note that I will be updating this documentation very soon, to include new options, templates and gateway module code style). I'd be happy to help you along if you get stuck.

kannel module

rgucci's picture

I could have sworn I attached the module code as a text file sometime here.
That was used basically for proof of concept testing (but it did allow sending and recieving, and firing Drupal actions for received sms). I will have a look at my old files this weekend and repost whatever I can find here.

Russell JVM Gutierrez

kannel gateway

batje's picture

i got a working copy that is not publishable, i can send the unformatted code offlist, if someone pollishes it (over the weekend) you should be good to go on monday.

kannel module and gateway

dboeger's picture

aspope, rgucci, and batje,

Thank you very much, you guys are awesome. I'll take a look at the info you've provided and see what I can figure out. I'm sure I'll have some really dumb questions so please be patient. 8) Thanks again for all your help. If there's anything I can do to help support the group, please let me know.

Have any of you seen InStedd and their project Nuntium?

http://ndt.instedd.org/2010/08/make-your-sms-apps-scale.html

It looks interesting but not sure if it's applicable, maybe as I get a better understanding of the lay of the land I'll be able to better gauge if it could be a good fit.

Try this

aspope's picture

Anybody want to give this a try? http://moo0.net/tmp/sms_kannel.tgz

Created this by looking at previous posts from @rgucci and @Oschtan, and by researching http://www.kannel.org/download/1.4.3/userguide-1.4.3/userguide.html#AEN4322

Disclaimer: Not properly tested!
I have made sure that there are no PHP fatals and checked the outgoing HTTP queries against a dummy web server, but I do not currently have time to set up a Kannel gateway, so for all intents and purposes it is untested. If someone can test with their Kannel setup, fix any problems and send the final code back to me then I'll make sure that it is published to the release.

Thanks all,

Customizable gateway

aspope's picture

Try this one too: http://moo0.net/tmp/sms_simplegateway.tgz

This is a gateway module that allows you to customize the URLs and field names for an HTTP gateway using the admin form. It supports sending and receiving messages.

tested one

batje's picture

As said, i have one. I cleaned it. This one we have been using in production for a while now. It supports both in and outbound SMS.

attached to http://drupal.org/node/751110#comment-3332286

Hi Sir

kim.alma's picture
   I just wan't to ask you if it is possible to send sms  using command line in terminal.. I'm done using http to send message but

my industry professor want me to send sms without accessing http or the browser.. thanks sir ..hope you can help me.. I'm using nokia communicator as gsm and I'm running my server in virtual box centos.

PyGSM or RapidSMS

frazras's picture

Try using something like PyGSM or RapidSMS

Kannel Module is available?

drupalnesia's picture

What is the status of Kannel module?
Do we need to create a Kannel module?

I have succesfully implemented Kannel on Drupal, I use CCK to create Kannel form to send message. Let's me know what do you expect.

Welcome

Mobile

Group organizers

Group categories

Mobile

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week