Re: Proposal: a more powerful SQL DLR storage
Andreas Fink <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
the purpose of the persistent storage is for temporary usage as DLR's can refer to SMS which have been sent a couple of days ago. the DLR storage you want is what delivery reports are meant for and those are transmitted to the user requesting it In addition to that the access logs already contains this data. It would probably make more sense to offer a access log into SQL driver than to abuse the internal state cache mechanism. > Am 07.11.2014 um 10:34 schrieb Vincenzo Romano <[email protected]>: > > 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. > Andreas Fink CEO DataCell ehf CEO Backbone ehf --------------------------------------------------------------- Tel: +41-61-6666330 Fax: +41-61-6666331 Mobile: +41-79-2457333 Address: Clarastrasse 3, 4058 Basel, Switzerland E-Mail: [email protected] www.datacell.com, www.backbone.is, www.finkconsulting.com www.fink.org --------------------------------------------------------------- Jabber/XMPP: [email protected] ICQ: 8239353 Skype: andreasfink