How to process received sms | Search |
NowSMS Support Forums ⬆ NowSMS Support - SMS Issues ⬆ Archive through July 14, 2005 ⬆ |
◄ ► |
Author | Message | |||
Maroof Saeed New member Username: Maroofsaeed Post Number: 1 Registered: 05-2005 |
i ma using nowsms for smpp connection everything is fine i am receiving sms messages in sms-in folder but plz tell me how can i process these msgs for further bcz i am using this thing for an sms2tv based channel. plz help me. | |||
Neo Unregistered guest |
Hello Maroof. Open the gateway >> 2-way, then check (process received sms), then add a command in the command text box, which could be an EXE and pass the sms parameters(@@FULLSMS@@, etc.) as arguments to that EXE. Or add a command (web page), and pass the parameters as query strings. So you can handle your SMSs | |||
shams nezami Unregistered guest |
Hi Maroof, I see you faced the same problem which i am facing now, please help me. i need to receive sms in a java class like c:\smsreceive.class process it and send it. I am able to send it separately but how should i proceed to receive sms. Please reply soon. Md.Shams Nezami | |||
Mohamed Salim ALI New member Username: Salim Post Number: 19 Registered: 04-2005 |
HiMaroof, When you set, the 2-way setting as said Neo, you can make a script in js window, java or in VB, to read every 5 mn the SMS-IN folder and process these SMSs for what you want to. but know the scrip will read the unread SMSs. see below a windows script for sending a predifine script: and then you can modify it for your use and run in Command line. Examples: cscript sms.js +44777777777 This is a test message cscript sms.js +44777777777,+44777777778 This is a test message to 2 recipients ---begin sms.js--- /* This is a command line script for sending an SMS message via NowSMS. Below, you must subsitute in the address of your NowSMS server, plus a valid username and password for an account defined in the "SMS Users" list of that server. Note: This script uses the encodeURIComponent method introduced in Internet Explorer 5.5. If you are running Windows 2000 or an earlier version of Windows, you must have Internet Explorer 5.5 or later installed for this script to work. */ var NowSMSServerAddress = "http://127.0.0.1:8800"; var NowSMSUserName = "test"; var NowSMSPassword = "test"; function HTTPGET(strURL) { var strResult; try { // Create the WinHTTPRequest ActiveX Object. var WinHttpReq = new ActiveXObject("Msxml2.XMLHTTP" /* or "WinHttp.WinHttpRequest.5"*/); // Create an HTTP request. var temp = WinHttpReq.Open("GET", strURL, false); // Send the HTTP request. WinHttpReq.Send(); // Retrieve the response text. strResult = WinHttpReq.ResponseText; } catch (objError) { strResult = objError + "\n" strResult += "WinHTTP returned error: " + (objError.number & 0xFFFF).toString() + "\n\n"; strResult += objError.description; } // Return the response text. return strResult; } var strRequest; if (WScript.Arguments.Count() < 2) { WScript.Echo ("Usage: " + WScript.ScriptName + " PhoneNumber1[,PhoneNumber2,...] Message Text\r\n"); WScript.Quit(); } strRequest = NowSMSServerAddress + "/?PhoneNumber=" + encodeURIComponent(WScript.Arguments(0)) + "&User=" + encodeURIComponent(NowSMSUserName) + "&password=" + encodeURIComponent(NowSMSPassword) + "&text="; for (i=1; i<WScript.Arguments.Count(); i++) { if (i > 1) { strRequest += "%20"; } strRequest += encodeURIComponent(WScript.Arguments(i)); } WScript.Echo(HTTPGET(strRequest)); ---end sms.js--- but don't forget again that the "Echo" is a reply back message to the sender, and you can set it to fullSms. Regard//Salim. |