RE: OpenSMPPBox won't create DLR
"Rene Kluwen" <[email protected]> Fri, 30 Apr 2021 08:20:49 +0200
| Newsgroups | gmane.comp.mobile.kannel.user,gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multipart message in MIME format. ------=_NextPart_000_0252_01D73D99.BB8F4BA0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Martin, =20 About Github: +1 from me, how about the main developer(s) in charge? =20 The force-dlr option is a good idea, but it=E2=80=99s better to = implement it in bearerbox, as in your use-case you always want it = =E2=80=93 not just for messages relayed via opensmppbox? I=E2=80=99m not sure if something like that already exists. =20 True, that -besides that- also it needs to be implemented in opensmppbox = to keep the dlr store. =20 =3D=3D Rene =20 Van: Martin Caetano <[email protected]>=20 Verzonden: vrijdag 30 april 2021 02:18 Aan: Rene Kluwen <[email protected]> CC: [email protected] Onderwerp: Re: OpenSMPPBox won't create DLR =20 =20 Are the submit_sm's sent with registered_delivery set to 1? =20 It wasn=E2=80=99t and that was the issue. Now it is creating the DLR and = storing them in the db. Thank you! =20 However, for our case this option is inconvenient as we plan to allow = customers to connect via SMPP and use DLR for tracking billing. If we = allow the customers to set dlr off we won=E2=80=99t be able to charge = them. =20 As a solution I manually edited the opensmppbox.c file and = =E2=80=9Cforced=E2=80=9D a dlr-mask setting and removed the = registered_delivery check:=20 =20 https://redmine.kannel.org/projects/smppbox/repository/entry/trunk/gw/ope= nsmppbox.c#L1254=20 =20 I believe it would be useful to enable this functionality (force-dlr) as = an option on the smppopenbox settings. =20 I=E2=80=99m happy to send it as a patch if it is considered worth of = adding to the project. =20 By the way, wouldn=E2=80=99t be better to migrate the kannel to Github = and ditch subversion? I guess it would encourage more collaboration and = make life easier for everybody. =20 Martin. On Apr 29, 2021, at 4:18 PM, Rene Kluwen <[email protected] = <mailto:[email protected]> > wrote: =20 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. =3D=3D Rene -----Oorspronkelijk bericht----- Van: users <[email protected] <mailto:[email protected]> > = Namens Martin Caetano Verzonden: donderdag 29 april 2021 21:01 Aan: [email protected] <mailto:[email protected]>=20 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.=20 I believe what I'm trying to do is very straightforward:=20 I'm connected using SMPP to OpenSMPPBox, using PostgreSQL and routing to = a SMPP SMSC like this:=20 opensmppbox --> sqlbox -> bearerbox -> smsc=20 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.=20 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.=20 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 =3D 0x00000005 2021-04-29 05:28:14 [35121] [6] DEBUG: command_status: 0 =3D = 0x00000000 2021-04-29 05:28:14 [35121] [6] DEBUG: sequence_number: 31 =3D = 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 =3D = 0x00000000 2021-04-29 05:28:14 [35121] [6] DEBUG: source_addr_npi: 0 =3D = 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 =3D 0x00000005 2021-04-29 05:28:14 [35121] [6] DEBUG: dest_addr_npi: 0 =3D 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 =3D 0x00000004 2021-04-29 05:28:14 [35121] [6] DEBUG: protocol_id: 8 =3D 0x00000008 2021-04-29 05:28:14 [35121] [6] DEBUG: priority_flag: 0 =3D 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 =3D = 0x00000000 2021-04-29 05:28:14 [35121] [6] DEBUG: replace_if_present_flag: 0 =3D 0x00000000 2021-04-29 05:28:14 [35121] [6] DEBUG: data_coding: 0 =3D 0x00000000 2021-04-29 05:28:14 [35121] [6] DEBUG: sm_default_msg_id: 0 =3D = 0x00000000 2021-04-29 05:28:14 [35121] [6] DEBUG: sm_length: 105 =3D 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=3Dsmsc1, ts=3D72647337, dst=3Dxxxxxxxxxx, type=3D4 2021-04-29 05:28:14 [35121] [6] DEBUG: sql: SELECT "mask", "service", = "url", "source", "destination", "boxc" FROM "dlr" WHERE "smsc"=3D'smsc1' AND "ts"=3D'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 =3D = 0x80000005 2021-04-29 05:28:14 [35121] [6] DEBUG: command_status: 0 =3D = 0x00000000 2021-04-29 05:28:14 [35121] [6] DEBUG: sequence_number: 31 =3D = 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.=20 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).=20 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.=20 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.=20 Any help around this is greatly appreciated.=20 Here are the configurations:=20 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.=20 bearerbox /etc/kannel/kannel.conf group =3D core admin-port =3D 13000 smsbox-port =3D 13001 admin-password =3D bar box-deny-ip =3D "*.*.*.*" box-allow-ip =3D "127.0.0.1" access-log =3D "/var/log/kannel/kannel.access.log" dlr-storage =3D pgsql group =3D smsc smsc =3D smpp smsc-id =3D smsc1 host =3D xxx.xxx.xxx.xxx port =3D 7777 smsc-username =3D smpp smsc-password =3D smpp system-type =3D=20 group =3D smsbox bearerbox-host =3D localhost global-sender =3D Default bearerbox-port =3D 13002 group =3D sendsms-user username =3D tester password =3D foobar user-deny-ip =3D "" user-allow-ip =3D "" group =3D sms-service keyword =3D default text =3D "You asked nothing and I did it!" group =3D pgsql-connection id =3D mydlr host =3D localhost username =3D postgres password =3D postgres database =3D dlr max-connections =3D 10 group =3D dlr-db id =3D mydlr table =3D dlr field-smsc =3D smsc field-timestamp =3D ts field-destination =3D destination field-source =3D source field-service =3D service field-url =3D url field-mask =3D mask field-status =3D status field-boxc-id =3D boxc sqlbox /etc/kannel/sqlbox.conf group =3D sqlbox id =3D sqlbox-db smsbox-id =3D sqlbox bearerbox-host =3D localhost bearerbox-port =3D 13001 smsbox-port =3D 13002 sql-log-table =3D sent_sms sql-insert-table =3D send_sms group =3D pgsql-connection id =3D sqlbox-db host =3D localhost username =3D postgres password =3D postgres database =3D dlr max-connections =3D 10 opensmppbox /etc/kannel/opensmppbox.conf group =3D core dlr-storage =3D = pgsql # Proxy configuration group =3D opensmppbox opensmppbox-id =3D smsc1 opensmppbox-port =3D 13003 bearerbox-host =3D 127.0.0.1 bearerbox-port =3D 13002 log-file =3D /var/log/kannel/opensmppbox.log log-level =3D 0 = our-system-id =3D smsc use-systemid-as-smsboxid =3D true # Will send only to this = route-to-smsc =3D smsc1 # New accounts smpp-logins =3D = /etc/opensmppbox/clients/smpplogins.txt group =3D pgsql-connection id =3D mydlr host =3D localhost username =3D postgres password =3D postgres database =3D dlr max-connections =3D 10 group =3D dlr-db id =3D mydlr table =3D dlr field-smsc =3D smsc field-timestamp =3D ts field-destination =3D destination field-source =3D source field-service =3D service field-url =3D url field-mask =3D mask field-status =3D status field-boxc-id =3D boxc /etc/kannel/smpplogins.txt goodclient secret smsc1 *.*.*.* =20 ------=_NextPart_000_0252_01D73D99.BB8F4BA0 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" = xmlns:o=3D"urn:schemas-microsoft-com:office:office" = xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:x=3D"urn:schemas-microsoft-com:office:excel" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" = xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta = http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8"><meta = name=3DGenerator content=3D"Microsoft Word 15 (filtered = medium)"><style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; font-size:11.0pt; font-family:"Calibri",sans-serif;} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} span.E-mailStijl18 {mso-style-type:personal-reply; font-family:"Calibri",sans-serif; color:windowtext;} .MsoChpDefault {mso-style-type:export-only; font-size:10.0pt;} @page WordSection1 {size:612.0pt 792.0pt; margin:70.85pt 70.85pt 70.85pt 70.85pt;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--></head><body lang=3DNL link=3Dblue = vlink=3Dpurple style=3D'word-wrap:break-word'><div = class=3DWordSection1><p class=3DMsoNormal><span = style=3D'mso-fareast-language:EN-US'>Hi Martin,<o:p></o:p></span></p><p = class=3DMsoNormal><span = style=3D'mso-fareast-language:EN-US'><o:p> </o:p></span></p><p = class=3DMsoNormal><span lang=3DEN-GB = style=3D'mso-fareast-language:EN-US'>About Github: +1 from me, how about = the main developer(s) in charge?<o:p></o:p></span></p><p = class=3DMsoNormal><span lang=3DEN-GB = style=3D'mso-fareast-language:EN-US'><o:p> </o:p></span></p><p = class=3DMsoNormal><span lang=3DEN-GB = style=3D'mso-fareast-language:EN-US'>The force-dlr option is a good = idea, but it=E2=80=99s better to implement it in bearerbox, as in your = use-case you always want it =E2=80=93 not just for messages relayed via = opensmppbox?<o:p></o:p></span></p><p class=3DMsoNormal><span = lang=3DEN-GB style=3D'mso-fareast-language:EN-US'>I=E2=80=99m not sure = if something like that already exists.<o:p></o:p></span></p><p = class=3DMsoNormal><span lang=3DEN-GB = style=3D'mso-fareast-language:EN-US'><o:p> </o:p></span></p><p = class=3DMsoNormal><span lang=3DEN-GB = style=3D'mso-fareast-language:EN-US'>True, that -besides that- also it = needs to be implemented in opensmppbox to keep the dlr = store.<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-GB = style=3D'mso-fareast-language:EN-US'><o:p> </o:p></span></p><p = class=3DMsoNormal><span lang=3DEN-GB = style=3D'mso-fareast-language:EN-US'>=3D=3D Rene<o:p></o:p></span></p><p = class=3DMsoNormal><span lang=3DEN-GB = style=3D'mso-fareast-language:EN-US'><o:p> </o:p></span></p><div><di= v style=3D'border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm = 0cm 0cm'><p class=3DMsoNormal><b>Van:</b> Martin Caetano = <[email protected]> <br><b>Verzonden:</b> vrijdag 30 april = 2021 02:18<br><b>Aan:</b> Rene Kluwen = <[email protected]><br><b>CC:</b> = [email protected]<br><b>Onderwerp:</b> Re: OpenSMPPBox won't create = DLR<o:p></o:p></p></div></div><p = class=3DMsoNormal><o:p> </o:p></p><p = class=3DMsoNormal><o:p> </o:p></p><div><blockquote = style=3D'margin-top:5.0pt;margin-bottom:5.0pt'><p class=3DMsoNormal>Are = the submit_sm's sent with registered_delivery set to = 1?<o:p></o:p></p></blockquote><div><p = class=3DMsoNormal><o:p> </o:p></p></div><p class=3DMsoNormal>It = wasn=E2=80=99t and that was the issue. Now it is creating the DLR and = storing them in the db. Thank you!<o:p></o:p></p></div><div><p = class=3DMsoNormal><o:p> </o:p></p></div><div><p = class=3DMsoNormal>However, for our case this option is inconvenient as = we plan to allow customers to connect via SMPP and use DLR for tracking = billing. If we allow the customers to set dlr off we won=E2=80=99t be = able to charge them.<o:p></o:p></p></div><div><p = class=3DMsoNormal><o:p> </o:p></p></div><div><p = class=3DMsoNormal>As a solution I manually edited the opensmppbox.c file = and =E2=80=9Cforced=E2=80=9D a dlr-mask setting and removed = the registered_delivery check: <o:p></o:p></p></div><div><p = class=3DMsoNormal><o:p> </o:p></p></div><div><p = class=3DMsoNormal><a = href=3D"https://redmine.kannel.org/projects/smppbox/repository/entry/trun= k/gw/opensmppbox.c#L1254">https://redmine.kannel.org/projects/smppbox/rep= ository/entry/trunk/gw/opensmppbox.c#L1254</a> <o:p></o:p></p></div>= <div><div><p class=3DMsoNormal><o:p> </o:p></p></div><div><p = class=3DMsoNormal>I believe it would be useful to enable this = functionality (force-dlr) as an option on the smppopenbox = settings.<o:p></o:p></p></div><div><p = class=3DMsoNormal><o:p> </o:p></p></div><div><p = class=3DMsoNormal>I=E2=80=99m happy to send it as a patch if it is = considered worth of adding to the project.<o:p></o:p></p></div><div><p = class=3DMsoNormal><o:p> </o:p></p></div><div><p = class=3DMsoNormal>By the way, wouldn=E2=80=99t be better to migrate the = kannel to Github and ditch subversion? I guess it would encourage more = collaboration and make life easier for = everybody.<o:p></o:p></p></div><div><p = class=3DMsoNormal><o:p> </o:p></p></div><div><p = class=3DMsoNormal>Martin.<o:p></o:p></p></div><div><p = class=3DMsoNormal><br><br><o:p></o:p></p><blockquote = style=3D'margin-top:5.0pt;margin-bottom:5.0pt'><div><p = class=3DMsoNormal>On Apr 29, 2021, at 4:18 PM, Rene Kluwen <<a = href=3D"mailto:[email protected]">[email protected]</a>> = wrote:<o:p></o:p></p></div><p = class=3DMsoNormal><o:p> </o:p></p><div><div><p class=3DMsoNormal = style=3D'margin-bottom:12.0pt'>Hi Martin,<br><br>Looks like you got = opensmppbox setup correctly for dlr.<br>Adding or omitting sqlbox won't = make a difference, like you already saw that<br>correctly.<br><br>Could = you list if there is any rows available in the dlr table in = your<br>postgres database?<br><br>Are the submit_sm's sent with = registered_delivery set to 1?<br><br>It could be a msg-id-type issue. = I'm not even sure if that's implemented in<br>opensmppbox.<br><br>=3D=3D = Rene<br><br><br>-----Oorspronkelijk bericht-----<br>Van: users <<a = href=3D"mailto:[email protected]">[email protected]</a>>= Namens Martin Caetano<br>Verzonden: donderdag 29 april 2021 = 21:01<br>Aan: <a = href=3D"mailto:[email protected]">[email protected]</a><br>Onderwerp: = OpenSMPPBox won't create DLR<br><br>I've spent a significant amount of = time around this issue. I've read the<br>complete Kannel guide, SO, = Nabble and any other resource I could find yet I<br>couldn't find any = solution or hint on why the DLR aren't being created. <br><br>I believe = what I'm trying to do is very straightforward: <br><br>I'm connected = using SMPP to OpenSMPPBox, using PostgreSQL and routing to a<br>SMPP = SMSC like this: <br><br>opensmppbox --> sqlbox -> bearerbox = -> smsc <br><br>I can send SMS with no problem to the other end and I = can see the pdu<br>responses back in the logs. However, the DLRs aren't = being created as they<br>are when I use HTTP with smsbox and = dlr-mask/dlr-url params. <br><br>It doesn't matter if I remove the = sqlbox and use internal storage, the DLRs<br>are never being created (or = at least never appear as created in the logs)<br>when connecting via = smpp to opensmppbox. <br><br>2021-04-29 05:28:14 [35121] [6] DEBUG: = SMPP[smsc1]: throughput (0.00,0.00)<br>2021-04-29 05:28:14 [35121] [6] = DEBUG: SMPP[smsc1]: Got PDU:<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = SMPP PDU 0x7eff380010e0 dump:<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = type_name: deliver_sm<br>2021-04-29 05:28:14 [35121] [6] = DEBUG: command_id: 5 =3D 0x00000005<br>2021-04-29 05:28:14 = [35121] [6] DEBUG: command_status: 0 =3D = 0x00000000<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = sequence_number: 31 =3D 0x0000001f<br>2021-04-29 05:28:14 = [35121] [6] DEBUG: service_type: NULL<br>2021-04-29 05:28:14 = [35121] [6] DEBUG: source_addr_ton: 0 =3D = 0x00000000<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = source_addr_npi: 0 =3D 0x00000000<br>2021-04-29 05:28:14 = [35121] [6] DEBUG: source_addr: = "xxxxxxxxxx"<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = dest_addr_ton: 5 =3D 0x00000005<br>2021-04-29 05:28:14 = [35121] [6] DEBUG: dest_addr_npi: 0 =3D = 0x00000000<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = destination_addr: "MySender"<br>2021-04-29 = 05:28:14 [35121] [6] DEBUG: esm_class: 4 =3D = 0x00000004<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = protocol_id: 8 =3D 0x00000008<br>2021-04-29 05:28:14 [35121] = [6] DEBUG: priority_flag: 0 =3D 0x00000000<br>2021-04-29 = 05:28:14 [35121] [6] DEBUG: schedule_delivery_time: = NULL<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = validity_period: NULL<br>2021-04-29 05:28:14 [35121] [6] = DEBUG: registered_delivery: 0 =3D 0x00000000<br>2021-04-29 = 05:28:14 [35121] [6] DEBUG: replace_if_present_flag: 0 = =3D<br>0x00000000<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = data_coding: 0 =3D 0x00000000<br>2021-04-29 05:28:14 [35121] = [6] DEBUG: sm_default_msg_id: 0 =3D 0x00000000<br>2021-04-29 = 05:28:14 [35121] [6] DEBUG: sm_length: 105 =3D = 0x00000069<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = short_message:<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = Octet string at 0x7eff38001340:<br>2021-04-29 05:28:14 = [35121] [6] DEBUG: len: = 105<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = size: 106<br>2021-04-29 05:28:14 [35121] = [6] DEBUG: immutable: 0<br>2021-04-29 = 05:28:14 [35121] [6] DEBUG: data: 69 64 3a = 37 32 36 34 37 33<br>33 37 20 73 75 62 3a id:72647337 = sub:<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = data: 30 20 64 6c 76 72 64 3a 32<br>38 20 = 73 75 62 6d 69 0 dlvrd:28 submi<br>2021-04-29 05:28:14 = [35121] [6] DEBUG: data: 74 20 64 61 74 65 = 3a 32 31<br>30 34 32 39 30 32 32 t = date:210429022<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = data: 38 20 64 6f 6e 65 20 64 61<br>74 65 = 3a 32 31 30 34 8 done date:2104<br>2021-04-29 05:28:14 = [35121] [6] DEBUG: data: 32 39 30 32 32 38 = 20 73 74<br>61 74 3a 45 4e 52 4f 290228 = stat:ENRO<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = data: 55 54 45 20 65 72 72 3a 30<br>20 54 = 65 78 74 3a 48 UTE err:0 Text:H<br>2021-04-29 05:28:14 = [35121] [6] DEBUG: data: 65 6c 6c 6f 20 54 = 65 78 74<br>ello Text<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = Octet string dump ends.<br>2021-04-29 05:28:14 [35121] = [6] DEBUG: SMPP PDU dump ends.<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = SMPP[smsc1] handle_pdu, got DLR<br>2021-04-29 05:28:14 [35121] [6] = DEBUG: DLR[pgsql]: Looking for DLR<br>smsc=3Dsmsc1, ts=3D72647337, = dst=3Dxxxxxxxxxx, type=3D4<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = sql: SELECT "mask", "service", = "url",<br>"source", "destination", = "boxc" FROM "dlr" WHERE "smsc"=3D'smsc1' = AND<br>"ts"=3D'72647337' LIMIT 1;<br>2021-04-29 05:28:14 = [35121] [6] DEBUG: no rows found<br>2021-04-29 05:28:14 [35121] [6] = WARNING: DLR[pgsql]: DLR from SMSC<smsc1><br>for = DST<xxxxxxxxxx> not found.<br>2021-04-29 05:28:14 [35121] [6] = ERROR: SMPP[smsc1]: got DLR but could not<br>find message or was not = interested in it id<72647337> = dst<xxxxxxxxxx>,<br>type<4><br>2021-04-29 05:28:14 [35121] = [6] DEBUG: SMPP[smsc1]: Sending PDU:<br>2021-04-29 05:28:14 [35121] [6] = DEBUG: SMPP PDU 0x7eff38001ec0 dump:<br>2021-04-29 05:28:14 [35121] [6] = DEBUG: type_name: deliver_sm_resp<br>2021-04-29 05:28:14 = [35121] [6] DEBUG: command_id: 2147483653 =3D = 0x80000005<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = command_status: 0 =3D 0x00000000<br>2021-04-29 05:28:14 = [35121] [6] DEBUG: sequence_number: 31 =3D = 0x0000001f<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = message_id: NULL<br>2021-04-29 05:28:14 [35121] [6] DEBUG: = SMPP PDU dump ends.<br><br><br>Looking at the logs when using = smsbox/HTTP I can see the DLR being created<br>right after the = submit_sm_resp, which isn't the case using opensmppbox which<br>causes = the later select query fails as it doesn't find the record. <br><br>I = understand I can set the dlr-mask when using smsbox/HTTP but I = haven't<br>found any way to do so in opensmppbox (unsure if it is even = possible). <br><br>I'm unsure if dlr-mask has to be set to get the DLRs = somehow or I may be<br>missing something terrible wrong or maybe even = obvious. <br><br>My main use case if to allow customers to connect = directly via SMPP while we<br>can still keep track of what was = delivery/failed by forwarding those DLRs to<br>our external system for = billing/reporting/processing/etc. <br><br>Any help around this is = greatly appreciated. <br><br>Here are the configurations: <br><br>I = first tried compiling Kannel 1.4.5 (and installing opensmppbox and = sqlbox<br>from its addons folder) and later also tried Kannel and = the<br>opensmppbox/sqlbox directly from their current svn trunks. In = both cases the<br>same behavior happens. <br><br>bearerbox = /etc/kannel/kannel.conf<br>group =3D core<br>admin-port =3D = 13000<br>smsbox-port =3D 13001<br>admin-password =3D bar<br>box-deny-ip = =3D "*.*.*.*"<br>box-allow-ip =3D = "127.0.0.1"<br>access-log =3D = "/var/log/kannel/kannel.access.log"<br>dlr-storage =3D = pgsql<br><br>group =3D smsc<br>smsc =3D smpp<br>smsc-id =3D = smsc1<br>host =3D xxx.xxx.xxx.xxx<br>port =3D 7777<br>smsc-username =3D = smpp<br>smsc-password =3D smpp<br>system-type =3D <br><br>group =3D = smsbox<br>bearerbox-host =3D localhost<br>global-sender =3D = Default<br>bearerbox-port =3D 13002<br><br>group =3D = sendsms-user<br>username =3D tester<br>password =3D = foobar<br>user-deny-ip =3D ""<br>user-allow-ip =3D = ""<br><br>group =3D sms-service<br>keyword =3D default<br>text = =3D "You asked nothing and I did it!"<br><br>group =3D = pgsql-connection<br>id =3D mydlr<br>host =3D localhost<br>username =3D = postgres<br>password =3D postgres<br>database =3D dlr<br>max-connections = =3D 10<br><br>group =3D dlr-db<br>id =3D mydlr<br>table =3D = dlr<br>field-smsc =3D smsc<br>field-timestamp =3D = ts<br>field-destination =3D destination<br>field-source =3D = source<br>field-service =3D service<br>field-url =3D url<br>field-mask = =3D mask<br>field-status =3D status<br>field-boxc-id =3D = boxc<br><br><br>sqlbox /etc/kannel/sqlbox.conf<br>group =3D sqlbox<br>id = =3D sqlbox-db<br>smsbox-id =3D sqlbox<br>bearerbox-host =3D = localhost<br>bearerbox-port =3D 13001<br>smsbox-port =3D = 13002<br>sql-log-table =3D sent_sms<br>sql-insert-table =3D = send_sms<br><br>group =3D pgsql-connection<br>id =3D sqlbox-db<br>host = =3D localhost<br>username =3D postgres<br>password =3D = postgres<br>database =3D dlr<br>max-connections =3D = 10<br><br><br>opensmppbox /etc/kannel/opensmppbox.conf group =3D core = dlr-storage =3D pgsql<br><br># Proxy configuration<br>group =3D = opensmppbox<br>opensmppbox-id =3D smsc1<br>opensmppbox-port =3D = 13003<br>bearerbox-host =3D 127.0.0.1<br>bearerbox-port =3D = 13002<br>log-file =3D /var/log/kannel/opensmppbox.log log-level =3D 0 = our-system-id =3D<br>smsc use-systemid-as-smsboxid =3D true # Will send = only to this route-to-smsc<br>=3D smsc1 # New accounts smpp-logins =3D = /etc/opensmppbox/clients/smpplogins.txt<br><br>group =3D = pgsql-connection<br>id =3D mydlr<br>host =3D localhost<br>username =3D = postgres<br>password =3D postgres<br>database =3D dlr<br>max-connections = =3D 10<br><br>group =3D dlr-db<br>id =3D mydlr<br>table =3D = dlr<br>field-smsc =3D smsc<br>field-timestamp =3D = ts<br>field-destination =3D destination<br>field-source =3D = source<br>field-service =3D service<br>field-url =3D url<br>field-mask = =3D mask<br>field-status =3D status<br>field-boxc-id =3D = boxc<br><br><br>/etc/kannel/smpplogins.txt<br>goodclient secret smsc1 = *.*.*.*<o:p></o:p></p></div></div></blockquote></div><p = class=3DMsoNormal><o:p> </o:p></p></div></div></body></html> ------=_NextPart_000_0252_01D73D99.BB8F4BA0--