SMS YANU documentation home

Delivery receipts

How delivery receipts arrive as deliver_sm and how to read them.

Ask for a receipt by setting registered_delivery = 1 in submit_sm.

How they arrive

  • Receipts come as deliver_sm on a RX or TRX session of the same system_id.
  • esm_class is 0x04, which marks a delivery receipt.
  • Answer each deliver_sm with a deliver_sm_resp with command_status = 0. If you do not, we send it again.
  • If no RX or TRX session is open, receipts wait for a while and are sent when you bind again.

The receipt text

The short_message of the receipt holds the standard text:

id:6f1c2b9e-1d2a-4c55-9a0e-2b7f0c1d3e4f sub:001 dlvrd:001 submit date:2611050830 done date:2611050830 stat:DELIVRD err:000 text:
PartMeaning
idThe message_id from your submit_sm_resp. Match on this.
sub, dlvrdSubmitted and delivered counts.
submit date, done dateYYMMDDhhmm.
statThe final state, see below.
errNetwork error code. 000 means none.

The message id may also be in the receipted_message_id TLV.

For long messages you get one receipt per segment. Each has the message_id of that segment.

stat values

statMeaningCharged
DELIVRDDelivered to the phone.Yes
ACCEPTDAccepted by the network, final state unknown.Yes
ENROUTEStill on its way (not final).Yes
EXPIREDThe phone was off or out of reach until the validity time ran out.Yes
UNDELIVThe network could not deliver it, for example a wrong number.Yes
REJECTDRefused by the network.Yes
DELETEDDeleted by the network.Yes
UNKNOWNNo final answer from the network.Yes

A credit is used when the message is accepted in submit_sm_resp, not when it is delivered. A message that later fails is not refunded.

To be confirmed

The format of message_id (shown here as a UUID) and how long receipts wait for a client that is not bound have not yet been checked on the live SMS YANU server.

On this page