Published on
1 min read

Configuring MySQL DLR storage

Authors

To support MySQL, we need to recompile Kannel with --mysql:

./configure --prefix=/usr/local/kannel --with-mysql

To store DLR information in a MySQL database, you can use the dlr-storage = mysql configuration directive in the core group. In addition to that, you must have a dlr-db group defined that specifies the table field names used for the DLR attributes, and a mysql-connection group that defines the connection to the MySQL server itself.

Here is the example configuration:

group = core
dlr-storage = mysql

group = mysql-connection
id = mydlr
host = localhost
username = foo
password = bar
database = dlr
max-connections = 1

group = dlr-db
id = mydlr
table = dlr
field-smsc = smsc
field-timestamp = ts
field-destination = destination
field-source = source
field-service = service
field-url = url
field-mask = mask
field-status = status
field-boxc-id = boxc

Create table dlr:

CREATE TABLE dlr (
  smsc varchar(40),
  ts varchar(40),
  destination varchar(40),
  source varchar(40),
  service varchar(40),
  url varchar(255),
  mask int(10),
  status int(10),
  boxc varchar(40)
);
TwitterLinkedInHacker News