Andreas Fink wrote:
>
> I think your whole approach is wrong. You should do this kind of
> thing in a separate application. You then can link this separate
> application to gwlib and use gwlib's HTTP library function to deliver
> your messages from the database on to kannel. This will make your
> code much more portable, you dont have to mess with all the internals
> of Msg * and your code works with multiple SMSC types.
Andreas is right here. We try to avoid muggling external APIs into
Kannel as much as possible. For some reasons it's necessary as
permanent storage backend, like DLRs.
But for batched SMS transmission out of a database you should use an
external component that queries your db and talks HTTP to Kannel's
interface in this way:
Kannel's HTTP SQL queries
HTTP interface <--------> Your application <------------->
RDBMS
(smsbox) (maybe PHP or Perl)
Stipe
-----------------------------------------
Ok, I understood and I have already started to develop an application that works as
you said.
But you see, my point is to build an application which is easy to maintain. In case
you use HTTP, you need to start bearerbox, smsbox plus external application that
querries the database. You see, there are at least 4 connections
SMSC < - > bearerbox
bearerbox < - > smsbox
smsbox < - > http server
http server < - > database
It is a greater probability that something goes wrong in this case (4 connections
may broke). My sollution is to use only 2 connections:
SMSC <-> bearerbox
bearerbox <-> database
-----
I started writing an application with your sollution and I have to solve one
problem:
I need to get the message id (gived by SMSC) to write it in the database. If I have
this id, then I can update the line corresponding to a message when a DLR arrives.
How can I get this id via smsbox (http) ?
And how can I write a DLR in a postgresql database?
Thank you
Felly