Hello,
I found that opensmppbox sent wrong delivery report to ESME: "DELIVRD err:27"
instead "EXPIRED err:27"
SMS flow : ESME(esme-1) -> OPENSMPPBOX -> KANNEL -> SMSC(smsc-1)
Can you please assist me.
From SMSC(smsc-1) kannel received correct status EXPIRED err:27
2020-02-18 14:36:46 [471] [8] DEBUG: SMPP[smsc-1]: Got PDU:
2020-02-18 14:36:46 [471] [8] DEBUG: SMPP PDU 0x7f61b00010b0 dump:
2020-02-18 14:36:46 [471] [8] DEBUG: type_name: deliver_sm
2020-02-18 14:36:46 [471] [8] DEBUG: command_id: 5 = 0x00000005
2020-02-18 14:36:46 [471] [8] DEBUG: command_status: 0 = 0x00000000
2020-02-18 14:36:46 [471] [8] DEBUG: sequence_number: 3333 = 0x00000d05
2020-02-18 14:36:46 [471] [8] DEBUG: service_type: NULL
2020-02-18 14:36:46 [471] [8] DEBUG: source_addr_ton: 1 = 0x00000001
2020-02-18 14:36:46 [471] [8] DEBUG: source_addr_npi: 1 = 0x00000001
2020-02-18 14:36:46 [471] [8] DEBUG: source_addr: "89542121253"
2020-02-18 14:36:46 [471] [8] DEBUG: dest_addr_ton: 1 = 0x00000001
2020-02-18 14:36:46 [471] [8] DEBUG: dest_addr_npi: 1 = 0x00000001
2020-02-18 14:36:46 [471] [8] DEBUG: destination_addr: "3809415487"
2020-02-18 14:36:46 [471] [8] DEBUG: esm_class: 4 = 0x00000004
2020-02-18 14:36:46 [471] [8] DEBUG: protocol_id: 0 = 0x00000000
2020-02-18 14:36:46 [471] [8] DEBUG: priority_flag: 0 = 0x00000000
2020-02-18 14:36:46 [471] [8] DEBUG: schedule_delivery_time: NULL
2020-02-18 14:36:46 [471] [8] DEBUG: validity_period: NULL
2020-02-18 14:36:46 [471] [8] DEBUG: registered_delivery: 0 = 0x00000000
2020-02-18 14:36:46 [471] [8] DEBUG: replace_if_present_flag: 0 = 0x00000000
2020-02-18 14:36:46 [471] [8] DEBUG: data_coding: 0 = 0x00000000
2020-02-18 14:36:46 [471] [8] DEBUG: sm_default_msg_id: 0 = 0x00000000
2020-02-18 14:36:46 [471] [8] DEBUG: sm_length: 109 = 0x0000006d
2020-02-18 14:36:46 [471] [8] DEBUG: short_message:
2020-02-18 14:36:46 [471] [8] DEBUG: Octet string at 0x7f61b00053b0:
2020-02-18 14:36:46 [471] [8] DEBUG: len: 109
2020-02-18 14:36:46 [471] [8] DEBUG: size: 110
2020-02-18 14:36:46 [471] [8] DEBUG: immutable: 0
2020-02-18 14:36:46 [471] [8] DEBUG: data: 69 64 3a 30 31 43 41 36 30 42
36 20 73 75 62 3a id:01CA60B6 sub:
2020-02-18 14:36:46 [471] [8] DEBUG: data: 30 30 31 20 64 6c 76 72 64 3a
30 30 30 20 73 75 001 dlvrd:000 su
2020-02-18 14:36:46 [471] [8] DEBUG: data: 62 6d 69 74 20 64 61 74 65 3a
32 30 30 32 31 38 bmit date:200218
2020-02-18 14:36:46 [471] [8] DEBUG: data: 31 34 33 36 34 36 20 64 6f 6e
65 20 64 61 74 65 143646 done date
2020-02-18 14:36:46 [471] [8] DEBUG: data: 3a 32 30 30 32 31 38 31 35 33
36 34 36 20 73 74 :200218153646 st
2020-02-18 14:36:46 [471] [8] DEBUG: data: 61 74 3a 45 58 50 49 52 45 44
20 65 72 72 3a 32 at:EXPIRED err:2
2020-02-18 14:36:46 [471] [8] DEBUG: data: 37 20 54 65 78 74 3a 72 65 70
6f 72 74 7 Text:report
2020-02-18 14:36:46 [471] [8] DEBUG: Octet string dump ends.
2020-02-18 14:36:46 [471] [8] DEBUG: message_state: 3 = 0x00000003
2020-02-18 14:36:46 [471] [8] DEBUG: receipted_message_id: "01CA60B6"
2020-02-18 14:36:46 [471] [8] DEBUG: SMPP PDU dump ends.
2020-02-18 14:36:46 [471] [8] DEBUG: SMPP[smsc-1] handle_pdu, got DLR
2020-02-18 14:36:46 [471] [8] DEBUG: DLR[mysql]: Looking for DLR smsc=smsc-1,
ts=01CA60B6, dst=89542121253, type=34
2020-02-18 14:36:46 [471] [8] DEBUG: sql: SELECT `mask`, `service`, `url`,
`source`, `destination`, `boxc` FROM `dlr` WHERE `smsc`=? AND `ts`=? LIMIT 1
2020-02-18 14:36:46 [471] [8] DEBUG: column=mask buffer_type=3 max_length=0
length=10
2020-02-18 14:36:46 [471] [8] DEBUG: column=service buffer_type=253
max_length=0 length=40
2020-02-18 14:36:46 [471] [8] DEBUG: column=url buffer_type=253 max_length=0
length=255
2020-02-18 14:36:46 [471] [8] DEBUG: column=source buffer_type=253 max_length=0
length=40
2020-02-18 14:36:46 [471] [8] DEBUG: column=destination buffer_type=253
max_length=0 length=40
2020-02-18 14:36:46 [471] [8] DEBUG: column=boxc buffer_type=253 max_length=0
length=40
2020-02-18 14:36:46 [471] [8] DEBUG: DLR[mysql]: created DLR message for URL
<b6271a66-4d04-43d0-9149-4ddc649f2ec7>
2020-02-18 14:36:46 [471] [8] DEBUG: removing DLR from database
2020-02-18 14:36:46 [471] [8] DEBUG: sql: DELETE FROM `dlr` WHERE `smsc`=? AND
`ts`=? LIMIT 1
2020-02-18 14:36:46 [471] [8] DEBUG: new group created `orig_msg'
2020-02-18 14:36:46 [471] [8] DEBUG: group=`orig_msg' key=`dlr_mask' value=`19'
2020-02-18 14:36:46 [471] [8] DEBUG: new group created `orig_msg'
2020-02-18 14:36:46 [471] [8] DEBUG: group=`orig_msg' key=`dlr_mask' value=`19'
2020-02-18 14:36:46 [471] [8] DEBUG: new group created `smpp'
2020-02-18 14:36:46 [471] [8] DEBUG: group=`smpp' key=`dlr_err' value=`'
2020-02-18 14:36:46 [471] [8] DEBUG: SMPP[smsc-1]: Sending PDU:
But to ESME opensmppbox sent incorrect DELIVRD err:27
2020-02-18 14:36:46 [4691] [3] INFO: We received an SMS message.
2020-02-18 14:36:46 [4691] [3] DEBUG: DLR[mysql]: Looking for DLR smsc=esme-1,
ts=b6271a66-4d04-43d0-9149-4ddc649f2ec7, dst=+89542121253, type=34
2020-02-18 14:36:46 [4691] [3] DEBUG: sql: SELECT `mask`, `service`, `url`,
`source`, `destination`, `boxc` FROM `dlr` WHERE `smsc`=? AND `ts`=? LIMIT 1
2020-02-18 14:36:46 [4691] [3] DEBUG: column=mask buffer_type=3 max_length=0
length=10
2020-02-18 14:36:46 [4691] [3] DEBUG: column=service buffer_type=253
max_length=0 length=40
2020-02-18 14:36:46 [4691] [3] DEBUG: column=url buffer_type=253 max_length=0
length=255
2020-02-18 14:36:46 [4691] [3] DEBUG: column=source buffer_type=253
max_length=0 length=40
2020-02-18 14:36:46 [4691] [3] DEBUG: column=destination buffer_type=253
max_length=0 length=40
2020-02-18 14:36:46 [4691] [3] DEBUG: column=boxc buffer_type=253 max_length=0
length=40
2020-02-18 14:36:46 [4691] [3] DEBUG: DLR[mysql]: created DLR message for URL
<b6271a66-4d04-43d0-9149-4ddc649f2ec7>
2020-02-18 14:36:46 [4691] [3] DEBUG: removing DLR from database
2020-02-18 14:36:46 [4691] [3] DEBUG: sql: DELETE FROM `dlr` WHERE `smsc`=? AND
`ts`=? LIMIT 1
2020-02-18 14:36:46 [4691] [3] DEBUG: new group created `orig_msg'
2020-02-18 14:36:46 [4691] [3] DEBUG: group=`orig_msg' key=`dlr_mask' value=`19'
2020-02-18 14:36:46 [4691] [3] DEBUG: new group created `smpp'
2020-02-18 14:36:46 [4691] [3] DEBUG: group=`smpp' key=`dlr_err' value=`'
2020-02-18 14:36:46 [4691] [3] DEBUG: SMPP[esme-1]: Sending PDU:
2020-02-18 14:36:46 [4691] [3] DEBUG: SMPP PDU 0x7f4640002e70 dump:
2020-02-18 14:36:46 [4691] [3] DEBUG: type_name: deliver_sm
2020-02-18 14:36:46 [4691] [3] DEBUG: command_id: 5 = 0x00000005
2020-02-18 14:36:46 [4691] [3] DEBUG: command_status: 0 = 0x00000000
2020-02-18 14:36:46 [4691] [3] DEBUG: sequence_number: 5 = 0x00000005
2020-02-18 14:36:46 [4691] [3] DEBUG: service_type: NULL
2020-02-18 14:36:46 [4691] [3] DEBUG: source_addr_ton: 2 = 0x00000002
2020-02-18 14:36:46 [4691] [3] DEBUG: source_addr_npi: 1 = 0x00000001
2020-02-18 14:36:46 [4691] [3] DEBUG: source_addr: "+3809415487"
2020-02-18 14:36:46 [4691] [3] DEBUG: dest_addr_ton: 1 = 0x00000001
2020-02-18 14:36:46 [4691] [3] DEBUG: dest_addr_npi: 1 = 0x00000001
2020-02-18 14:36:46 [4691] [3] DEBUG: destination_addr: "89542121253"
2020-02-18 14:36:46 [4691] [3] DEBUG: esm_class: 4 = 0x00000004
2020-02-18 14:36:46 [4691] [3] DEBUG: protocol_id: 0 = 0x00000000
2020-02-18 14:36:46 [4691] [3] DEBUG: priority_flag: 0 = 0x00000000
2020-02-18 14:36:46 [4691] [3] DEBUG: schedule_delivery_time: NULL
2020-02-18 14:36:46 [4691] [3] DEBUG: validity_period: NULL
2020-02-18 14:36:46 [4691] [3] DEBUG: registered_delivery: 0 = 0x00000000
2020-02-18 14:36:46 [4691] [3] DEBUG: replace_if_present_flag: 0 = 0x00000000
2020-02-18 14:36:46 [4691] [3] DEBUG: data_coding: 0 = 0x00000000
2020-02-18 14:36:46 [4691] [3] DEBUG: sm_default_msg_id: 0 = 0x00000000
2020-02-18 14:36:46 [4691] [3] DEBUG: sm_length: 0 = 0x00000000
2020-02-18 14:36:46 [4691] [3] DEBUG: short_message:
2020-02-18 14:36:46 [4691] [3] DEBUG: Octet string at 0x7f4648008980:
2020-02-18 14:36:46 [4691] [3] DEBUG: len: 140
2020-02-18 14:36:46 [4691] [3] DEBUG: size: 1024
2020-02-18 14:36:46 [4691] [3] DEBUG: immutable: 0
2020-02-18 14:36:46 [4691] [3] DEBUG: data: 69 64 3a 62 36 32 37 31 61 36
36 2d 34 64 30 34 id:b6271a66-4d04
2020-02-18 14:36:46 [4691] [3] DEBUG: data: 2d 34 33 64 30 2d 39 31 34 39
2d 34 64 64 63 36 -43d0-9149-4ddc6
2020-02-18 14:36:46 [4691] [3] DEBUG: data: 34 39 66 32 65 63 37 20 73 75
62 3a 30 30 31 20 49f2ec7 sub:001
2020-02-18 14:36:46 [4691] [3] DEBUG: data: 64 6c 76 72 64 3a 30 30 30 20
73 75 62 6d 69 74 dlvrd:000 submit
2020-02-18 14:36:46 [4691] [3] DEBUG: data: 20 64 61 74 65 3a 32 30 30 32
31 38 31 33 33 36 date:2002181336
2020-02-18 14:36:46 [4691] [3] DEBUG: data: 20 64 6f 6e 65 20 64 61 74 65
3a 32 30 30 32 31 done date:20021
2020-02-18 14:36:46 [4691] [3] DEBUG: data: 38 31 34 33 36 20 73 74 61 74
3a 44 45 4c 49 56 81436 stat:DELIV
2020-02-18 14:36:46 [4691] [3] DEBUG: data: 52 44 20 65 72 72 3a 32 37 20
20 74 65 78 74 3a RD err:27 text:
2020-02-18 14:36:46 [4691] [3] DEBUG: data: 20 54 65 78 74 3a 72 65 70 6f
72 74 Text:report
2020-02-18 14:36:46 [4691] [3] DEBUG: Octet string dump ends.
2020-02-18 14:36:46 [4691] [3] DEBUG: message_state: 7 = 0x00000007
2020-02-18 14:36:46 [4691] [3] DEBUG: receipted_message_id:
2020-02-18 14:36:46 [4691] [3] DEBUG: Octet string at 0x7f4648012570:
2020-02-18 14:36:46 [4691] [3] DEBUG: len: 36
2020-02-18 14:36:46 [4691] [3] DEBUG: size: 37
2020-02-18 14:36:46 [4691] [3] DEBUG: immutable: 0
2020-02-18 14:36:46 [4691] [3] DEBUG: data: 62 36 32 37 31 61 36 36 2d 34
64 30 34 2d 34 33 b6271a66-4d04-43
2020-02-18 14:36:46 [4691] [3] DEBUG: data: 64 30 2d 39 31 34 39 2d 34 64
64 63 36 34 39 66 d0-9149-4ddc649f
2020-02-18 14:36:46 [4691] [3] DEBUG: data: 32 65 63 37
2ec7
2020-02-18 14:36:46 [4691] [3] DEBUG: Octet string dump ends.
2020-02-18 14:36:46 [4691] [3] DEBUG: SMPP PDU dump ends.
2020-02-18 14:36:46 [4691] [3] ERROR: SMPP: Unknown TLV `dlr_err', don't send.
2020-02-18 14:36:46 [4691] [4] DEBUG: SMPP[esme-1]: Got PDU:
My config for opensmmpbox.conf
# sample opensmppbox.conf
include = "/etc/kannel/opensmppbox1.conf"
group = core
dlr-storage = mysql
group = opensmppbox
opensmppbox-id = mycompany
opensmppbox-port = 2799
bearerbox-host = localhost
bearerbox-port = 13005
log-level = 0
log-file = "/var/log/kannel/opensmppbox.log"
our-system-id = mycompany
route-to-smsc = smsc1
smpp-logins = "/etc/kannel/smpplogins.txt"
use-systemid-as-smsboxid = true
# the following is just standard dlr configuration
group = mysql-connection
id = dlr
host = localhost
username = kannel
password = kannelpass
database = kannel
group = dlr-db
id = dlr
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
BR,
Alexandr