# Configure kannel to get the data from database

**URL:** <https://www.ruby-forum.com/t/configure-kannel-to-get-the-data-from-database/155552>\
**Category:** Ruby\
**Created:** [December 13, 2008, 11:58am UTC](https://www.ruby-forum.com/t/configure-kannel-to-get-the-data-from-database/155552 "2008-12-13T11:58:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mailtorajuit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed8c4c/32.png) [@mailtorajuit](https://www.ruby-forum.com/u/mailtorajuit)\
**Post date:** [December 13, 2008, 11:58am UTC](https://www.ruby-forum.com/t/configure-kannel-to-get-the-data-from-database/155552/1 "2008-12-13T11:58:30Z")

</div>

hi everyone,  
My project is to send sms to mobile. iam new to rails. how to configure  
the kannel to push sms to gateway.  
is it better first keep the data into database and kannel has to fetch  
the records from database and send sms… or push the url to gateway bu  
using Net::push and store the data into database. If first is better  
option how to configure the kannel or how to push the data from the  
database to kannnel fromrails application.  
And in my application i have messages to be delivered at scheduled time.  
how can we do that . is it kannel job or we have to push it from  
applicaotion if to push from appliaction how do it.

please help me its very urgent.

---

<div class="post-metadata">

**Author:** ![mailtorajuit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed8c4c/32.png) [@mailtorajuit](https://www.ruby-forum.com/u/mailtorajuit)\
**Post date:** [December 13, 2008, 2:15pm UTC](https://www.ruby-forum.com/t/configure-kannel-to-get-the-data-from-database/155552/2 "2008-12-13T14:15:57Z")

</div>

Rajkumar S. pisze:

> hi everyone,  
> My project is to send sms to mobile. iam new to rails. how to configure  
> the kannel to push sms to gateway.

Generally you need a connection to the SMS gateway. You can connect  
directly to operator’s SMSC or to any SMS gateway like [clickatell.com](http://clickatell.com). I  
recommend using SMPP connection, but most providers allow you to use  
SMPP when you send at least dozens of thousands messages monthly.

> is it better first keep the data into database and kannel has to fetch  
> the records from database and send sms… or push the url to gateway bu  
> using Net::push and store the data into database. If first is better  
> option how to configure the kannel or how to push the data from the  
> database to kannnel fromrails application.  
> And in my application i have messages to be delivered at scheduled time.  
> how can we do that . is it kannel job or we have to push it from  
> applicaotion if to push from appliaction how do it.

The best option is to keep messages in your database and write your own  
standalone ruby daemon (also could be a script run periodically from  
cron), which would check if there are messages waiting to be sent in the  
DB. You can schedule messages for later delivery that way. A message can  
be delivered to kannel by HTTP GET (it is described in Kannel’s User  
Guide) using Ruby’s Net::HTTP.get
