Hi,
I'm using Kanel 1.3.1 as SMS gateway and trying to make it work with
MySQL DLRs.
I can not upgrade it due to the whole system structure, the server on
which its working
and the systems to which it connects. The server that works on it's
suse 9.3 with mysql 5.0.45
I had to hack the code a bit due to MySQL 5 list functions. I changed the
gwlib/list.h and gwlib/list.c definitions and all their apperiances
from list_ to gwlist_
(the convention that I saw in 1.4.x) and recompiled Kannel from source using:
./configure --enable-mysql --with-dlr=mysql
I can send and receve SMSs but when it comes to DLRs I've experienced a problem.
When bearerbox writes the DRL data to the database the box-id value
which is written in the database is "("
and bearer box gives error:
ERROR: Could not route message to smsbox id <(>, smsbox is gone!
Seems to me that there is an error in the parsing of the smsbox id.
Any ideas or patches to solve this issue?
The config file is:
group = core
admin-port = 4000
smsbox-port = 4001
admin-password = gwyadmin
status-password = gwyadmin
box-allow-ip = "*.*.*.*"
unified-prefix = ""
log-file = "/var/log/kannel/bearerbox.log"
log-level = 1
access-log = "/var/log/kannel/access.log"
store-file = "/var/log/kannel/kannel.store"
dlr-storage = mysql
group = smsc
smsc = smpp
host = xxx.xxx.xxx.xxx
smsc-id = smsc1
port = xxxxx
receive-port = xxxx
smsc-username = xxxxxxx
smsc-password = xxxxx
system-type ="VMA"
address-range = ""
source-addr-ton = 0
source-addr-npi = 0
dest-addr-ton = 0
dest-addr-npi = 1
interface-version = 34
enquire-link-interval = 15
reconnect-delay = 30
msg-id-type = 1
group = smsbox
bearerbox-host = localhost
sendsms-port = 4004
sendsms-chars = "0123456789 +-"
access-log = "/var/log/kannel/smsboxaccess.log"
mo-recode = 1
group = mysql-connection
id = mydlr
host = localhost
mysql-username = kannel
mysql-password = kannel
database = kannel_dlr
#parameters of the dlr storage database
group = dlr-db
id = mydlr
table = dlr
field-smsc = smsc
field-timestamp = timestamp
field-destination = destination
field-service = service
field-source = source
field-url = url
field-mask = mask
field-status = status
field-boxc-id = boxc_id
The mysql script for the drl table is:
CREATE TABLE dlr (
smsc VARCHAR(20) DEFAULT NULL,
timestamp VARCHAR(20) DEFAULT NULL,
destination VARCHAR(20) DEFAULT NULL,
service VARCHAR(20) DEFAULT NULL,
url VARCHAR(500) DEFAULT NULL,
mask VARCHAR(10) DEFAULT NULL,
status VARCHAR(20) DEFAULT NULL,
boxc_id VARCHAR(1) DEFAULT NULL,
source VARCHAR(20) DEFAULT NULL)TYPE=MyISAM;
Any help would be appreciated.
BR, Jovan