Skip to Content
faviconTilil Technologies

Delivery Reports


Getting Delivery Reports:

  1. Offline (Pulling – Not recommended)

    This is a pull method where a client requests a delivery report from the system by specifying a message id in the request. The URL below will return a delivery report for message id 288369252.

You Only Expect:

  1. 1009;No dlr
  2. 288369252;Success;1;DeliveredToTerminal;2020-05-13 08:47:03;00:00:06

Where:

ValueNameDescription
288369252Message IdUsed when querying delivery reports
SuccessRequest StatusA status description for a successful request
1Delivery StatusThis can be used by developers for easy indexing of delivery statuses
DeliveredToTerminalDelivery DescriptionFull description of the delivery status
2020-05-13 08:47:03Delivery Date/TimeWhen the message was actually delivered to the end user
00:00:06TATThe turn around time. From when a message was scheduled up to the time it was delivered to the end user.

2. Online (Recommended)

This is the recommended method of getting delivery reports. A partner specifies a delivery reports callback URL from the portal. All delivery reports sent through an API will be pushed to the URL automatically.

Below is a PHP sample that can be hosted by the client to receive delivery report notifications. Note that the client has to implement the Business Logic for example:

  • Updating a local sent message
  • Storing the delivery report for later processing
  • Generate a report or an alert for support monitoring
<?php
$data_json = file_get_contents('php://input');
$data_array = json_decode($data_json);
if (!$data_array) {
die("0;error;unsupported data type");
}
$messageId = $data_array->messageId;
$dlrTime = $data_array->dlrTime;
$dlrStatus = $data_array->dlrStatus;
$dlrDesc = $data_array->dlrDesc;
$tat = $data_array->tat;
$network = $data_array->network;
// YOUR BUSINESS LOGIC
// END YOUR LOGIC: if all goes well echo 'OK' otherwise echo 'FAILED' for the system to retry
echo "OK;$messageId;$dlrDesc;$network";
?>

Delivery Codes and Descriptions

CodeDelivery StatusMessage General StatusDescription
1DeliveredToTerminalDeliveredMessage delivered to the end user's device
2MessageWaitingQueuedMessage forwarded to the operator but there is no delivery report
3DeliveryImpossibleFailedThe mobile operator is not able to deliver the message due to system errors. Rarely occurs
4DeliveryNotificationNotSupportedDeliveredMessage delivered to the end user's device on the test bed environment
5DeliveredToNetworkNoReportMessage forwarded to the operator but there is no delivery report
6DeliveryUncertainNoReportMessage forwarded to the operator but there is no delivery report after 24 hours
7Insufficient_BalanceFailedMessage delivery failed because of insufficient balance
8Invalid_LinkidFailedAn on-demand message delivery failed because of an expired or invalid link id
9TeleserviceNotProvisionedFailedEnd user device cannot receive GSM messages
10UserInBlacklistFailedEnd user has requested the mobile operator to stop all messages from the sender id to their number
11UserAbnormalStateFailedSubscriber mobile number may be blocked
12UserIsSuspendedFailedSubscriber mobile number suspended due to fraud, etc.
13NotSFCUserFailedEnd user not subscribed to a service
14UserNotSubscribedFailedEnd user not subscribed to a service
15UserNotExistFailedSubscriber does not belong to the mobile operator
16AbsentSubscriberFailedSubscriber is out of network for over 24 hours since a message was sent
17NOT_DELIVEREDFailedSame as DeliveryImpossible
18DELIVEREDDeliveredMessage delivered to the end user's device
19ForwardedToNetworkNoReportMessage forwarded to the operator but there is no delivery report
20MessagePausedQueuedMessage paused by system user
21MessageRejectedFailedEnd user has opted out of messages from a sender id
22QueuedQueuedMessage has not been processed
23InvalidMobileFailed(Not set)
24ReportNotHandledFailed(Not set)