Receiving Delivery Reports via HTTP
The MX Telecom SMS Gateway can return Delivery Reports for each message sent through the SMS Gateway. These reports provide feedback regarding the delivery status of each SMS message.
This page describes the format of Delivery Reports sent to your platform. For information about enabling and interpreting delivery reports, see Delivery Reports.
If messages are sent with delivery reports enabled (and the networks concerned support reports) then delivery reports will be added to the online billing system automatically.To receive a report back for a message, you need to include the report parameter in the message request. See Optional Parameters for more information.
Receiving a delivery report using HTTP
If a sending account has an HTTP (or HTTPS) URL associated with it then the SMS Gateway will push SMS delivery reports back to the application.
The parameters are similar to the HTTP SMS Receiving interface; however certain additional fields are available, and some are used differently.
|smsfrom||The MSISDN of the end user you are sending a message to.|
|smsdate||The timestamp of the delivery report. Format: yyyy-MM-dd HH:mm:ss.|
|reason||The detailed delivery reason code. This is passed as a decimal number; for example "1610612736". Before it can be used, this code should be converted to hexadecimal; for example, "0x60000000". For information on interpreting this value, see Delivery Report Reason Codes.|
|note||The note passed with the original MT message request. This field is only present if a note was provided.|
|smsto||Can be ignored.|
|shortcode||Can be ignored.|
The smsmsg field will be of the format:
REPORT <SMS ID> <STATUS>
REPORT <37954551> <BUFFERED>
<SMS ID> is a positive 64 bit integer used to uniquely identify an SMS message as it passes through the SMS Gateway. This ID is assigned when the message is first submitted to the SMS Gateway, and the HTTP response returned for the request includes this ID. <STATUS> is the delivery report type code. These codes are explained here.
Response to the SMS Gateway
Your platform should respond with an HTTP 200 response with a non-empty body. This response must be given in a timely manner (sub 10 seconds). Currently we do not abandon a request (waiting for the HTTP response) until 60 seconds have passed but this might be reduced in future.
To ensure the authenticity of the HTTP requests you should only accept requests from the following IP addresses:
- 18.104.22.168 - 22.214.171.124 (126.96.36.199/23)
- 188.8.131.52 - 184.108.40.206 (220.127.116.11/24)
- 18.104.22.168 - 22.214.171.124 (126.96.36.199/22)
The HTTP endpoint can be an HTTPS (SSL) URL to protect the data whilst in transit.