DB-Based Store for Kannel
This is a new version from my previous patch to add support for a DB based store.
Fundamental differences with the previous version:
1. The DB table is now created automatically at startup (if it didn’t exist).
2. Cleaned up code aiming at supporting other DB engines apart from MySQL.
3. Added documentation.
Please download the patches here:
Again, this is far from stable. It needs further testing and confirmation before rolling up into production.
Regards,
Alex
Hi Alex,
I have compiled and installed the code with no errors. The SMS record seems to insert into the “store” table but is then automatically deleted straight afterwards. Any ideas? In the debug I can see the following:
2010-04-26 10:12:59 [21939] [13] DEBUG: sql: INSERT INTO store (uuid, message) VALUES (‘a6e20ca1-2eed-49a7-981d-6d5d71d6863d’, ‘AAAAAgAAAAUxMzAxMwAAAAw1ODgwMjQxMTMwMTP/////AAAAFE5vIHNlcnZpY2Ugc3BlY2lmaWVk
2010-04-26 10:12:59 [21939] [6] DEBUG: sql: DELETE FROM store WHERE uuid = ‘a6e20ca1-2eed-49a7-981d-6d5d71d6863d’
BRgds
Alex P
Yes, that’s to be expected: The store’s purpose is to provide persistence in case of a server crash, so messages can be recovered after restarting the service. Messages are held on the store while they’re being processed and deleted afterwards, otherwise they’d be all resent after every service restart.
Regards,
Alex
Hi Alex,
I have kannel 1.4.3 Installed on CentOS 5.5 and work well but when want to install your patch kannel-store-db.patch with command “patch -p0 kannel-store-db.patch” no thing do
shell not do any thing what is error????
Alex what should i do to deposit messages sent by mobile users straight into mysql database.I have successfully compiled and started kannel with mysql support
You can do that by writing a small web application that receives the requests from smsbox and write it to the database, or you could use SqlBox, without having the extra http layer.
Dear Alex,
When i run make command i get the following error.
Please suggest. I am using kannel 1.4.3 on ubuntu.
libgw.a(bb_store.o): In function `store_init’:
/root/Desktop/all/gateway-1.4.3/gw/bb_store.c:95: undefined reference to `store_mysql_init’
collect2: ld returned 1 exit status
make: *** [gw/bearerbox] Error 1