Delivery Report

Delivery Report SearchSearch
Author Message
ARIS VLOTOMAS
New member
Username: Pqow7747

Post Number: 3
Registered: 02-2011
Posted on Monday, February 21, 2011 - 07:12 am:   

I am sending bulk sms and i need a delivery report after the process finish. The sms's are leaving via HTTP request and i didn't find a way to get response if the message is delivered properly. How can i find out if how many messages are delivered from each user of my service?And how can i get an HTTP response to learn if an individual sms is delivered?
ARIS VLOTOMAS
New member
Username: Pqow7747

Post Number: 4
Registered: 02-2011
Posted on Monday, February 21, 2011 - 09:16 am:   

Hi,

When i define a non existing phone number (for example 234), shouldn't i get a response that the phone number is incorrect? Instead, it seems that the HTTP response is not valid. Therefore,it schedules the message to be retried later.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2931
Registered: 08-2008
Posted on Monday, February 21, 2011 - 02:55 pm:   

Hi Aris,

I don't know what your outbound SMSC connection is. You talk about an HTTP response not being valid, so I don't know if you are connecting to an HTTP based SMS provider, or if you are referring to the HTTP response from NowSMS?

Generally speaking, you are not going to receive delivery reports from HTTP based SMS service providers through NowSMS because there is a lack of standard for the format of these delivery reports.

Delivery reports are generally supported in other environments (SMPP, UCP/EMI, CIMD2, GSM modem) ... as long as they are supported by the SMS provider.

What you need to know from a NowSMS perspective in order to handle delivery reports is this:

1.) By default, NowSMS does not ask for a delivery report from upstream providers.

To request a delivery receipt, there are two options.

a.) If you only want to request a delivery receipt for some mesages, include the URL parameter "&ReceiptRequested=Yes" when submitting messages that require a delivery receipt.

b.) Alternatively, 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 message submissions received via HTTP.

2.) When you submit a message to NowSMS 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. (Remove the ".req" part of the message id.)

3.) 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, in which case the receipt gets queued for delivery back to the client account via SMPP).

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 message id in the receipt (either @@RECEIPTMESSAGEID@@ or the text after "id:" in the text of the receipt) allows you to match up the receipt with the originally submitted message.
ARIS VLOTOMAS
New member
Username: Pqow7747

Post Number: 5
Registered: 02-2011
Posted on Wednesday, February 23, 2011 - 12:30 pm:   

Clear but not applicable for what i need.
Here is what i need to do even if i send the messages via HTTP or not. I will submit the messages (more than 10000) and at the end of day, i need to know how many messages are gone and how many are failed for every submition user. Basically i need some reports in order to update my database with the batch result. How can i do it through .NET C#,VB or Javascript or HTTP request?
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2946
Registered: 08-2008
Posted on Wednesday, February 23, 2011 - 07:22 pm:   

I don't know enough about your specific system configuration to answer your question.

How do users submit messages into NowSMS? (HTTP? SMPP? Both?)

How does NowSMS deliver messages upstream ... what type of SMSC connection?

I do want to emphasize that if your upstream SMSC connection is HTTP based (based upon your reply I think it is, but I might be misunderstanding you), there is no standard for NowSMS to know whether or not the upstream message submission was successful.
ARIS VLOTOMAS
New member
Username: Pqow7747

Post Number: 6
Registered: 02-2011
Posted on Tuesday, March 08, 2011 - 09:08 am:   

Hi,

Here is my system configuration and the steps that i am following to send the messages.

1. I added a valid SMSC Connection to the Gateway and i tested that is sending properly.
2. I tried succesfully to send a sample sms through NOW SMS Web Interface, thus the SMSC Service that i added is ok.
3. I am calling an HTTP request through my web application like http://127.0.0.1:8800/?PhoneNumber=mynumber&Text=mytext. When everything is ok, i am getting the sms correctly. When something goes wrong, i need to capture the reason(invalid phone number).
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2979
Registered: 08-2008
Posted on Tuesday, March 08, 2011 - 12:47 pm:   

Hi Aris,

My previous reply does apply to your configuration.

It may be more complicated than you would like it to be, but it does still apply.

NowSMS is a store-and-forward SMS delivery engine. When you submit an SMS message to NowSMS, it is queued for later posting to whatever SMSC connections are defined to NowSMS.

The HTTP response from NowSMS only indicates that the message has been accepted and queued by NowSMS.

If you want to know subsequent delivery information, you need to request a delivery receipt (also called delivery report or delivery notification ... I tend to use those terms interchangeably).

1.) By default, NowSMS does not ask for a delivery report from upstream providers.

To request a delivery receipt, there are two options.

a.) If you only want to request a delivery receipt for some mesages, include the URL parameter "&ReceiptRequested=Yes" when submitting messages that require a delivery receipt.

b.) Alternatively, 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 message submissions received via HTTP.


2.) When you submit a message to NowSMS 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. (Remove the ".req" part of the message id.)

This message ID tells you the ID that NowSMS assigned to the message. Subsequent delivery reports will reference this ID.

3.) 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, in which case the receipt gets queued for delivery back to the client account via SMPP).

What this means is that when a delivery report is received, NowSMS will pass the details to your application using either a command line interface or an HTTP interface.

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.

A typical delivery receipt message would have a format like this:

id:48469A19 sub:000 dlvrd:001 submit date:080625121622 done date:080625121639 stat:DELIVRD err:000 text:



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 message id in the receipt (either @@RECEIPTMESSAGEID@@ or the text after "id:" in the text of the receipt) allows you to match up the receipt with the originally submitted message.

Text in the message tells you the status of the delivery report. The format is SMSC specific, but generally it is one of the following text strings following a keyword of "stat:"

Look for the text that follows "stat:"

DELIVRD means successful delivery
ENROUTE is an interim OK response (some SMSCs cannot give delivery receipts, and by returning this response it indicates that the message has been queued for delivery, but an actual delivery receipt may not be available)
REJECTD means failed or rejected
EXPIRED means expired without being delivered
DELETED means message was deleted without being delivered
ACCEPTD is similar to ENROUTE
UNKNOWN means an unknown type of failure

Other values can generally be considered failure.

3b.) Alternatively, instead of using the 2-way command interface, if you want to process delivery reports in batch mode, assuming you have followed #1 and #2, you can read them from the SMSIN-yyyymmmd.LOG, where they have a format like this:


2008-06-25:20:10,+359878788280,Text,id:48469A19 sub:000 dlvrd:001 submit date:080625121622 done date:080625121639 stat:DELIVRD err:000 text:,Raiffeisen,SMSCReceiptMsgId=48469A19



--
Des
NowSMS Support
Nithya
New member
Username: Nithya

Post Number: 3
Registered: 05-2011
Posted on Thursday, May 26, 2011 - 12:28 pm:   

For example by using url
http/sendmsg?api_id=44444&user=iiii&password=aaa&to=@@444444@@&udh=@@TTR@@&text= @@Text@@ am sending message... i want to store the response by using php script..
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3196
Registered: 08-2008
Posted on Thursday, May 26, 2011 - 03:20 pm:   

Hi,

I'm sorry, but I do not know how your question relates to the discussion in this thread.

I would suggest that you start a new discussion thread ("Start new thread" link at http://support.nowsms.com/discus/messages/1/1.html), and post more complete detail about your question.

--
Des
NowSMS Support