How is an SMPP delivery report formatted?
In SMPP a delivery report is an SMS message.
There are just two differences:
- A Delivery report has the ‘ESM_2ESME_DELIVERY_RECEIPT’ bit (4) set high in the ESM Class property.
- The delivery report has a special format.
While there is no standard format for delivery reports 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 is from the SMPP 3.4 specification.
The body encodes the following fields:
Field | Size | Type | Description |
id | 10 | C-Octet | The message ID allocated to the message by the SMSC when originally submitted. |
sub | 3 | C-Octet | Number of short messages originally submitted. This is only relevant when the original message was submitted to a distribution list. The value is padded with leading zeros if necessary. |
dlvrd | 3 | C-Octet Fixed Length String | Number of short messages delivered. This is only relevant where the original message was submitted to a distribution list. The value is padded with leading zeros if necessary. |
submit date | 10 | C-Octet Fixed Length String | The time and date at which the short message was submitted. In the case of a message which has been replaced, this is the date that the original message was replaced. The format is as follows: YYMMDDhhmm where:
|
done date | 10 | C-Octet Fixed Length String | The time and date at which the short message reached it’s final state. The format is the same as for the submit date. |
stat | 7 | C-Octet Fixed Length String | The final status of the message. For settings for this field see table below. |
err | 3 | C-Octet Fixed Length String | Where appropriate this may hold a Network specific error code or an SMSC error code for the attempted delivery of the message. These errors are Network or SMSC specific and are not included here. |
text | 20 | Octet String | The first 20 characters of the short message. |
Delivery report status (stat field):
Message State | Final States | Description |
Message State | Final States | Description |
DELIVERED | DELIVRD | Message is delivered to destination |
EXPIRED | EXPIRED | Message validity period has expired. |
DELETED | DELETED | Message has been deleted. |
UNDELIVERABLE | UNDELIV | Message is undeliverable |
ACCEPTED | ACCEPTD | Message is in accepted state (i.e. has been manually read on behalf of the subscriber by customer service) |
UNKNOWN | UNKNOWN | Message is in invalid state |
REJECTED | REJECTD | Message is in a rejected state |