Hello Guys, I am observing a very strange behavior of kannel. When it is receiving DLRs its not reversing the source and destination.
Is it like that only, because smpp v3.4 says we suppose to reverse it. Please help me out to fix this issue. Is it some configuration glitch or kannel don't follow smpp v3.4. *Please find access logs as* 2019-07-05 18:41:52 *Sent SMS* [SMSC:BQRDLR] [SVC:cc] [ACT:] [BINF:] [FID:1329246017] [META:?smpp_resp?] [*from:5577777*] [*to:55219918072*] [flags:-1:0:-1:0:19] [msg:12:Hello 177747] [udh:0:] 2019-07-05 18:43:44 *Receive DLR* [SMSC:BQRDLR] [SVC:cc] [ACT:test] [BINF:] [FID:1329246017] [META:?smpp?dlr_err=%03%00%00&] [*from:5577777*] [ *to:55219918072*] [flags:-1:-1:-1:-1:1] [msg:140:id:4f3aaf41-92b1-44de-9677-b534d923f982 sub:001 dlvrd:001 submit date:1907051641 done date:1907051643 stat:DELIVRD err:000 text:Hello 3H3170] [udh:0:] *opensmppbox.log* 2019-07-05 16:43:42 [2748] [1] DEBUG: DLR[mysql]: Looking for DLR smsc=smpp, ts=c394e4c2-4376-41d5-a504-b8101ee52960, dst=+55219918072, type=1 2019-07-05 16:43:42 [2748] [1] DEBUG: sql: SELECT `mask`, `service`, `url`, `source`, `destination`, `boxc` FROM `dlr` WHERE `smsc`=? AND `ts`=? LIMIT 1 2019-07-05 16:43:42 [2748] [1] DEBUG: column=mask buffer_type=3 max_length=0 length=10 2019-07-05 16:43:42 [2748] [1] DEBUG: column=service buffer_type=253 max_length=0 length=40 2019-07-05 16:43:42 [2748] [1] DEBUG: column=url buffer_type=253 max_length=0 length=255 2019-07-05 16:43:42 [2748] [1] DEBUG: column=source buffer_type=253 max_length=0 length=40 2019-07-05 16:43:42 [2748] [1] DEBUG: column=destination buffer_type=253 max_length=0 length=40 2019-07-05 16:43:42 [2748] [1] DEBUG: column=boxc buffer_type=253 max_length=0 length=40 2019-07-05 16:43:42 [2748] [1] DEBUG: DLR[mysql]: created DLR message for URL <c394e4c2-4376-41d5-a504-b8101ee52960> 2019-07-05 16:43:42 [2748] [1] DEBUG: removing DLR from database 2019-07-05 16:43:42 [2748] [1] DEBUG: sql: DELETE FROM `dlr` WHERE `smsc`=? AND `ts`=? LIMIT 1 2019-07-05 16:43:42 [2748] [1] DEBUG: SMPP[smpp]: Sending PDU: 2019-07-05 16:43:42 [2748] [1] DEBUG: SMPP PDU 0x7f6a6400b2b0 dump: 2019-07-05 16:43:42 [2748] [1] DEBUG: type_name: deliver_sm 2019-07-05 16:43:42 [2748] [1] DEBUG: command_id: 5 = 0x00000005 2019-07-05 16:43:42 [2748] [1] DEBUG: command_status: 0 = 0x00000000 2019-07-05 16:43:42 [2748] [1] DEBUG: sequence_number: 1 = 0x00000001 2019-07-05 16:43:42 [2748] [1] DEBUG: service_type: NULL 2019-07-05 16:43:42 [2748] [1] DEBUG: source_addr_ton: 2 = 0x00000002 2019-07-05 16:43:42 [2748] [1] DEBUG: source_addr_npi: 1 = 0x00000001 2019-07-05 16:43:42 [2748] [1] DEBUG: source_addr: "5577777" 2019-07-05 16:43:42 [2748] [1] DEBUG: dest_addr_ton: 1 = 0x00000001 2019-07-05 16:43:42 [2748] [1] DEBUG: dest_addr_npi: 1 = 0x00000001 2019-07-05 16:43:42 [2748] [1] DEBUG: destination_addr: "55219918072" 2019-07-05 16:43:42 [2748] [1] DEBUG: esm_class: 4 = 0x00000004 2019-07-05 16:43:42 [2748] [1] DEBUG: protocol_id: 0 = 0x00000000 2019-07-05 16:43:42 [2748] [1] DEBUG: priority_flag: 0 = 0x00000000 2019-07-05 16:43:42 [2748] [1] DEBUG: schedule_delivery_time: NULL 2019-07-05 16:43:42 [2748] [1] DEBUG: validity_period: NULL 2019-07-05 16:43:42 [2748] [1] DEBUG: registered_delivery: 0 = 0x00000000 2019-07-05 16:43:42 [2748] [1] DEBUG: replace_if_present_flag: 0 = 0x00000000 2019-07-05 16:43:42 [2748] [1] DEBUG: data_coding: 0 = 0x00000000 2019-07-05 16:43:42 [2748] [1] DEBUG: sm_default_msg_id: 0 = 0x00000000 2019-07-05 16:43:42 [2748] [1] DEBUG: sm_length: 0 = 0x00000000 2019-07-05 16:43:42 [2748] [1] DEBUG: short_message: 2019-07-05 16:43:42 [2748] [1] DEBUG: Octet string at 0x7f6a6400b000: 2019-07-05 16:43:42 [2748] [1] DEBUG: len: 140 2019-07-05 16:43:42 [2748] [1] DEBUG: size: 1024 2019-07-05 16:43:42 [2748] [1] DEBUG: immutable: 0 2019-07-05 16:43:42 [2748] [1] DEBUG: data: 69 64 3a 63 33 39 34 65 34 63 32 2d 34 33 37 36 id:c394e4c2-4376 2019-07-05 16:43:42 [2748] [1] DEBUG: data: 2d 34 31 64 35 2d 61 35 30 34 2d 62 38 31 30 31 -41d5-a504-b8101 2019-07-05 16:43:42 [2748] [1] DEBUG: data: 65 65 35 32 39 36 30 20 73 75 62 3a 30 30 31 20 ee52960 sub:001 2019-07-05 16:43:42 [2748] [1] DEBUG: data: 64 6c 76 72 64 3a 30 30 31 20 73 75 62 6d 69 74 dlvrd:001 submit 2019-07-05 16:43:42 [2748] [1] DEBUG: data: 20 64 61 74 65 3a 31 39 30 37 30 35 31 36 34 31 date:1907051641 2019-07-05 16:43:42 [2748] [1] DEBUG: data: 20 64 6f 6e 65 20 64 61 74 65 3a 31 39 30 37 30 done date:19070 2019-07-05 16:43:42 [2748] [1] DEBUG: data: 35 31 36 34 33 20 73 74 61 74 3a 44 45 4c 49 56 51643 stat:DELIV 2019-07-05 16:43:42 [2748] [1] DEBUG: data: 52 44 20 65 72 72 3a 30 30 30 20 74 65 78 74 3a RD err:000 text: 2019-07-05 16:43:42 [2748] [1] DEBUG: data: 48 65 6c 6c 6f 20 33 48 33 31 37 30 Hello 3H3170 2019-07-05 16:43:42 [2748] [1] DEBUG: Octet string dump ends. 2019-07-05 16:43:42 [2748] [1] DEBUG: message_state: 2 = 0x00000002 2019-07-05 16:43:42 [2748] [1] DEBUG: receipted_message_id: 2019-07-05 16:43:42 [2748] [1] DEBUG: Octet string at 0x7f6a6400c4e0: 2019-07-05 16:43:42 [2748] [1] DEBUG: len: 36 2019-07-05 16:43:42 [2748] [1] DEBUG: size: 37 2019-07-05 16:43:42 [2748] [1] DEBUG: immutable: 0 2019-07-05 16:43:42 [2748] [1] DEBUG: data: 63 33 39 34 65 34 63 32 2d 34 33 37 36 2d 34 31 c394e4c2-4376-41 2019-07-05 16:43:42 [2748] [1] DEBUG: data: 64 35 2d 61 35 30 34 2d 62 38 31 30 31 65 65 35 d5-a504-b8101ee5 2019-07-05 16:43:42 [2748] [1] DEBUG: data: 32 39 36 30 2960 2019-07-05 16:43:42 [2748] [1] DEBUG: Octet string dump ends. 2019-07-05 16:43:42 [2748] [1] DEBUG: SMPP PDU dump ends. Regards, Amritesh