I was getting the same issue but now I'm getting the below error from the access-log
2021-04-27 23:testsender08:20 2021-04-27 23:08:20 DISCARDED SMS [SMSC:] [SVC:] [ACT:] [BINF:] [FID:18][from:testsender] [to:2378945612] [flags:-1:2:-1:-1:31] [msg:0:] [udh:0:] 2021-04-27 23:08:20 2021-04-27 23:08:20 Receive DLR [SMSC:] [SVC:] [ACT:] [BINF:] [FID:18][from:testsender] [to:2378945612] [flags:-1:-1:-1:-1:16] [msg:12:NACK/no SMSC] [udh:0:] 2021-04-27 23:09:21 2021-04-27 23:08:20 DISCARDED SMS [SMSC:smsc1] [SVC:] [ACT:] [BINF:] [FID:17][from:testsender] [to:2378945612] [flags:-1:2:-1:-1:31] [msg:0:] [udh:0:] 2021-04-27 23:09:21 2021-04-27 23:09:21 Receive DLR [SMSC:smsc1] [SVC:] [ACT:] [BINF:] [FID:17][from:testsender] [to:2378945612] [flags:-1:-1:-1:-1:16] [msg:21:NACK/Retries Exceeded] [udh:0:] Any idea about the discarded msgs? On Thu, Apr 29, 2021 at 10:26 PM Rene Kluwen <rene.klu...@chimit.nl> wrote: > Hi Martin, > > Looks like you got opensmppbox setup correctly for dlr. > Adding or omitting sqlbox won't make a difference, like you already saw > that > correctly. > > Could you list if there is any rows available in the dlr table in your > postgres database? > > Are the submit_sm's sent with registered_delivery set to 1? > > It could be a msg-id-type issue. I'm not even sure if that's implemented in > opensmppbox. > > == Rene > > > -----Oorspronkelijk bericht----- > Van: users <users-boun...@kannel.org> Namens Martin Caetano > Verzonden: donderdag 29 april 2021 21:01 > Aan: users@kannel.org > Onderwerp: OpenSMPPBox won't create DLR > > I've spent a significant amount of time around this issue. I've read the > complete Kannel guide, SO, Nabble and any other resource I could find yet I > couldn't find any solution or hint on why the DLR aren't being created. > > I believe what I'm trying to do is very straightforward: > > I'm connected using SMPP to OpenSMPPBox, using PostgreSQL and routing to a > SMPP SMSC like this: > > opensmppbox --> sqlbox -> bearerbox -> smsc > > I can send SMS with no problem to the other end and I can see the pdu > responses back in the logs. However, the DLRs aren't being created as they > are when I use HTTP with smsbox and dlr-mask/dlr-url params. > > It doesn't matter if I remove the sqlbox and use internal storage, the DLRs > are never being created (or at least never appear as created in the logs) > when connecting via smpp to opensmppbox. > > 2021-04-29 05:28:14 [35121] [6] DEBUG: SMPP[smsc1]: throughput (0.00,0.00) > 2021-04-29 05:28:14 [35121] [6] DEBUG: SMPP[smsc1]: Got PDU: > 2021-04-29 05:28:14 [35121] [6] DEBUG: SMPP PDU 0x7eff380010e0 dump: > 2021-04-29 05:28:14 [35121] [6] DEBUG: type_name: deliver_sm > 2021-04-29 05:28:14 [35121] [6] DEBUG: command_id: 5 = 0x00000005 > 2021-04-29 05:28:14 [35121] [6] DEBUG: command_status: 0 = 0x00000000 > 2021-04-29 05:28:14 [35121] [6] DEBUG: sequence_number: 31 = 0x0000001f > 2021-04-29 05:28:14 [35121] [6] DEBUG: service_type: NULL > 2021-04-29 05:28:14 [35121] [6] DEBUG: source_addr_ton: 0 = 0x00000000 > 2021-04-29 05:28:14 [35121] [6] DEBUG: source_addr_npi: 0 = 0x00000000 > 2021-04-29 05:28:14 [35121] [6] DEBUG: source_addr: "xxxxxxxxxx" > 2021-04-29 05:28:14 [35121] [6] DEBUG: dest_addr_ton: 5 = 0x00000005 > 2021-04-29 05:28:14 [35121] [6] DEBUG: dest_addr_npi: 0 = 0x00000000 > 2021-04-29 05:28:14 [35121] [6] DEBUG: destination_addr: "MySender" > 2021-04-29 05:28:14 [35121] [6] DEBUG: esm_class: 4 = 0x00000004 > 2021-04-29 05:28:14 [35121] [6] DEBUG: protocol_id: 8 = 0x00000008 > 2021-04-29 05:28:14 [35121] [6] DEBUG: priority_flag: 0 = 0x00000000 > 2021-04-29 05:28:14 [35121] [6] DEBUG: schedule_delivery_time: NULL > 2021-04-29 05:28:14 [35121] [6] DEBUG: validity_period: NULL > 2021-04-29 05:28:14 [35121] [6] DEBUG: registered_delivery: 0 = > 0x00000000 > 2021-04-29 05:28:14 [35121] [6] DEBUG: replace_if_present_flag: 0 = > 0x00000000 > 2021-04-29 05:28:14 [35121] [6] DEBUG: data_coding: 0 = 0x00000000 > 2021-04-29 05:28:14 [35121] [6] DEBUG: sm_default_msg_id: 0 = 0x00000000 > 2021-04-29 05:28:14 [35121] [6] DEBUG: sm_length: 105 = 0x00000069 > 2021-04-29 05:28:14 [35121] [6] DEBUG: short_message: > 2021-04-29 05:28:14 [35121] [6] DEBUG: Octet string at 0x7eff38001340: > 2021-04-29 05:28:14 [35121] [6] DEBUG: len: 105 > 2021-04-29 05:28:14 [35121] [6] DEBUG: size: 106 > 2021-04-29 05:28:14 [35121] [6] DEBUG: immutable: 0 > 2021-04-29 05:28:14 [35121] [6] DEBUG: data: 69 64 3a 37 32 36 34 37 > 33 > 33 37 20 73 75 62 3a id:72647337 sub: > 2021-04-29 05:28:14 [35121] [6] DEBUG: data: 30 20 64 6c 76 72 64 3a > 32 > 38 20 73 75 62 6d 69 0 dlvrd:28 submi > 2021-04-29 05:28:14 [35121] [6] DEBUG: data: 74 20 64 61 74 65 3a 32 > 31 > 30 34 32 39 30 32 32 t date:210429022 > 2021-04-29 05:28:14 [35121] [6] DEBUG: data: 38 20 64 6f 6e 65 20 64 > 61 > 74 65 3a 32 31 30 34 8 done date:2104 > 2021-04-29 05:28:14 [35121] [6] DEBUG: data: 32 39 30 32 32 38 20 73 > 74 > 61 74 3a 45 4e 52 4f 290228 stat:ENRO > 2021-04-29 05:28:14 [35121] [6] DEBUG: data: 55 54 45 20 65 72 72 3a > 30 > 20 54 65 78 74 3a 48 UTE err:0 Text:H > 2021-04-29 05:28:14 [35121] [6] DEBUG: data: 65 6c 6c 6f 20 54 65 78 > 74 > ello Text > 2021-04-29 05:28:14 [35121] [6] DEBUG: Octet string dump ends. > 2021-04-29 05:28:14 [35121] [6] DEBUG: SMPP PDU dump ends. > 2021-04-29 05:28:14 [35121] [6] DEBUG: SMPP[smsc1] handle_pdu, got DLR > 2021-04-29 05:28:14 [35121] [6] DEBUG: DLR[pgsql]: Looking for DLR > smsc=smsc1, ts=72647337, dst=xxxxxxxxxx, type=4 > 2021-04-29 05:28:14 [35121] [6] DEBUG: sql: SELECT "mask", "service", > "url", > "source", "destination", "boxc" FROM "dlr" WHERE "smsc"='smsc1' AND > "ts"='72647337' LIMIT 1; > 2021-04-29 05:28:14 [35121] [6] DEBUG: no rows found > 2021-04-29 05:28:14 [35121] [6] WARNING: DLR[pgsql]: DLR from SMSC<smsc1> > for DST<xxxxxxxxxx> not found. > 2021-04-29 05:28:14 [35121] [6] ERROR: SMPP[smsc1]: got DLR but could not > find message or was not interested in it id<72647337> dst<xxxxxxxxxx>, > type<4> > 2021-04-29 05:28:14 [35121] [6] DEBUG: SMPP[smsc1]: Sending PDU: > 2021-04-29 05:28:14 [35121] [6] DEBUG: SMPP PDU 0x7eff38001ec0 dump: > 2021-04-29 05:28:14 [35121] [6] DEBUG: type_name: deliver_sm_resp > 2021-04-29 05:28:14 [35121] [6] DEBUG: command_id: 2147483653 = > 0x80000005 > 2021-04-29 05:28:14 [35121] [6] DEBUG: command_status: 0 = 0x00000000 > 2021-04-29 05:28:14 [35121] [6] DEBUG: sequence_number: 31 = 0x0000001f > 2021-04-29 05:28:14 [35121] [6] DEBUG: message_id: NULL > 2021-04-29 05:28:14 [35121] [6] DEBUG: SMPP PDU dump ends. > > > Looking at the logs when using smsbox/HTTP I can see the DLR being created > right after the submit_sm_resp, which isn't the case using opensmppbox > which > causes the later select query fails as it doesn't find the record. > > I understand I can set the dlr-mask when using smsbox/HTTP but I haven't > found any way to do so in opensmppbox (unsure if it is even possible). > > I'm unsure if dlr-mask has to be set to get the DLRs somehow or I may be > missing something terrible wrong or maybe even obvious. > > My main use case if to allow customers to connect directly via SMPP while > we > can still keep track of what was delivery/failed by forwarding those DLRs > to > our external system for billing/reporting/processing/etc. > > Any help around this is greatly appreciated. > > Here are the configurations: > > I first tried compiling Kannel 1.4.5 (and installing opensmppbox and sqlbox > from its addons folder) and later also tried Kannel and the > opensmppbox/sqlbox directly from their current svn trunks. In both cases > the > same behavior happens. > > bearerbox /etc/kannel/kannel.conf > group = core > admin-port = 13000 > smsbox-port = 13001 > admin-password = bar > box-deny-ip = "*.*.*.*" > box-allow-ip = "127.0.0.1" > access-log = "/var/log/kannel/kannel.access.log" > dlr-storage = pgsql > > group = smsc > smsc = smpp > smsc-id = smsc1 > host = xxx.xxx.xxx.xxx > port = 7777 > smsc-username = smpp > smsc-password = smpp > system-type = > > group = smsbox > bearerbox-host = localhost > global-sender = Default > bearerbox-port = 13002 > > group = sendsms-user > username = tester > password = foobar > user-deny-ip = "" > user-allow-ip = "" > > group = sms-service > keyword = default > text = "You asked nothing and I did it!" > > group = pgsql-connection > id = mydlr > host = localhost > username = postgres > password = postgres > database = dlr > max-connections = 10 > > 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 > > > sqlbox /etc/kannel/sqlbox.conf > group = sqlbox > id = sqlbox-db > smsbox-id = sqlbox > bearerbox-host = localhost > bearerbox-port = 13001 > smsbox-port = 13002 > sql-log-table = sent_sms > sql-insert-table = send_sms > > group = pgsql-connection > id = sqlbox-db > host = localhost > username = postgres > password = postgres > database = dlr > max-connections = 10 > > > opensmppbox /etc/kannel/opensmppbox.conf group = core dlr-storage = pgsql > > # Proxy configuration > group = opensmppbox > opensmppbox-id = smsc1 > opensmppbox-port = 13003 > bearerbox-host = 127.0.0.1 > bearerbox-port = 13002 > log-file = /var/log/kannel/opensmppbox.log log-level = 0 our-system-id = > smsc use-systemid-as-smsboxid = true # Will send only to this route-to-smsc > = smsc1 # New accounts smpp-logins = > /etc/opensmppbox/clients/smpplogins.txt > > group = pgsql-connection > id = mydlr > host = localhost > username = postgres > password = postgres > database = dlr > max-connections = 10 > > 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 > > > /etc/kannel/smpplogins.txt > goodclient secret smsc1 *.*.*.* > > >