SMS from/to File
Ozeki SMS Gateway's File User is capable to send and receive SMS messages in different file formats. This guide will show you how to install and configure a File User by selecting the file format and the location of the following message boxes: Inbox, Outbox, Sent, Failed, Delivered.
Supported file formats:
Ozeki SMS Gateway's File User is capable to save SMS messages in the Inbox and send SMS messages from the Outbox. The default folder location for the incoming/outgoing messages are 'C:\smsTemp\smsin' and 'C:\smsTemp\smsout'. The outgoing messages are periodically checked in every 10 seconds as default, but you can always configure it. If you already have a File User installed, please jump to general configuration below.
In case you do not have a File User, you can easily install one with Ozeki SMS Gateway's browser GUI.
Installing File User
Start with installing a File User in Ozeki SMS Gateway by clicking the 'Add' button on the right side panel of the 'Management' page. The button is on the 'Users/Applications' panel (Figure 1).
On the new page you will see two panels. The left hand panel is called 'Users/Applications'. It contains the list of installed users. Each of them have a unique username and on the bottom of this panel you will see the actual number of users. On the right hand you can see a panel called 'Add user or application'. It contains a list of user and application types that can be installed. You can see a small description after each type in the list.
Please click the 'install' button next to 'TXT file', which is the File User (Figure 2).
On the next page you will need to provide a unique name for your File User and click 'OK'. The name should differ from all user and application names.
Configuring File User
You should start with the 'General' tabpage on your File User's 'Configuration' panel (Figure 3). This page comes up directly after providing a unique username.
On the upper section called 'Settings', please select the file format from the dropdown menu. Our video tutorial explains how to use the Text format, but more file types are discussed below.
Directly under the dropdown menu, you can set the time period for checking the directory for new messages. This textbox accepts every positive whole number which represents the time period in seconds. It is 10 seconds as default:
These tabpages contain editable fields with the following default values:
The location of the message files determine their status. Each directory represents a specific status. You can always modify these directories (Figure 4)
Sending SMS message from File User
Both your application and Ozeki SMS Gateway's engine will work on the Outbox folder, which has a default location at C:\smsTemp\smsout Both software shouldn't work simultaneously on the same files. You can append each file with a '.lock' extension, so only your application can modify them while SMS Gateway should not reach them.
Outgoing messages can be stored in 4 directories:
Locking Files to avoid conflicts:
You can easily send SMS messages with your application by creating a locked file in the Outbox directory. It is identified by the '.lock' extension appended to the filename. Ozeki SMS Gateway will not try to read locked files, since they can still be edited by your application. Please delete the locked file when finished.See how to use locked files:
1.) Create: C:\smsTemp\smsout\mysms.sml.lock
2.) Create: C:\smsTemp\smsout\mysms.sml
3.) Delete: C:\smsTemp\smsout\mysms.sml.lock
After your company's application has finally unlocked the file, Ozeki SMS Gateway's SMS engine will read the file and delete it. A new file will be placed in the smssent or smsfailed directory depending on the outcome. In the outcome directories the same locking mechanism works.Understand it by examining the following diagram:
Your SMS service provider can send delivery reports of sent, refused and delivered messages to your Ozeki SMS Gateway. If a message file is placed in the 'sent' directory, it means it was sent by the SMS service provider. If it has reached it's final destination, a text file will be created in the 'delivered' folder and the same locking steps apply on it.
Accepted File formats
Ozeki SMS Gateway's File User supports useful file formats like simple, text, verbose, list, XML, CSV and more. You can send and receive messages in any available file format. Scroll to the top to see the whole list. You can select the preferred file format from the 'General' tab of the File User's 'Configuration' panel.
It stores each SMS message in separate files.
You can select the 'Simple' file format from the dropdown menu as seen on Figure 3. All 'Simple' files have the name of either the sender or recipient. The difference is that both incoming and outgoing messages arrive in a separate folder discussed above. The message content is in the file. For example here is an outgoing message:c:\smsout\+3620310536
The side effect is hidden in the name convention. No files can be in a single directory with the same name. Which means you can only send one message at a time to a single recipient. To send multiple messages you need to wait Ozeki SMS Gateway to delete the last message before you can insert the new one. Vice versa you can only read and delete one message at a time from the same sender. If Ozeki SMS Gateway receives multiple messages from the same sender then the newest message will count. Since the new message always overwrites the old one. Please take these facts into consideration before selecting the 'Simple' file format from the dropdown menu.
It can be easily used for position tracking. For example the new coordinates can overwrite the old ones. You can track vehicles that are set to send their coordinates periodically in SMS. In this case the File User of Ozeki SMS Gateway stores the last coordinate in 'Simple' file format.
It stores every SMS message in a separate file, although they can have unique filenames.
The Verbose format can store multiple message files from the same sender and multiple message files to the same recipient. These files have an '.sms' file extension and contains more information as the 'Simple' format. The first line in these files consists of the sender's phone number, the second line is the recipient's number while the message text is in the third line. Do not forget that each message is stored in different files.
This is how a file in 'Verbose' format looks like:c:\smsout\anyname.sms
It stores multiple SMS messages in a single file.
'List' file format enables Ozeki SMS Gateway to comfortably send and receive a massive amount of messages. Multiple SMS messages are stored in a single '.sml' file. As an example it can look the following way:c:\smsout\list.sml
You can see that each line contains a message with the recipient's or sender's phone number, depending on which folder the file is stored in. Each phone number and message pair is separated by a space. If you would like to send SMS messages, please place your file into the Outbox folder.
Works the same way as the 'List' fileformat. The only difference is that text files have a '.txt' file extension.
You should place the text files in the output folder for sending as you can see in the video on the top of the page. For example you can save it in the default folder at 'C:\smsTemp\smsout\mysms.txt'.
'XML' file format is used for sending and receiving SMS messages with Ozeki SMS Gateway.
The following XML format is used by Ozeki SMS Gateway:
<originator>: These tags surround the sender's phone number.
Configuring user Log Generation
Check out the 'Logging' tabpage on the File User's 'Configuration' panel to manage user logs. If you place a tick in both checkboxes (Figure 6), it helps you to debug communication problems. It is capable to log the SMS message flow and low level communication related to the File User.
Below the checkbox you can find the 'Log file settings' groupbox with file related settings. The default log directory is C:\Program Files\Ozeki\Ozeki10\Data\NG\Logs, but you can always modify it. The maximum size of each log file and the maximum number of log files can also be set. If a log file gets bigger than the maximum file size, Ozeki SMS Gateway creates a new File. If the maximum number of log files have been reached, the oldest file should be replaced. The textbox to set this is called 'Number of rotated files'.'Logging' tabpage's default values:
If you like these default values, please do not change the boxes.
These settings can be reached on the 'Advanced' tabpage (Figure 7). Here you can set the user's login details for Ozeki SMS Gateway, which are the username and password pair. You should also specify the sender's address.
In the middle section you can change the 'Type of Addressbook' to SQL, LDAP or File then configure it on your left-hand.
The lower sections contains an 'Allow routing table override' option, which automatically selects the most suitable service provider for each message. You can also 'Enable accounting for this user' which applies the credit limit for this File User. A cost of a single SMS is one credit. You can add credits by clicking 'Settings' on the left hand panel.
Here you can set the time period for the File User to send messages. The Outbox folder will not be checked by Ozeki SMS Gateway's File User until the start of the schedule. SMS Scheduling is turned off as default (Figure 8).
If you have finished the configuration of your File User, please save it by clicking 'OK'.
You can always come back to check events or modify configuration. You can do this by selecting your user on the 'Users/Applications' panel and clicking appropriate button on the left hand panel (Figure 9)