Proposal: a more powerful SQL DLR storage

Vincenzo Romano <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <CAHjZ2x5t8DOmnxBxUxQLhc6_GA3aGN_-SUyC_OQ-ztWrdgj-BA@mail.gmail.com>
Introduction
Kannel has the ability to store the SMS DLRs also in SQL tables.
The main aim for this is to provide for storage persistence against
system crashes.
For this reason a DB table is configured where kannel will insert
details for submitted SMSs.
Later, upon reaching the final status, those data will be searched and deleted.

Motivation
This feature can be made more powerful with little changes to the system.
Basically it's all about replacing the deletion with insertion at
every single status change.
This would create a "SMS status history" from which the user can
extract an amount of useful information that's otherwise lost.

Implementation
On the software side of the feature, the code in gw/dlr.c needs to be
changed in order to replace the calls to method dlr_remove with
dlr_insert (or even dlr_update ).
The underlying table needs to be supplemented at least with a "real"
timestamp column (automatically calculated at every insertion) in
order to retrieve either the latest status update or the initial
details thanks to the ORDER BY predicate in either ASCending or
DESCending direction.
The actual queries used in dlr_*.c should also be reviewed in order to
reflect thes changes, even if that can be avoided with intervention in
the SQL with VIEWs and TRIGGERs.

Note
I recently started a thread on this topic in the users mailing list.
It can be viewed here:
http://www.kannel.org/pipermail/users/2014-November/021632.html
And I have no idea on how the development organisation is done in Kannel.


Thanks for the patience. Any feedback will be welcomed.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.