Classify a deliver_sm by esm_class and document the messageDlr precondition

This commit is contained in:
2026-08-27 15:52:33 +02:00
parent 9225f6ca23
commit 4c08fe8fa3
8 changed files with 138 additions and 46 deletions
+4 -3
View File
@@ -155,7 +155,8 @@ session.on('sms', async sms => {
```
Delivery receipts travel on the same SMPP command but reach you as `dlr`, so nothing you write has
to tell the two apart.
to tell the two apart. `esm_class` is what tells them apart; a peer that marks no message type
there has the message body read for the standard `id:` and `stat:` receipt fields instead.
## Server
@@ -294,8 +295,8 @@ TypeScript users can import `SmppLog` to have the compiler check one.
| Event | Fires when |
| --- | --- |
| `sms` | An SMS arrives, reassembled if it was multipart. Carries `sendResp()`, `sendDlr()` and the `smsId` it was answered with. |
| `dlr` | A delivery report arrives, one per segment. |
| `messageDlr` | Every segment of a multipart message sent with `dlr: true` has been reported on, carrying the worst status of the segments. |
| `dlr` | A delivery report arrives, one per segment. `smsId` is undefined when the peer marked a receipt whose body carries no readable id. |
| `messageDlr` | Every segment of a multipart message sent with `dlr: true` has been reported on, carrying the worst status of the segments. Merging needs the SMSC to number its segment ids `<base>-<n>`, which is this library's own server's convention — an SMSC that hands out unrelated ids per segment never fires it. |
| `close` | The connection closed. |
| `reconnected` | The client re-bound after a drop (only with `reconnect` configured). |
| `sessionError` | Something failed on a live session, including a hook or listener that threw. |