Rails Kitchen

It's a place to write on stuff I learned recently.

Configuring MySQL DLR Storage

| Comments

To support mysql, we have to recompile kannel with –mysql
1
./configure --prefix=/usr/local/kannel --with-mysql
To store DLR information into a MySQL database you may 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 that are used to the DLR attributes and a mysql-connection group that defines the connection to the MySQL server itself.
Here is the example configuration
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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

1
2
3
4
5
6
7
8
9
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))

Comments