NowSMS Results

NowSMS Results SearchSearch
Author Message
DHMHTRHS MANTELLOS
New member
Username: Dimitris

Post Number: 6
Registered: 06-2009
Posted on Monday, July 13, 2009 - 11:38 am:   

Heya all, again!

I was wondering.. Apart from "Successfully Sent" and "Not enough resources" (or sth like that), are there any other Result messages? Or does anybody have a list with all the possible "Return" values of the smsfile.js script?

The thing is that i'm writing a program in Delphi, that uses NowSMS, and i need to know what happened to my message (was it sent? did the connection fail? was the phone number invalid? and stuff like that). I can only assume that the "Return" value returns an HTML page that states some or all of the above. And i have built a function that clears all the HTML tags, so that i can keep only the result itself (for example, when i receive a "Successfully Sent" message for example, i can continue with my program, else i write an error message in a Log file) . But i have no idea what the rest of the results/messages could be..

So, does anybody know?

Thanx a lot in advance!
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 1038
Registered: 08-2008
Posted on Monday, July 13, 2009 - 10:58 pm:   

Hi Dimitris,

When NowSMS returns its HTTP response, that only means that it has accepted the message into its queue.

It doesn't necessarily mean that the message is going to be accepted by its final destination.

If you only want to know if NowSMS accepted the message or not ... the presence, or lack thereof, of "MessageID=" in the response will tell you.

If "MessageID=" is not present, and you wanted to know the reason, unfortunately, there is not a good technique. All I could suggest is parsing the "<H1>" header of the HTML response, which contains a descriptive error message.

But it's likely that you're looking for more information than just whether or not NowSMS accepted the message.

Let me break it into 3 stages ...

1.) When the message is accepted into the NowSMS queue.

2.) When NowSMS submits the message to the upstream SMSC.

3.) When the upstream SMSC reports that the message is delivered.

My response above only deal with stage 1.

If you want to know about #2 ... then you get into accounting callbacks.

NowSMS issues an accounting callback when it delivers a message to an upstream SMSC.

Accouting callbacks are described here: http://www.nowsms.com/support/bulletins/tb-nowsms-001.htm.

There is an additional "SMSOUT" callback that is not described in the link above. In fact, hmm ... I can't find it documented anywhere ... but it does, in fact, exist. The "Type=" value for the callback is "SMSOut", and it indicates when a message has been dispatched from NowSMS to the upstream SMSC. It follows the same format (and URL) as the other callbacks. (We're going to have to take some time to update the accounting callback definitions in the near future.)

Within the callback, "MessageID=" will have the message id from the original message, and "Status=" will start with "OK" or "ERROR".

Stage #3 is also complex. You need to enable receipt requests for all submitted messages (see http://support.nowsms.com/discus/messages/1/23657.html). But then there is the question of whether or not your SMSC connection supports delivery receipts. If your SMSC connection supports delivery receipts, they come back as inbound messages that start with the text "id:". You'd need to route these messages to a 2-way script for processing. (And the description gets a bit more complicated from here ... I don't want to get into it all here unless that is what you are actually asking about.)

--
Des
NowSMS Support