Log incoming messages into separate files

Log incoming messages into separate files SearchSearch
Author Message
Cyril Au
New member
Username: Cyrilau

Post Number: 1
Registered: 05-2010
Posted on Monday, May 17, 2010 - 12:54 pm:   

Dear Sir,

I have 2 modems to receive SMS message. Is there any way for the system to log down the message into 2 separate files ?

Example :
modem 1 received message --> smsinmodem1.txt
modem 2 received message --> smsinmodem2.txt

Thanks !
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2127
Registered: 08-2008
Posted on Monday, May 17, 2010 - 05:46 pm:   

Hi Cyril,

Not directly.

You'd need to write your own 2-way command to do this.

There's a good old VBScript example here: http://support.nowsms.com/discus/messages/1/333.html

Even if you're not that familiar with VBScript, it's easy enough to make some simple modifications.

Basically, that script just logs details about the received SMS to a text file.

In your case, what you'd do is create two similar scripts that logged to different text files.

In the 2-way command setup, you can configure different scripts to run based upon different criteria. One of these criteria is the "Receive Phone Number".

In the "Properties" for each "Modem" in the "SMSC" list, define the phone number associated with the phone modem.

Then, in your 2-way command setup, you can use the "Receive Phone number" to determine which script gets run for messages received from which modem.

--
Des
NowSMS Support