Need support on 2-way SMS

Need support on 2-way SMS SearchSearch
Author Message
Fajar Adianto
New member
Username: Adiantof

Post Number: 1
Registered: 04-2009
Posted on Wednesday, April 01, 2009 - 09:13 pm:   

Hi,
I'd set up 2-way sms with http command but it didn't work. I am using old siemens C55 as gateway device. I'd tried to check only "Process Received SMS Messages" checkbox without defining any command, and NowSMS create a *.sms in the folder SMS-IN when the device received a message. Now I like to run some php file located on my intranet web server.

The command I have defined under Command To Execute is:

http://192.168.0.253/starnet/operation/index.php?mtab=operational&stab=oprPulsa& pmodul=SMSIN&sid=@@MESSAGEID@@&ss=@@SENDER@@&smsg=@@FULLSMS@@&srec=@@RECIP@@&sdat=@@MSGDATE@@&sti m=@@MSGTIME@@

And here the part of php script that should be executed:

. . .
elseif ($stab == "oprPulsa") {
$pmodul = $_GET["pmodul"];
if ($pmodul == "SMSIN") {
$sid = $_GET["sid"];
$ss = $_GET["ss"];
$smsg = $_GET["smsg"];
$srec = $_GET["srec"];
$sdat = $_GET["sdat"];
$stim = $_GET["stim"];

$sql = "INSERT INTO smsmasuk (IDPesanNowSMS, Pengirim, Pesan, Penerima, Tanggal, Waktu) VALUES ('$sid', '$ss', '$smsg', '$srec', '$sdat', '$stim')";
Database::Query($sql);
}
} #stab = oprPulsa
. . .

There is nothing wrong with the sql command, cause I had already checked it by running the http command with provided parameters.

Please help.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 647
Registered: 08-2008
Posted on Wednesday, April 01, 2009 - 10:05 pm:   

Hi,

Did you put in * as the "SMS Command Prefix" so that all received messages are routed to this command?

Enable the SMSDEBUG.LOG (checkbox on the "Serial #" page of the configuration dialog) ... and send in another message.

Let's take a look at the SMSDEBUG.LOG which will show more information about the attempt to connect to the HTTP URL.

--
Des
NowSMS Support
Fajar Adianto
New member
Username: Adiantof

Post Number: 2
Registered: 04-2009
Posted on Thursday, April 02, 2009 - 10:57 pm:   

Thanks Des, problem is solved. The script was part of secured PHP file, that should not be called directly from NowSMS 2 Way SMS Command.