Index: doc/userguide/userguide.xml =================================================================== RCS file: /home/cvs/gateway/doc/userguide/userguide.xml,v retrieving revision 1.344 diff -a -u -r1.344 userguide.xml --- doc/userguide/userguide.xml 14 Jan 2009 11:11:46 -0000 1.344 +++ doc/userguide/userguide.xml 29 Jan 2009 21:45:58 -0000 @@ -1371,15 +1371,17 @@ crash, but theoretically some messages can duplicate when system is taken down violently. This variable defines a type of backend used for store - subsystem. Now two types are supported: + subsystem. Now three types are supported: a) file: writes store into one single file b) spool: writes store into spool directory (one file for each message) + c) mysql: writes store into a mysql table (one row per message) store-location filename Depends on store-type option used, it is ether file or spool directory. + Ignored on if store-type is mysql. store-dump-freq @@ -4852,8 +4854,8 @@ - -MySQL connection configuration + +MySQL connection configuration For several reasons external storage may be required to handle dynamical issues, i.e. DLRs, sms-service, sendsms-user, @@ -5200,7 +5202,100 @@ + +DB-Based Storage + Kannel uses a store subsystem to store messages on hard disk until they are successfully handled. This way, + no SMS messages are lost after a crash. The store subsystem can use a file, a spool directory or a database to store + messages. + + The file and spool-based subsystems are easily configured by providing the full path to the file or spool dir. + However, when using a DB-Based storage you need to configure a couple of things: a) A connection pool to a supported DB + (currently only MySQL) and b) A store configuration to tell kannel where to store the data. + + In order to use DB-based Storage, you need to specify store-type = <db-type> + (right, now, only 'mysql') + + + DB Connection Configuration + We need to use a DB connection pool to a DB (currently only MySQL is supported for the store). + A sample 'mysql-connection' configuration: + +group = mysql-connection +id = mypool +host = localhost +username = foo +password = bar +database = somedb +max-connections = 1 + + + See for further details. + + + + DB Store configuration + This section defines the table and column names used to store the messages. + + DLR Database Field Configuration Group Variables + + + + Variable + Value + Description + + + + group + store-db + + This is a mandatory variable + + + id (m) + string + + An id to identify which external connection should be used for + DB storage. Any string is acceptable, but semicolon ';' may cause + problems, so avoid it and any other special non-alphabet characters. + + + table (m) + string + + The name of the table that is used to store the messages. + + field-uuid (m) + string + + The table field that is used to store the messages unique identifiers (uuid's). This field + should be the table's PRIMARY KEY to improve performance. + + + field-message (m) + string + + The table field that is used to store the messages. + + + + +
+ A sample 'store-db' configuration + +group = store-db +id = mypool +table = store +field-uuid = uuid +field-message = message + + + Beware that all variables in this group are mandatory, so you + have to specify all fields to enable bearerbox to know how to store + and retrieve the messages from the DB. +
+
SMSBox configuration