The key component of the SMSrelay Suite is SMSRelay. This is the application that does the actual work of taking an XML text file, parsing it, sending the contents as an SMS TXT and then archiving the file.
Introduction
SMSRelay is an application designed to run on a server with internet access. It monitors a particular designated network share for XML text files. These XML files contain a telephone number , a message and a sender.
When SMSRelay finds one or more of these files it reads the information and then sends it as an SMS message via the 2SMS gateway. It then moves the XML file to the ‘Sent’ directory and appends the date and time to the filename.
SMSRelay has two interface skins which are chosen by editing the configuration file. The two different interface skins are shown below.
Features
SMSRelay handles messages longer than the 160 characters allowed by the SMS protocol. It does this by automatically splitting the message for you, and sending it as two consecutive SMS messages.
A default ‘signature’ can be setup within the SMS settings file, for example: ‘ - From: Arten Science’. This can be overwritten on an individual message basis by specifying the <From> parameter in the SMS message file, for example: ‘ - From: Steve’.
The window of SMSRelay, if using the FUNKY skin, although irregularly shaped and having no title bar, can be dragged to a new position on the screen by clicking anywhere around the edge of the window and then dragging.
For both skins the window position is saved when the program is closed and it reopens in the same position next time. I have prevented the program from saving the co-ordinates of any additional monitors, because of the problems that can occur if the additional monitor is subsequently removed.
Configuration
Configuration settings are stored in the SMSRelayGeneralSettings.Xml file. This can be edited with any text editor.
Username
<UserName>steve@artenscience.co.uk</UserName>
This is the logon to your account at 2SMS.
Password
<PassWord>letmein</PassWord>
This is the password to your 2SMS account.
Note: Access to the SMSRelay program directory should be restricted.
Incoming Message Path
<IncomingMessagePath>\\SERVERNAME\Waiting</IncomingMessagePath>
This is the path where Outgoing messages are looked for by SMSRelay
Sent Message Path
<SentMessagePath>\\SERVERNAME\Sent</SentMessagePath>
This is the path where Sent messages are put by SMSRelay
From
<From>ArtenScience</From>
This is the default “from’ setting for each SMS Message and is appended to the message.
Interval
<Interval>60000</Interval>
How often SMSRelay polls for new messages, in milliseconds. 60000 = 1 Minute.
Screen Style
<ScreenStyle>FUNKY</ScreenStyle>
ScreenStyle accepts two parameters:
FUNKY
YAWN
FUNKY gives you a modern/retro colourful interface with a non standard shape and YAWN gives you a simple Windows style interface with dull unimaginative colours and layout, but it does have slight transparency which adds a little bit of sex appeal.
Test Status
<TestStatus>FALSE</TestStatus>
For Production use this setting should be set to FALSE.
Interfacing 3rd Party Applications with SMSRelay
To enable your applications to create files that will be sent as SMS messages by SMSRelay, it is necessary to do two things.
Create an XML text file
Save this file in the ‘Waiting’ directory
The format of the text file is as follows:
<?xml version="1.0" encoding="utf-8"?>
<SMS>
<Number>NUMBER_HERE</Number>
<Message>MESSAGE_TEXT_HERE</Message>
<From>SENDER_HERE</From>
</SMS>
The parameters shown in blue should be replaced by the telephone number of the recipient, the message text you want to send and the senders name.
Test / Debug Mode
SMS Relay has a Test/Debug Mode built in:
Set Parameter in SMSRelayGeneralSettings.Xml to TRUE
With TEST Mode enabled two extra buttons appear on the screen, TEST A and TEST B. In addition, in Test Mode automatic polling of the ‘Waiting’ directory is disabled.
Test A
Test A is designed to test the interface from SMSRelay to the SMS Server. An SMS Message is sent using the following details from the SMSRelayGeneralSettings.Xml file.
Mobile Number: <TestNumber>07525754153</TestNumber>
Message: <TestMessage>This is a Test</TestMessage>
In addition the Version and Build Number of SMSRelay and the Date and Time are appended to the end of the test message.
Information relating to the test is shown on the SMSRelay screen.
Test B
Test B is designed to test the complete operation of SMSRelay. It will effectively run the same routine that the polling system does, but it does it just the once. This is useful for running a controlled sequence of tests.
Notes and Tips
The ‘Sent’ directory will eventually be populated with hundreds or thousands of small Xml files, this will eventually degrade performance. It would be wise to instigate an archive procedure at a regular interval to clear down this directory.
SMSRelay does not have to run on the same computer as the directories where the files are stored. It does however need Read/Write access to those two directories.
If your SMS messaging needs are not urgent SMSRelay could be launched to run overnight and take advantage of cheaper text messages.
If you are running a screen DPI setting other that the standard 96 DPI you may have problems with the windows displaying incorrectly. To adjust the DPI setting go to the Display Control Panel, select the Settings tab then the Advanced button. The DPI can be selected from the DPI Setting drop down menu. Future versions of SMSRelay will cater for non standard DPI settings automatically.
SMSRelay is designed to work with 2SMS as the provider of the SMS Gateway.
http://www.2sms.com/secure/default.aspx
2SMS provides trial accounts with twenty free messages if you do not already have an account and you wish to evaluate the trial version of SMSRelay.
Requirements
Required Files
SMSRelay.Exe
SMSRelayGeneralSettings.Xml
SMSRelayScreenSettings.Xml
System Requirements
Microsoft Windows XP, 2003, Vista
.NET Framework V2.0 Installed
Internet Access Required
Shared Directory Required
Trial Version Limitations
The words ‘Trial Version’ shown on the screen.
The words ‘**SMSRelay Trial_Version ** appended to the end of each txt message.
In my next post I’ll discuss the Cross Platform SMS Client software, ArtenSMS.
"Everything you do in life, every choice you make, has a consequence. When you do things without thinkin', then you ain't makin' the choice. The choice is makin' you." - Mark Steven Johnson
Tuesday, 3 June 2008
SMSRelay Suite: SMSRelay
Labels:
stevechol ArtenScience,
stevechol SMSRelay
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment