Delivery receipts
A delivery receipt is a deliver_sm that Telrioz sends to a bind_receiver or bind_transceiver session of the same login. One receipt comes for each part, when the part reaches a final Delivery state.
registered_delivery
| Value | Receipts |
|---|---|
0 | None. |
1 | One for every final result, delivered or not. |
2 | Only when the part fails: every final state except delivered. |
No receipt comes for accepted, retrying or sent: those states are not final. For every state, including sent, use the webhook.
Receipt format
The receipt's esm_class is 0x04. Its source is the number you sent to and its destination is your source_addr, with the TON/NPI swapped the same way. Its short_message is:
id:96ca0baa-5068-4481-b97a-7aa648dfd6d3 submit date:2511260859 done date:2511260859 stat:DELIVRD err:000| Part | Meaning |
|---|---|
id | The part's message_id, as submit_sm_resp gave it. |
submit date | When Telrioz accepted the part, YYMMDDhhmm in UTC. |
done date | When this receipt was sent, YYMMDDhhmm in UTC. |
stat | The result: see the table below. |
err | The error code from the operator's receipt, or a three-digit code when the part never reached an operator (000 when there is none). Read the full code in the webhook's error. |
The receipt also has two TLVs: receipted_message_id (0x001E, the same ID as id) and message_state (0x0427). There are no sub, dlvrd or text fields.
Answer each deliver_sm with deliver_sm_resp and ESME_ROK within 10 s. If no receiver or transceiver session is bound, or you do not answer, Telrioz sends the receipt again every 30 s, for up to 48 hours after it was made.
stat values
stat | message_state | Delivery states |
|---|---|---|
DELIVRD | 2 | delivered |
REJECTD | 8 | rejected |
UNDELIV | 5 | undelivered, not_sent, upstream_rejected |
EXPIRED | 3 | expired |
DELETED | 4 | deleted |
UNKNOWN | 7 | unknown |
UNDELIV covers three Delivery states. not_sent and upstream_rejected mean the part never went out and cost 0; undelivered means an operator could not deliver it, and is charged. The webhook gives the exact state.