2 way SMS Strange problem

2 way SMS Strange problem SearchSearch
Author Message
Ahsan
New member
Username: Imahsan

Post Number: 10
Registered: 10-2010
Posted on Thursday, February 10, 2011 - 06:33 pm:   

I have configure a script to add a record in to the database on the basis of received sms. The issue is that strangely whenever sms is received, 3 records are added into the database instead of one (which the script is meant to do)! I tried running the script manually, which has been called by now sms upon receving of sms, by passing the required parameters and it was working fine and adding just one record into the database. but whenever the script is executed through now sms, upon receiving of sms, 2 extra records are added. I hope I am clear in explanation. Please help in this regard.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2897
Registered: 08-2008
Posted on Thursday, February 10, 2011 - 08:35 pm:   

Hi Ahsan,

The first thing I'd suggest is a little basic detective work. What you need to do is determine whether or not your script is actually being run multiple times when a new SMS comes in.

Modify your script to write to a simple text log or something similar so that you can see if the script is being run more than once.

If the script is being run more than once for each message, this means that an error response is being returned when NowSMS runs your script, so NowSMS believes it failed, and it retries.

Assuming your script is HTTP based, it needs to return a standard HTTP 200 OK response at the HTTP protocol level.

If you are curious what response is being returned by your script, enable the SMSDEBUG.LOG in NowSMS (checkbox option on "Serial #" page) and this log shows detail about the 2-way command processing, including what command was issued and what response was received back.

--
Des
NowSMS Support
SACHIN DAHIYA
New member
Username: Sachindcrustgmailcom

Post Number: 1
Registered: 05-2011
Posted on Thursday, May 19, 2011 - 05:19 am:   

ashish