📄 fileformat.html
字号:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <META NAME="Title" CONTENT="SMS Server Tools 3"> <META NAME="Robots" CONTENT="INDEX,FOLLOW"> <META NAME="Language" CONTENT="English"> <title>SMS Server Tools 3</title><STYLE type="text/css">h3 { background-color: #DCDCFE;}blockquote { background-color: #FFD; font-size: 90%; padding:5pt; padding-top:1pt; margin-bottom:5pt; border-style: outset; border-color: #aaaa99; border-width: 0.05pt 2pt 2pt 0.05pt;}blockquote p:first-letter { font-size: 110%; font-weight: bold; color: red;}</STYLE> </head><body><h2><font color=blue>SMS Server Tools 3</font></h2><a href="index.html">Home</a><h3>SMS file format</h3><!-- START --><p><h3>Text messages</h3><p>An SMS file is a text file that contains the message and a header. You have tostore all SM you want to send in these files in the outgoing directory.The filename does not matter but it has to be unique. You may use themktemp command to generate unique filenames.<p>Easy example:<table border=1 bgcolor=lightgrey><TR><TD><font face="Courier New, Courier, monospace">To: 491721234567<br><br>Hello, this is the sms.</font></TD></TR></table><p>Write the phone number in <u><b>international format</b></u> without the leading +.When you like to send a message to a short number (for example toorder a ringtone), then preceed it with an "s".<p>More complex example:<table border=1 bgcolor=lightgrey><TR><TD><font face="Courier New, Courier, monospace">From: Stefan<br>To: 491721234567<br>Flash: yes<br>Alphabet: ISO<br><br>Hello Stefan, how are you?</font></TD></TR></table><p>You can add as many header lines, as you like. When the program finds an unknown header, it simplyignores that line. You can use the following header lines:<p><table border=1 bgcolor=lightgrey> <tr> <td bgcolor=yellow>From</td> <td>Senders name or phone number. This field has currently no function to the software. </td> </tr> <tr> <td bgcolor=yellow>To</td> <td>Receivers phone number in <u><b>international format</b></u> without the leading +. When you like to send a message to a short number (for example to order a ringtone), then preceed it with an "s". With version >= 3.1 the number can be given using grouped format, like <i>358 12 345 6789</i>. </td> </tr> <tr> <td bgcolor=yellow>Flash</td> <td>Boolean value. If yes, then the message appears directly on the phones display. Most phones support this feature, but not all.</td> </tr> <tr> <td bgcolor=yellow>Alphabet</td> <td>Tells the program what character set is used in this sms file. Possible values are <p> <table border=1 bgcolor="#F0F0F0" width="80%" align=center> <TR> <TD bgcolor=yellow align=center>ISO<br>Latin<br>Ansi</td> <td>Normal 8 bit character set, also called Ansi or Latin-1. All three keywords do the same. If the text is longer than 160 characters, then the program can split it automatically. This is the default.</td> </TR> <tr> <TD bgcolor=yellow align=center>GSM</TD> <td>7 bit character set, as described in the GSM specification, with one exception: The @ character is represented by the character code 0xB7. If the text is longer than 160 characters, the program can split it automatically. </td> </tr> <tr> <TD bgcolor=yellow align=center>UCS<br>Chinese<br>Unicode</TD> <td>UCS2 character set, maximum 70 characters. All three values do the same. The header must be written with an 8 bit character set but the message text part must be written with the 16 bit Unicode (big endian) character set. Please checkout the scripts directory, it contains some useful scripts for file format conversion. </td> </tr> <tr> <TD bgcolor=yellow align=center>binary</TD> <td>The short message contains 8-bit binary data, no text.</td> </tr></table> <br clear=all>The program checks only the first 3 characters of that line, therefore keywords like ISO-8859-15 or UCS-2 will also work fine. </td> </tr> <tr> <td bgcolor=yellow>UDH</td> <td>Only binary messages: Boolean value, tells if the message data contains a user data header. Default is true.</td> </tr> <tr> <td bgcolor=yellow>UDH-DATA</td> <td>Only text messages: User data header in hex-dump format. See <a href="udh.html">udh.html</a> and GSM 03.38.</td> </tr> <tr> <td bgcolor=yellow>SMSC</td> <td>Phone number of the SMSC. From version >= 3.1 this setting is ignored if there is no smsc set in the config file.</td> </tr> <tr> <td bgcolor=yellow>Provider<br>Queue</td> <td>Name of the provider, can be used to override the normal sorting algorithm configured by [provider] and [queues] in the config file. Both keywords do the same.</td> </tr> <tr> <td bgcolor=yellow>Report</td> <td>Boolean value. Controls if a status report is requested for this message. Without this line, the setting from config file is used.</td> </tr> <tr> <td bgcolor=yellow>Autosplit</td> <td>Controls if and how the program splits large text messages. Without this line, the setting from config file is used. The program does not split binary messages, Unicode messages and text messages with UDH.<br><table border=1 bgcolor="#F0F0F0" width="80%" align=center> <tr><td bgcolor=yellow>0</td><td>disabled</td></tr> <tr><td bgcolor=yellow>1</td><td>enabled, no part-number</td></tr> <tr><td bgcolor=yellow>2</td><td>enabled, text numbers</td></tr> <tr><td bgcolor=yellow>3</td><td>enabled, concatenated format (not supported by some phones)</td></tr></table> </td> </tr> <tr> <td bgcolor=yellow>Priority</td> <td>Available from version >= 3.0. Possible value is:<table border=1 bgcolor="#F0F0F0" width="80%" align=center> <tr><td bgcolor=yellow>high</td><td>Message is handled first when moving to spooler and when taking from spooler to sending</td></tr></table> </td> </tr> <tr> <td bgcolor=yellow>Validity</td> <td>Available from version >= 3.0. Defines a message validity period.Without this line, the setting from config file is used.<br><br>You can specify value as a number following one of the keywords: <b>min</b>, <b>hour</b>, <b>day</b>, <b>week</b>, <b>month</b> or <b>year</b>.Validity period will be rounded down to the nearest possible value.<br><br>If you do not use any of those keywords, value will have the following meaning:<table border=1 bgcolor="#F0F0F0" width="80%" align=center> <tr><td bgcolor=yellow>0 ... 143</td><td>(value + 1) * 5 minutes (i.e. 5 minutes intervals up to 12 hours)</td></tr> <tr><td bgcolor=yellow>144 ... 167</td><td>12 hours + ((value - 143) * 30 minutes) (i.e. 30 min intervals up to 24 hours)</td></tr> <tr><td bgcolor=yellow>168 ... 196</td><td>(value - 166) * 1 day (i.e. 1 day intervals up to 30 days)</td></tr> <tr><td bgcolor=yellow>197 ... 255</td><td>(value - 192) * 1 week (i.e. 1 week intervals up to 63 weeks)</td></tr></table>Incorrect values are ignored. </td> </tr> <tr> <td bgcolor=yellow>Voicecall</td> <td>Boolean value. Available from version >= 3.0.<p>With this feature the smsd will make a voice call to the receivers phone number given in To: header. If the receiver answers to the call, some DTMF tones are played.<br>The message text must start with TONE: keyword. After this there can be number and space, which is number of times to repeat the tone sending.Supported tones are #,*,0...9 and the tone list must be comma separated. <br>For example:<br><b>TONE: 1,2,3,4,5,6,7,8,9,0</b><br>- this plays all digits, and it's repeated 3 times which is the default.<br><br><b>TONE: 5 #,#,#</b><br>- this plays three #'s, and it's repeated 5 times.<br><br><b>TONE:</b><br>- some default tones are played 3 times.<br><br>After version >= 3.1 additional <i>TIME: number</i> definition can be used. After a time has reached, hang up is done.If a call is answered before a time is reached, normal sound playing is done.NOTE that this time counting starts after a command is given to the modem and there will besome delay before receiving device starts ringing.You should test this with your own handset to find a reasonable time which works fine in the network you are using.Example:<br><b>TONE: TIME: 15 2 #</b><br><br>Before using this feature to serious alarm purposes, you should test if this works with you modem/phone. Also notice that automatic redialing should be turned off in the phone's settings. </td> </tr> <tr> <td bgcolor=yellow>Hex</td> <td>Boolean value. Available from version >= 3.0.<p>Together with <b>Alphabet: binary</b> setting the binary data can be presented in hexadecimal format.<br>One byte should be presented with two hexadecimal characters, for example <b>0F</b>.Text can have empty lines and comment lines starting with /, ', # or : character.Also after hexadecimal bytes there can be a comment character marking the rest of line as a comment.<p>Special keyword available:<table border=1 bgcolor="#F0F0F0" width="80%" align=center> <tr><td bgcolor=yellow>STRING:</td><td>A normal string can be presented (without needing to type it in hex)</td></tr> <tr><td bgcolor=yellow>INLINESTRING:</td><td>As STRING:, but Inline String token and termination null are automatically added</td></tr> <tr><td bgcolor=yellow>LENGTH</td><td>Set this keyword to the place where the following bytes should be counted.Next LENGTH keyword will place the counted number to the place where the first keyword was. Nesting is not possible.</td></tr></table>See example below for more details. </td> </tr> <tr> <td bgcolor=yellow>Replace</td> <td>Numeric code 1...7. Available from >= 3.0.9.<p> If a receiving device and SIM supports "Replace Short Message Type n" -feature, a previously received message with the same code is replaced with a new message. Only the messages sent from the same originating address can be replaced. If there is nothing to replace, a message is stored in the normal way. </td> </tr> <tr> <td bgcolor=yellow>Include</td> <td>Filename. Available from >= 3.1.<p> Some parts of a message can be read from different file. If an included file contains only text part, it should begin with one empty line. </td> </tr> <tr> <td bgcolor=yellow>Macro</td> <td>Definition. Available from >= 3.1.<p> Syntax is: <i>Macro: name=value</i>. Multiple macros can be defined. All <i>name</i>'s found in the message body are replaced with a <i>value</i>. </td> </tr></table><p>Note: In case of boolean values you can use true, yes, on or 1 for positive values. All other words are interpreted as negative.<p>Available from >= 3.0. After a message is sent, there will be automatically generated Message_id header line <b>if</b> a status report was requested.With version >= 3.1 there will also be Sent timestamp:<table border=1 bgcolor=lightgrey> <tr><td bgcolor=yellow>Message_id</td><td>ID number of a sent message.</td></tr> <tr><td bgcolor=yellow>Sent</td><td>Time when the message was sent by the program.</td></tr></table><p>Available from >= 3.0.6.<table border=1 bgcolor=lightgrey> <tr> <td bgcolor=yellow>Modem</td> <td>Name of the modem which was used to send this message.</td> </tr></table><p>Available from >= 3.0.9.<table border=1 bgcolor=lightgrey> <tr> <td bgcolor=yellow>IMSI</td> <td>International Mobile Subscriber Identity from the SIM, if this request is supported.</td> </tr></table><p><h3>Binary data</h3><p>The data begins after the empty line and goes until end of file. No conversion is applied to the data. Data messages are limited to 140 bytes.<p>Example:<p><table border=1 bgcolor=lightgrey><TR><TD><font face="Courier New, Courier, monospace">To: 491721234567<br>Alphabet: binary<br>UDH: true<br><br>gs2389gnsakj92"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -