SMPP Delivery Receipts: deliver_sm Format, Statuses and How to Test Them
How SMPP delivery receipts (DLRs) are built, what each stat value means and how to test every outcome with an SMSC simulator.
Guide
A practical guide to the three SMPP bind types, the PDUs each one allows, and how to choose between TX, RX and TRX connections.
Before an SMPP client (an ESME) can send or receive anything, it must open a TCP connection to the SMSC and send a bind request. The kind of bind decides which operations are allowed on that session. SMPP v3.4 defines three: transmitter, receiver and transceiver, usually shortened to TX, RX and TRX.
| Bind | Request PDU | Command ID | Direction |
|---|---|---|---|
| Transmitter (TX) | bind_transmitter | 0x00000002 | Client sends messages to the SMSC |
| Receiver (RX) | bind_receiver | 0x00000001 | SMSC sends messages and reports to the client |
| Transceiver (TRX) | bind_transceiver | 0x00000009 | Both directions on one session |
Each request has a matching response with the high bit set (for example bind_transceiver_resp is 0x80000009). The response carries the SMSC's own system_id and a command_status of 0 on success.
system_id: the login of the client account.password: the account password.system_type: an optional free-text identifier of the client application.interface_version: 0x34 for SMPP v3.4.addr_ton, addr_npi, address_range: optional routing information, often left empty.A TX session is for sending. It can submit messages (submit_sm, submit_multi, data_sm) and query or cancel them, but the SMSC will not push deliver_sm to it. Use TX when you only send and receive your delivery reports somewhere else, or when you want to separate the send path from the receive path for load reasons.
An RX session is for receiving. The SMSC sends deliver_sm PDUs to it: delivery receipts for messages you submitted, and mobile-originated messages where the service supports them. The client must answer each one with deliver_sm_resp. It cannot submit messages on this session.
A TRX session does both on a single connection. It was introduced in SMPP v3.4 and is the simplest choice for most applications: one socket, one window of outstanding requests, one enquire_link keep-alive. Some older SMSCs support only TX and RX, so a client that must work everywhere should be able to open a TX plus RX pair.
registered_delivery to 0.| command_status | Name | Typical cause |
|---|---|---|
| 0x04 | ESME_RINVBNDSTS | The PDU is not allowed for this bind, for example submit_sm on an RX session. |
| 0x05 | ESME_RALYBND | The session is already bound. |
| 0x0D | ESME_RBINDFAIL | Bind failed for a reason not covered by a more specific code. |
| 0x0E | ESME_RINVPASWD | Wrong password. |
| 0x0F | ESME_RINVSYSID | Unknown system_id. |
A useful test for any client is to send a PDU on the wrong bind type and check that the client reads the ESME_RINVBNDSTS error instead of retrying forever. Also verify that the client rebinds and resumes after the connection drops and that it answers every enquire_link from the SMSC.
A bind is only the start of the session. Once bound, both sides should keep the session healthy and close it cleanly:
enquire_link at a regular interval and treat a missing enquire_link_resp as a dead connection.unbind and wait for unbind_resp before dropping the TCP connection.Bind behavior is easy to test against a simulator because you can create as many accounts and credentials as you need. In Maxi you connect to a single SMPP port (4444) with a Transmitter (TX), Receiver (RX) or Transceiver (TRX) connection. You send messages via TX, receive delivery reports via RX, or do both via TRX. Each client SMPP connection gets its own session, and each connection needs its own login and password with the connecting IP address added to the account. See how to configure it step by step.
Want to check your client against all three bind types? Register for the free trial period or contact us. For what happens after the bind, read about SMPP delivery receipts.
How SMPP delivery receipts (DLRs) are built, what each stat value means and how to test every outcome with an SMSC simulator.
What an SMPP test tool is, what to check when testing an SMPP client, and how an SMSC simulator lets you do it without paying for real SMS delivery.
What SMS simulation is, when an online SMS simulator saves time and money, and what a good simulator should let you control.
Get your SMPP simulator in minutes and use it free for 3 days — or tell us what you need and we will help you choose a plan.