How is an SMPP delivery report formatted?
In SMPP, a delivery report is an SMS message.
There are two differences:
- A delivery report has the ‘ESM_2ESME_DELIVERY_RECEIPT’ bit (4) set in the ESM Class property.
- The delivery report uses a specific format.
There is no official standard format for delivery reports, but this is the de facto standard:
id:IIIIIIIIII sub:SSS dlvrd:DDD submit date:YYMMDDhhmm done date:YYMMDDhhmm stat:DDDDDDD err:E Text: .........
This example comes from the SMPP 3.4 specification.
The body encodes the following fields:
| Field | Size | Type | Description |
| id | 10 | C-Octet | The message ID assigned by the SMSC when the message is submitted. |
| sub | 3 | C-Octet | The number of short messages originally submitted. This is only relevant when the original message is sent to a distribution list. The value is padded with leading zeros if needed. |
| dlvrd | 3 | C-Octet Fixed Length String | The number of short messages delivered. This is only relevant when the original message is sent to a distribution list. The value is padded with leading zeros if needed. |
| submit date | 10 | C-Octet Fixed Length String | The date and time when the short message is submitted. If the message is replaced, this shows the date of the original message. The format is: YYMMDDhhmm where:
|
| done date | 10 | C-Octet Fixed Length String | The date and time when the short message reaches its final state. The format is the same as the submit date. |
| stat | 7 | C-Octet Fixed Length String | The final status of the message. See the table below for possible values. |
| err | 3 | C-Octet Fixed Length String | If applicable, this contains a network-specific or SMSC error code for the delivery attempt. These codes are specific to the network or SMSC and are not listed here. |
| text | 20 | Octet String | The first 20 characters of the short message. |
Delivery report status (stat field):
| Message State | Final State | Description |
| DELIVERED | DELIVRD | The message is delivered to the destination. |
| EXPIRED | EXPIRED | The message validity period has expired. |
| DELETED | DELETED | The message is deleted. |
| UNDELIVERABLE | UNDELIV | The message cannot be delivered. |
| ACCEPTED | ACCEPTD | The message is accepted. For example, it is read manually on behalf of the subscriber by customer service. |
| UNKNOWN | UNKNOWN | The message is in an invalid state. |
| REJECTED | REJECTD | The message is rejected. |