Hints
Gaby Vanhegan <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <B9BF494F.2B37%[email protected]> |
I'm going to attempt to write some sort of hack to make Kannel store incoming SMS messages from any given SMSC into a database for the purposes of logging and better analysis. So far I've thought that this is the best way forward: 1. Create mysql.c and mysql.h files that provide functions for storage of inbound or outbound SMS messages in a database. Having looked at the code I'm thinking of copying the MySQL stuff from gw/dlr.c 2. Insert these functions somewhere into the files that handle logging of inbound SMS messages and call them underneath the functions that print to the log files (presumably there are pointers in gwlib/log.c that would explain this, although these look too generic for me) 3. Generate a diff and send it in to you guys. There are only a small number of issues that I can't solve (I'm not a C programmer but I learn fast): - How do I handle a persistent database connection? I don't want to open and close the connection for every message that comes in as this would scale very badly on large systems. How is this handled in the DLR MySQL logging? Ideally I'd like the connection opened when the daemon starts and closed when it stops. - Which daemon should handle this? Would this be part of bearerbox, smsbox or some sub-part of it? I suspect the bearerbox as this is handling the incoming messages. - I'd prefer to build the code against 1.2.0 release. Would I be better off using the CVS version? Gaby -- Gaby Vanhegan, Web Developer [email protected] ---------------------------------------------------------- MediaWorks Telephone +44(0)113 234 5600 Fax +44(0)113 234 5601 http://www.mediaworksccl.com/ This e-mail contains information that is confidential and may be Legally privileged. If this e-mail has been addressed to you in error and you are not the person intended or authorized to receive it or a copy of it, please notify the sender as soon as possible.