EMG 3.0.17 - User's Guide

Table of ContentsPreviousNextIndex

9. Delivery receipts (DLR)

9.1 Overview

Delivery receipts, or DLRs as we call them, are special status messages generated by the SMSC when the final status of a message has been reached. For example if a message is sent to a phone successfully the SMSC can generate a DLR when the phone has acknowledged receiving the message.

Usually when a message passes through EMG and it is successfully delivered to the SMSC the status of the message is RELAYED. This means that the message was successfully transferred to and accepted by the SMSC but we still do not know if the message reached its final destination, the phone.

However if a DLR was requested then the SMSC would send a DLR back to EMG when the final status is reached, in this case DELIVERED. EMG then updates the message status from RELAYED to DELIVERED, a final status.

A DLR basically consists of a message id and a status. In EMG the MGP option MGP_OPTION_MSGTYPE is set MSGTYPE_DLR (5) to indicate that a message is in fact a DLR.

DLRs are propagated through EMG as any other message except that the special ROUTEDLR keyword is used for routing. If ROUTEDLR is not specified an DLR is routed to the connector from which the original message was received.

Also for messages terminated within EMG for any reason DLRs will be generated and sent out. For example, when a message is delivered using an HTTP, SMTP, MGP or EBE connector EMG sets the final status to DELIVERED and a DLR is generated, if requested.

9.2 Requesting a DLR

A DLR can be requested in several ways.

9.2.1 Using emgsend

The MGP option DLR can be specified on the command line.

emgsend -o DLR=1 46123456 "test message"

9.2.2 Using connector keyword

If DEFAULT_DLR keyword is used the default behavior for messages using the connector is set. However, a message-specific option always supersedes a connector option.

CONNECTOR smpp-out <

The keyword FORCE_DLR on the other hand overrides any DLR message option already set. When FORCE_DLR=1 is used on a connector where messages are received the DLRs received or generated will be forwarded back to the client, while if FORCE_DLR=1 is used on a connector where messages are sent the received DLRs will only be used to update the message status and then silently dropped.

Please note that DLRs silently dropped will not appear in the corresponding connector log but will only show up in the pdu log for the connector.

9.3 Routing DLRs

For incoming DLRs routing decisions are made a little differently than for normal messages.

It is evaluated in the following order with the highest priority first:

ROUTEDLR specified for user (in users file or in DB) who sent the original message for which DLR was requested
ROUTEDLR specified on original message
ROUTEDLR specified on connector where DLR is received/generated
ROUTEDLR specified by general keyword in server.cfg
DLR is routed back to the connector where the original message was received (and optionally redirected via connector keyword REDIRECT)

9.4 DLRs and buffered status

Some SMSCs send a DLR when the message has been accepted or if the message is buffered in the SMSC due to handset being switched off for example.

Such a DLR will not be propagated through EMG but will only update the "bufferedstatus" field in the routelog table within EMG. When using EMG with a database this field can be queried in order to determine if and why a message has been buffered.

The message status will remain as "RELAYED" even after a DLR with a buffered status has been received.

Table of ContentsPreviousNextIndex