File plugin - file formats
This section presents the file formats you can select on the file plugin configuration page for file-to-sms gateway functionality.
THE SIMPLE FILE FORMAT
When you select the simple file format, each incoming message is saved in a separate file. The name of the file is the phone number and the first row of the file contains the message. (Figure 1.)
c:\smsout\+36203105366
Hello world |
If you want to send messages using the simple file format, you should create a separate textfile for each outgoing message and place these files into the smsout directory.
THE VERBOUSE FILE FORMAT
The verbouse file format is similar to the simple file format in a way that each message resides in a separate file. The difference is that it contains more detailed information about the SMS messages. The main advantage of this file format is that more than one message could be placed into the same directory with the same destination.
If you want to send messages using this format, make sure that the extension of the file name that is placed into the outgoing directory is .sms and the file format is the following:
The first row of the file is the sender's phone number, the second row contains receiver phone number and the message text follows these in the next row. Take a look at the example:
c:\smsout\valamilyennev.sms
c:\smsout\anyname.sms
+36203105366 |
THE LIST FILE FORMAT
The list file format is a convenient way to send and receive a large number of sms messages. In this case more than one message is stored in the same file. The format of the file can be seen below.
For outgoing messages you should create a text file, where each line contains a message. The messages consist of a phone number in international format and the message text. The phone number and the message text is separated by a space character.
When an outgoing file is ready to be sent it should be placed into the smsout directory. The name of the file should have the .sml extension. (sml stands for sms list)
c:\smsout\lista.sml
c:\smsout\list.sml
+36205555366 a message |
THE XML FILE FORMAT
The XML file format you can use is:
<Envelope> <MessageType>SMS:TEXT</MessageType> <Originator>+36203105366</Originator> <Recepient>+36209937723</Recepient> <Subject>Hello world</Subject> </Envelope>
You should place this text file into the c:tmpsmsout directory. For example you can save it as "c:\tmp\smsout\mysms.txt"
Please note that if you wish to change the file extension to xml from txt, you must modify the extension setting on the "Special" tab of the file plugin configuration form.