Hi,
Mysql looks fine. Your problem doesn't seem to be that "mysql doesn't
store", but rather that mysql doesn't match. Please read User's guide why in
message-type. If that doesn't solve your problem. please repost, this time
including also submit & submit_resp PDUs in your logs.
BR,
Nikos
----- Original Message -----
From: "Barry Murphy" <[email protected]>
To: <[email protected]>
Sent: Sunday, May 23, 2010 9:33 AM
Subject: MySQL not storing
Hi,
I've setup Kannel to use mysql for storage, see setup below. When I check
the status page it shows no errors and that mysql is being used for DLR,
select queries seem fine, but when sending a message from smsbox it doesnt
appear to add an entry to DLR, see debug info below:
#### CONFIG ####
group = core
dlr-storage = mysql
group = mysql-connection
id = mydlr
host = 10.10.1.1
username = user
password = pass
database = smsc
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
#### DEBUG ####
2010-05-23 06:25:17 [4017] [6] DEBUG: SMPP PDU 0x819dc78 dump:
2010-05-23 06:25:17 [4017] [6] DEBUG: type_name: deliver_sm
2010-05-23 06:25:17 [4017] [6] DEBUG: command_id: 5 = 0x00000005
2010-05-23 06:25:17 [4017] [6] DEBUG: command_status: 0 = 0x00000000
2010-05-23 06:25:17 [4017] [6] DEBUG: sequence_number: 124 = 0x0000007c
2010-05-23 06:25:17 [4017] [6] DEBUG: service_type: NULL
2010-05-23 06:25:17 [4017] [6] DEBUG: source_addr_ton: 1 = 0x00000001
2010-05-23 06:25:17 [4017] [6] DEBUG: source_addr_npi: 1 = 0x00000001
2010-05-23 06:25:17 [4017] [6] DEBUG: source_addr: "64274909123"
2010-05-23 06:25:17 [4017] [6] DEBUG: dest_addr_ton: 1 = 0x00000001
2010-05-23 06:25:17 [4017] [6] DEBUG: dest_addr_npi: 1 = 0x00000001
2010-05-23 06:25:17 [4017] [6] DEBUG: destination_addr: "621234567"
2010-05-23 06:25:17 [4017] [6] DEBUG: esm_class: 4 = 0x00000004
2010-05-23 06:25:17 [4017] [6] DEBUG: protocol_id: 0 = 0x00000000
2010-05-23 06:25:17 [4017] [6] DEBUG: priority_flag: 0 = 0x00000000
2010-05-23 06:25:17 [4017] [6] DEBUG: schedule_delivery_time: NULL
2010-05-23 06:25:17 [4017] [6] DEBUG: validity_period: NULL
2010-05-23 06:25:17 [4017] [6] DEBUG: registered_delivery: 1 =
0x00000001
2010-05-23 06:25:17 [4017] [6] DEBUG: replace_if_present_flag: 0 =
0x00000000
2010-05-23 06:25:17 [4017] [6] DEBUG: data_coding: 0 = 0x00000000
2010-05-23 06:25:17 [4017] [6] DEBUG: sm_default_msg_id: 0 = 0x00000000
2010-05-23 06:25:17 [4017] [6] DEBUG: sm_length: 109 = 0x0000006d
2010-05-23 06:25:17 [4017] [6] DEBUG: short_message:
2010-05-23 06:25:17 [4017] [6] DEBUG: Octet string at 0x819e8b0:
2010-05-23 06:25:17 [4017] [6] DEBUG: len: 109
2010-05-23 06:25:17 [4017] [6] DEBUG: size: 110
2010-05-23 06:25:17 [4017] [6] DEBUG: immutable: 0
2010-05-23 06:25:17 [4017] [6] DEBUG: data: 20 69 64 3a 32 31 35 33
32 30 32 32 20 20 73 75 id:21532022 su
2010-05-23 06:25:17 [4017] [6] DEBUG: data: 62 3a 30 30 31 20 64 6c
76 72 64 3a 30 30 31 20 b:001 dlvrd:001
2010-05-23 06:25:17 [4017] [6] DEBUG: data: 73 75 62 6d 69 74 20 64
61 74 65 3a 31 30 30 35 submit date:1005
2010-05-23 06:25:17 [4017] [6] DEBUG: data: 32 33 30 38 32 35 20 64
6f 6e 65 20 64 61 74 65 230825 done date
2010-05-23 06:25:17 [4017] [6] DEBUG: data: 3a 31 30 30 35 32 33 30
38 32 35 20 73 74 61 74 :1005230825 stat
2010-05-23 06:25:17 [4017] [6] DEBUG: data: 3a 44 45 4c 49 56 52 44
20 65 72 72 3a 30 30 30 :DELIVRD err:000
2010-05-23 06:25:17 [4017] [6] DEBUG: data: 20 74 65 78 74 3a 20 33
35 46 30 32 30 text: 35F020
2010-05-23 06:25:17 [4017] [6] DEBUG: Octet string dump ends.
2010-05-23 06:25:17 [4017] [6] DEBUG: receipted_message_id: "21532022"
2010-05-23 06:25:17 [4017] [6] DEBUG: SMPP PDU dump ends.
2010-05-23 06:25:17 [4017] [6] DEBUG: SMPP[internal] handle_pdu, got DLR
2010-05-23 06:25:17 [4017] [6] WARNING: SMPP[internal]: Got DLR with
unknown 'message_state' (-1).
2010-05-23 06:25:17 [4017] [6] DEBUG: DLR[mysql]: Looking for DLR
smsc=internal, ts=21532022, dst=64274909123, type=2
2010-05-23 06:25:17 [4017] [6] DEBUG: sql: SELECT mask, service, url,
source, destination, boxc FROM dlr WHERE smsc='internal' AND
ts='21532022';
2010-05-23 06:25:17 [4017] [6] DEBUG: no rows found
2010-05-23 06:25:17 [4017] [6] WARNING: DLR[mysql]: DLR from
SMSC<internal> for DST<64274909123> not found.
2010-05-23 06:25:17 [4017] [6] ERROR: SMPP[internal]: got DLR but could
not find message or was not interested in it id<21532022>
dst<64274909123>,
type<2>
2010-05-23 06:25:17 [4017] [6] DEBUG: SMPP[internal]: Sending PDU:
2010-05-23 06:25:17 [4017] [6] DEBUG: SMPP PDU 0x819b848 dump:
2010-05-23 06:25:17 [4017] [6] DEBUG: type_name: deliver_sm_resp
2010-05-23 06:25:17 [4017] [6] DEBUG: command_id: 2147483653 =
0x80000005
2010-05-23 06:25:17 [4017] [6] DEBUG: command_status: 0 = 0x00000000
2010-05-23 06:25:17 [4017] [6] DEBUG: sequence_number: 124 = 0x0000007c
2010-05-23 06:25:17 [4017] [6] DEBUG: message_id: NULL
2010-05-23 06:25:17 [4017] [6] DEBUG: SMPP PDU dump ends.
2010-05-23 06:25:34 [4017] [0] WARNING: Killing signal or HTTP admin
command received, shutting down...
2010-05-23 06:25:34 [4017] [0] DEBUG: Shutting down Kannel...
2010-05-23 06:25:34 [4017] [0] DEBUG: shutting down smsc
2010-05-23 06:25:34 [4017] [0] DEBUG: Shutting down SMSCConn
SMPP:1.2.3.4:7901/7901:userid:VMA (slow)
2010-05-23 06:25:34 [4017] [6] DEBUG: SMPP[internal]: Sending unbind:
2010-05-23 06:25:34 [4017] [6] DEBUG: SMPP PDU 0x819dc78 dump:
2010-05-23 06:25:34 [4017] [6] DEBUG: type_name: unbind
2010-05-23 06:25:34 [4017] [6] DEBUG: command_id: 6 = 0x00000006
2010-05-23 06:25:34 [4017] [6] DEBUG: command_status: 0 = 0x00000000
2010-05-23 06:25:34 [4017] [6] DEBUG: sequence_number: 4 = 0x00000004
2010-05-23 06:25:34 [4017] [6] DEBUG: SMPP PDU dump ends.
2010-05-23 06:25:34 [4017] [6] DEBUG: SMPP[internal]: Got PDU:
2010-05-23 06:25:34 [4017] [6] DEBUG: SMPP PDU 0x819dc78 dump:
2010-05-23 06:25:34 [4017] [6] DEBUG: type_name: unbind_resp
2010-05-23 06:25:34 [4017] [6] DEBUG: command_id: 2147483654 =
0x80000006
2010-05-23 06:25:34 [4017] [6] DEBUG: command_status: 0 = 0x00000000
2010-05-23 06:25:34 [4017] [6] DEBUG: sequence_number: 4 = 0x00000004
2010-05-23 06:25:34 [4017] [6] DEBUG: SMPP PDU dump ends.
2010-05-23 06:25:35 [4017] [6] DEBUG: SMPP[internal]: io_thread: break and
shutting down
Many thanks in advance
Barry