Re: DLRs
Antony Stone <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.user |
|---|---|
| Organization | Open Source IT |
| Message-ID | <[email protected]> |
On Saturday 17 August 2019 at 14:20:36, Davor Spasoski wrote:
> The smsc should send back DLR (deliver_sm pdu) on succesful delivery after
> you turn on the phone. Try with a different handset and watch for the
> deliver_sm pdu. Run bearerbox in debug level.
>
> Davor
It happens that I'm running bearerbox with debug logging already, so I checked
the logs for the message I sent earlier.
I see the following:
2019-08-17 12:19:53 [11506] [6] DEBUG: SMPP[Carrier] handle_pdu, got DLR
2019-08-17 12:19:53 [11506] [6] DEBUG: DLR[internal]: Looking for DLR
smsc=Carrier, ts=4057323ed63f402595dde997f8f55d60, dst=447799112233, type=1
2019-08-17 12:19:53 [11506] [6] WARNING: DLR[internal]: DLR from SMSC<Carrier>
for DST<447799112233> not found.
2019-08-17 12:19:53 [11506] [6] ERROR: SMPP[Carrier]: got DLR but could not
find message or was not interested in it id<4057323ed63f402595dde997f8f55d60>
dst<447799112233>, type<1>
2019-08-17 12:19:53 [11506] [6] DEBUG: SMPP[Carrier]: Sending PDU:
2019-08-17 12:19:53 [11506] [6] DEBUG: SMPP PDU 0x7fe9a0006910 dump:
2019-08-17 12:19:53 [11506] [6] DEBUG: type_name: deliver_sm_resp
2019-08-17 12:19:53 [11506] [6] DEBUG: command_id: 2147483653 = 0x80000005
2019-08-17 12:19:53 [11506] [6] DEBUG: command_status: 0 = 0x00000000
2019-08-17 12:19:53 [11506] [6] DEBUG: sequence_number: 16027465 =
0x00f48f49
2019-08-17 12:19:53 [11506] [6] DEBUG: message_id: NULL
2019-08-17 12:19:53 [11506] [6] DEBUG: SMPP PDU dump ends.
So, it seems that kannel did receive a DLR with type=1, but then said "got DLR
but could not find message or was not interested in it".
I've found https://www.kannel.org/pipermail/users/2011-July/016176.html which
addresses this, and it looks like suggestion 1 is my problem. I do have two
machines running kannel, each with a connection to my upstream carrier (for
load balancing / high availability), and I have no control over which
connection that carrier will use to send me messages or DLRs.
It looks like I'm going to have to look into using a database for my DLR
storage. I do happen to have a MariaDB Galera cluster available, but I've
read https://stackoverflow.com/questions/45486238/kannel-sqlbox that the Debian
packaged installation of kannel doesn't work with MySQL, only if you build
kannel from source.
Does anyone know whether this is still true (kannel 1.4.4, kannel-sqlbox
0.7.2) for the Debian 9 Stretch packages?
> >> On Aug 17, 2019, at 1:45 PM, Antony Stone wrote:
> >>
> >> Hi.
> >>
> >> I'm now wondering whether I've misunderstood how DLRs actually work.
> >>
> >> I just tried the following:
> >>
> >> 1. Make sure my mobile phone is turned on and has good signal.
> >>
> >> 2. Send a message via kannel to my mobile phone, with dlr_mask=31,
> >> indicating that I want to get all status reports possible.
> >>
> >> 3. I immediately get back a DLR with status=8, which I interpret to mean
> >> that the message has been received by the upstream SMSC and is being
> >> processed.
> >>
> >> 4. I then immediately afterwards get a DLR with status=1, which I
> >> interpret to mean that the message has been delivered to my phone.
> >>
> >> 5. Sure enough, the message has arrived on my phone.
> >>
> >>
> >> 6. Turn the phone off.
> >>
> >> 7. Repeat step 2 above.
> >>
> >> 8. I immediately get back a DLR with status=8, just as in step 3 above.
> >>
> >> 9. Nothing further happens - no surprise there.
> >>
> >> 10. I turn my phone back on again and wait until it has signal.
> >>
> >> 11. The second message arrives on my phone.
> >>
> >> 12. The bit which surprises me is that I do *not* now get a DLR through
> >> kannel with status=1, so my application has no way of knowing that the
> >> message has now been delivered.
> >>
> >>
> >> Am I misunderstanding the meaning of status codes 8 and 1, or maybe
> >> misunderstanding how DLRs are supposed to work with SMS?
> >>
> >> I'd be grateful for any comments helping me to understand why I do not
> >> get a DLR status=1 after the second message has arrived on my phone.
> >>
> >>
> >> Thanks,
> >>
> >> Antony.
--
"Life is just a lot better if you feel you're having 10 [small] wins a day
rather than a [big] win every 10 years or so."
- Chris Hadfield, former skiing (and ski racing) instructor
Please reply to the list;
please *don't* CC me.