How to get delivery report of an SMS?

How to get delivery report of an SMS? SearchSearch
Author Message
vijay
New member
Username: Vizaise

Post Number: 6
Registered: 06-2007
Posted on Friday, June 29, 2007 - 12:38 pm:   

Hi experts,

I'm sending OTA Setting to the mobile through NowSMS http interface using a C# program.

Now I need to get the delivery report
whether the SMS is sent or not to the device successfully..
Can anyone guide me in this.

Thanks in advance..
..vizai
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 7314
Registered: 10-2002
Posted on Friday, June 29, 2007 - 05:07 pm:   

Hi vizai,

Add &ReceiptRequested=Yes to the URL request.

It is also possible to edit the SMSGW.INI, and under the [SMSGW] header, add ReceiptRequested=Yes ... which will cause this flag to be set for all HTTP submissions.

When this "ReceiptRequested" flag is set, it causes NowSMS to request a delivery receipt when submitting the message to an upstream SMSC.

These receipt requests are supported when connecting to an SMPP based provider or a GSM modem that supports receipts. (In recent versions, there is also some support for UCP/EMI environments, but we need more real world testing feedback with more UCP/EMI providers.)

When you are connecting to an SMPP provider, it is then up to that provider whether or not they will send delivery reports back to you. (So even if you configure everything correctly in NowSMS, they might not support delivery receipts.)

If you are submitting to NowSMS via HTTP, then the "SMS Users" account that you are using should NOT have SMPP access enabled. (If the account has SMPP access enabled, NowSMS will queue any delivery receipts that it recieves back to the message queue for this SMPP client.)

When a message is submitted via HTTP, the HTTP 200 OK response includes text such as the following:

MessageID=54321098.req, Recipient=+xxxxxxxxxx

If the message was posted to multiple recipients, this will be repeated for each recipient.

You can parse the text from this HTTP response to determine the Message id that NowSMS has assigned to the message.

When a delivery receipt comes back into the system, it gets routed to the 2-way command facility (unless SMPP access is enabled for the account that originally submitted the message to NowSMS, as I mentioned above).

Normally, the SMSC will prefix the text of all delivery receipts with "id:" ... and if the message is properly formatted as a delivery receipt, but this prefix is not present, NowSMS will reformat the message to include this prefix.

To define a 2-way command specific to processing delivery receipts, define the 2-way command with an "SMS Command Prefix" of id:*

Leave "Receive Phone Number(s)" blank (or in the context of receipts, it would be the sender address of the originally sent message, so you could define different scripts to process receipts for different sender phone numbers).

Then in the "Command to Execute" field, there is a parameter that you can use ... @@RECEIPTMESSAGEID@@, which will contain the message id for which this receipt applies. (This assumes that the service provider returns the message id properly in the receipt.)

Usually an OTA message is at least a 3 part SMS, so you're going to see multiple message id's assigned by NowSMS, one for each part.

-bn
Onedot
New member
Username: Onedot

Post Number: 1
Registered: 10-2007
Posted on Friday, October 12, 2007 - 12:28 pm:   

Hi to all

I am using nowsms to send sms to my customer.. I am using jsp for that. I am getting response from server

MessageID=470F0591.req, Recipient=XXXXXXXXXXMessageID=470F0592.req, Recipient=YYYYYYYYYYYY

Now I want to check status whether this message is sent properly or not?

How can I get?

Thanks & Regards
Malcolm - Now Support
Moderator
Username: Malcolm

Post Number: 192
Registered: 12-2006
Posted on Thursday, October 18, 2007 - 08:45 pm:   

If your SMSC supports it (and you've requested a delivery receipt as Bryce described above) ... then the delivery receipt is going to come back to you as a received SMS message.

When a delivery receipt comes back into the system, it gets routed to the 2-way command facility.

Normally, the SMSC will prefix the text of all delivery receipts with "id:" ... and if the message is properly formatted as a delivery receipt, but this prefix is not present, NowSMS will reformat the message to include this prefix.

To define a 2-way command specific to processing delivery receipts, define the 2-way command with an "SMS Command Prefix" of id:*

Leave "Receive Phone Number(s)" blank (or in the context of receipts, it would be the sender address of the originally sent message, so you could define different scripts to process receipts for different sender phone numbers).

Then in the "Command to Execute" field, there is a parameter that you can use ... @@RECEIPTMESSAGEID@@, which will contain the message id for which this receipt applies. (This assumes that the service provider returns the message id properly in the receipt.)

The @@RECEIPTMESSAGEID@@ parameter will contain the MessageID of the original message (without the ".req" extension ... e.g., 470F0591 and 470F0592 in your example above).

You'll normally want to parse the "stat:" or "err:" text out of the text of the delivery receipt message.

For GSM modems, "stat:" will either be "DELIVRD", "ENROUTE", or "REJECTD". For SMPP servers, you might also see "EXPIRED", "DELETED", "UNDELIV" (undeliverable), "ACCEPTD", or "UNKNOWN".

"err:" will be "000" if there is no error, otherwise it will be non-zero.

Unfortunately, this last bit ... determining whether the message delivery receipt is a failure or a success can take some experimenting as the text formats can vary slightly between providers.