# Tracking SMS delivery statuses

There are two possible options to track the delivery status: active and passive.

The passive option provides for setting the registered\_delivery flag of the SUBMIT\_SM packet. After the message transits to the final state, the server sends the DELIVER\_SM packet with the Delivery\_Receipt message.

To request a delivery report, the SUBMIT\_SM package must have the registered\_delivery=0x01 flag set. In response, the SMSC sends a DELIVER\_SM packet containing the short\_message field with a delivery report.

**Example of a delivery report**

`(deliver: (pdu: 0 5 0 393653) (addr: 1 1 msisdn)  (addr: 5 0 Sender_Name)  (sm: enc: UTF-8 msg: id:616d2dbfde073b06 sub:001 dlvrd:001 submit date:2110181118 done date:2110191118 stat:UNDELIV err:999 text:<r:FINAL>)  (opt: (oct: (tlv: 1059) 03ffff)  (byte: (tlv: 1063) 5)  (str: (tlv: 30) 616d2dbfde073b06) ) )`

The parameters included in the report are described in detail in the table below.

**SMS delivery parameters**

| **Parameter** | **Description**                                                |
| ------------- | -------------------------------------------------------------- |
| id            | message ID                                                     |
| sub           | number of messages sent                                        |
| dlvrd         | number of messages delivered                                   |
| submit date   | message sending time                                           |
| done date     | message finalization time                                      |
| stat          | message status (dlvrd – delivered, or undeliv – not delivered) |
| err           | error code (if any)                                            |
| text          | message status (intermediate or finalized)                     |
| tlv           | additional parameters                                          |

**Description of additional parameters:**                 &#x20;

| Parameter value | Parameter              | Description                                                                                                                                                                 |
| --------------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1059            | network\_error\_code   | The network\_error\_code parameter is used to denote the actual network error code for a failed delivery.                                                                   |
| 1063            | message\_state         | SMSC uses this parameter in PDU deliver\_sm and data\_sm to transmit the message final status for SMSC Delivery Receipt. Status descriptions are listed in the table below. |
| 30              | receipted\_message\_id | The receipted\_message\_id parameter denotes ID of the message received in SMSC Delivery Receipt.                                                                           |

**Description of the message\_status values:**

| Code | Message status | Description                                  |
| ---- | -------------- | -------------------------------------------- |
| 1    | ENROUTE        | Message is being sent                        |
| 2    | DELIVERED      | Message is delivered to the recipient        |
| 3    | EXPIRED        | Permitted message sending period has expired |
| 4    | DELETED        | Message has been deleted                     |
| 5    | UNDELIVERABLE  | Message cannot be delivered                  |
| 6    | ACCEPTED       | Message is in the accepted status            |
| 7    | UNKNOWN        | Message is in an unknown status              |
| 8    | REJECTED       | Message is in the rejected status            |

&#x20;

**Receiving multipart messages statuses**

When sending a multipart message, the SMSC immediately returns the delivery status for all parts except the last one. At the same time, in the short\_message field for each of the parts, except for the last one, the following is transmitted:

`text:<r:PROGRESS>`

The actual delivery status of the multipart message is transmitted to the last part received. For this, after short\_message,

`text:<r:FINAL>`

will be transmitted


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://smsc.revicom.ltd/how-to-work-with-smsc/tracking-sms-delivery-statuses.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
