SendSMS Manual |
manual.htm | manual |
sendsms.faq | frequently asked questions |
sendsms[.exe] | program-file |
sendsms.cf_ | original configurationfile |
sendsms.cfg | from setup generated configurationfile |
sendsms.err | error-codes |
sendsms.pro | definition of providers |
sendsms.pbk | example for a phone book |
group.sms | example for a group-definition (to send messages to multiple recipients) |
After running setup you should edit the file sendsms.pro and delete all not required provider definitions. For some providers there are multiple definitions (modem, ISDN, GSM) preconfigured, from which you should delete all not required or move the one you use to the top.
Attention, before any automated call of SendSMS test wether the hang-upprocedure (ESCAPE-Sequence or dropping DTR) works with your local modem.
In the DOS-version is a DPMI-Server (cwsdpmi.exe) included. The whole package can be downloaded from csdpmi4b.zip.
In the Unix-versions the owner of the file sendsms must have enough rights to use the modemdevice and to create files (in the spool-directory, lock-directory, ...) and the Set-User-ID Bit has to be set.
In the file sendsms.pro you can define the different providers (which provider uses TAP or UCP, which phonenumbers are to be used for them and what is the predial-code for them).
Your personal phone book with aliases can be defined in the file sendsms.pbk.
Comments are always prefixed by ';'.
All configuration files will be searched by default in the directory from which SendSMS is called. This can be changed by specifying explicit a configurationfile on the command line or by setting the environment variable SendSMS. In the latter case the value of this environment variable will be used as the searchpath for the configurationfiles.
In the chapter [SendSMS] you can specify the following keywords to configure SendSMS. Every keyword has to be entered in an own line.
BINLOCKS=0
Specifies whether the lockfile should be binary or ascii (only unix).
FOOTER=
Specifies an optional footer line (text which will be appended to every message)
[only available in the registered version]
GSMTIMEOUT=60
Specifies the time (in seconds) to wait for a response from the service-
computer using the GSM-protocol.
HEADER=
Specifies an optional header line (text which will preceed every message)
[only available in the registered version]
ISDNPHONE=24
Specifies the phone number of the ISDN adapter (if you are using CAPI 2.0). Here you have to enter
the number of the line to which the ISDN adapter is connected. Using a PBX this is the internal
number. If you specify no or a wrong number it is possible that you can't get any connection.
LOCKDIR=/var/spool/uucp
Specifies the directory to look for and to generate a lock-file
(only unix).
LOGFILE=sendsms.log
Specifies a file in which all actions will be logged. If you specify
'syslog' (only unix) the logging will be handled through the syslog-daemon.
[only available in the registered version]
MAXERRORS=
Specifies the count of errors (not transmitted messages) to accept until SendSMS
will be terminated. If this parameter isn't set or is set to 0 the program will
not terminate after an error. This parameter has only sense if you send messages
to multiple recipients. In server mode this parameter is ignored.
PHONE=
Your own phonenumber, from which the message will be submitted.
PRIORITY=-5
With this you can set the priority to execute SendSMS (not DOS or Windows).
The value has to be in the range from -15 (high priority) to 15 (low priority).
RECEIVEDIR=received
Specifies the directory where received SMS's should be saved (GSM).
[only available in the registered version]
REDIALCOUNT=3
Specifies the count of redial-attempts (see RETRYCOUNT, too).
[only available in the registered version]
REDIALDELAY=60
Specifies the count of seconds to wait between two dial-attempts. While this
time the modem will not be locked.
[only available in the registered version]
RETRYCOUNT=3
Specifies the max. number of retrys to send a message. In server-mode this
means how often the message is leaved in the spool directory. In opposit to
REDIALCOUNT this will take effect after every faulty transmission and not
only if there is no available modem or the connection is not established.
(after faulty transmission)
[only available in the registered version]
RETRYDELAY=60
Specifies the count of seconds to wait between two dial-attempts. While this
time the modem will not be locked.
[only available in the registered version]
SHOWURL=0
Suppress appending 'http://www.bai.de' to the outgoing message.
[only available in the registered version]
SHOWSENDSMS=0
Suppress appending 'SendSMS from ...' to the outgoing message.
[only available in the registered version]
SPOOLDIR=/var/spool/sendsms
Specifies the directory to spool messages.
[only available in the registered version]
TAPTIMEOUT=30
Specifies the time (in seconds) to wait for a response from the service-
computer using the TAP-protocol.
UCPTIMEOUT=60
Specifies the time (in seconds) to wait for a response from the service-
computer using the UCP-protocol.
UNSENTDIR=unsent
Specifies a directory in which unsent messages (server mode) are archived.
VALIDITYPERIOD=3
Specifies the count of days or - if the last character is a M - the count of minutes
the SMS will be valid.
This is the period for how long the message will be saved on the
service-computer, if it can't be delivered now.
In the chapter [Device] you can specify the following keywords to configure your modem. Every keyword has to be entered in an own line. (Please check your modem-description (if you have one) for the corresponding modem-commands)
BAUD=4800
Specifies the baudrate (300, 600, 1200, 2400, 4800 or 9600). This value is
only used if it isn't defined in sendsms.pro for the provider to be called.
BEEP=AT#VTS=[960,0,6]
Specifies a command to generate a tone signal (recoding of a voice message with a voice modem).
CONNECTTIMEOUT=40
Specifies the time (in seconds) to wait for a connection after the
dial-command.
CONTROLLER=1
If you are using multiple ISDN adapters in your computer you specify here to which adapter
the definiton belongs.
DATABITS=8
Specifies the count of databits (7 or 8). This value is
only used if it isn't defined in sendsms.pro for the provider to be called.
DEVICE=COM1
Specifies the device to which your modem is connected.
(Attention: on unix you have to take notice that the owner of the file sendsms
is allowed to use the device). Under DOS you can additionally specify, seperated by comma,
the Portaddress (in hex) and the IRQ of the device, if it isn't the standard
(for example COM1,3f8,4).
If you are using CAPI 2.0 you have to specify the path to the CAPI-DLL (Windows, OS/2) or to the CAPI-device (Unix) here. Under DOS you specify the IRQ for accessing the CAPI (ex.: DEVICE=IRQ F1);
DEVICETYPE=Modem
Specifies the kind of hardware to be used for communication (Modem, Voice-Modem, GSM 07.05 or CAPI 2.0).
DIALPREFIX=ATDT0w
Specifies the command to dial a number.
Using the CAPI interface with a PBX you can specify here the number ti get a line (normally 0).
DIALSUFFIX=
For some modems/ISDN-Terminaladapters it is required to append some additional
AT-commands to the phonenumber. This commands can be defined here. This value is
only used if it isn't defined in sendsms.pro for the provider to be called.
ESCAPE=+++
Specifies the escape sequence to switch the modem from data- to command-mode.
ATTENTION! The escape sequence is only used, if you explicity
specify it. If not specified the DTR-signal will be dropped for one
second. Define the escape sequence only if dropping DTR doesn't work.
HANGUP=ATH
Specifies the command to hang up.
INIT=ATQ0E1V1L1
Specifies the initialization-command for your modem. You have to set your
modem to:
INIT2=
Sepcifies a second initialization-command for your modem.
LINETYPE=ANALOG
Specifies the kind of phone line (ANALOG or ISDN). This parameter can also be defined within a
provider definition. SendSMS will automatically select a corresponding device for
a selected provider.
For example: If you select the provider D1_ISDN (LINETYPE=ISDN) then only Devices which are also
defined with LINETYPE=ISDN are used.
PARITY=NONE
Specifies the kind of parity (NONE, EVEN or ODD). This value is
only used if it isn't defined in sendsms.pro for the provider to be called. This command will be
executed after the standard-initialization. For some GSM-cards it is necessary to specify a
memoryaddress (AT+CPMS="ME") what can be done with this parameter.
PIN=1234
Specifies the PIN for your SIM (GSM-Module). If you are using a GSM-card which doesn't require
any PIN (AT+CPIN? doesn't work) you have to leave this blank.
RESET=ATZ
Specifies the command to reset your modem (normally ATZ).
RTSCTS=1
Specifies to use the hardware flowcontrol.
STARTVOICEMODE=AT#CLS=8
Specifies the command to set a voice modem to voice mode. This is required for recording/playing
voice messages.
STOPBITS=1
Specifies the count of stopbits (1 or 2). This value is
only used if it isn't defined in sendsms.pro for the provider to be called.
STOPVOICEMODE=AT#CLS=0
Specifies the command to cancel voice mode (voice modem).
VOICERECEIVE=AT#VTX
Specifies the command for a voice modem to start voice receive mode (recording of voice messages).
VOICETRANSMIT=AT#VTX
Specifies the command for a voice modem to start voice transmit mode (playing of voice messages).
WAITAFTERWRITE=1
Specifies the count of seconds to wait after writing to the device
(normally 0)
XONXOFF=1
Specifies to use the software flowcontrol.
B1PROTOCOL=64K-HDLC
With this parameter you specify which B1-protocol (ISDN, physical layer) should be used. This is only required if
the connection is established with CAPI and the provider doesn't support the default protocols.
Using an ISDN-terminal adapter you have to select the protocol with an AT-command in MODEMINIT.
Following selections are possible:
64K-HDLC | 64 kbit/s with HDLC framing |
64K-TRANS | 64 kbit/s bit-transparent operation with byte framin from the network |
V.110-ASYNC | V.110 asynchronous operation with start/stop byte framing |
V.110-SYNC | V.110 synchronous operation with HDLC framing |
T.30-FAX3 | T.30 modem for fax group 3 |
64K-INVERT | 64 kbit/s inverted with HDLC framing |
56K-TRANS | 56 kbit/s bit-transparent operation with byte framing from the network |
MODEM-NEGOTIATION | Modem with full negotiation |
MODEM-ASYNC | Modem asynchronous operation with start/stop byte framing |
MODEM-SYNC | Modem synchronous operation with HDLC framing |
B2PROTOCOL=X.75-SLP
With this parameter you specify which B2-protocol (ISDN, data link layer) should be used. This is only required if
the connection is established with CAPI and the provider doesn't support the default protocols.
Using an ISDN-terminal adapter you have to select the protocol with an AT-command in MODEMINIT.
Following selections are possible:
X.75-SLP | ISO 7776 (X.75 SLP) |
TRANS | Transparent |
SDLC | SDLC |
LAPD-X.25 | LAPD in accordance with Q.921 for D channel X.25 |
T.30-FAX3 | T.30 for fax group 3 |
PPP | Point-to-Point Protocol |
IGNORE | Transparent (ignoring framing errors of B1 protocol) |
MODEM | Modem with full negotiation |
X.75-SLP-V.42 | ISO 7776 (X.75 SLP) with V.42 bis compression |
V.120-ASYNC | V.120 asynchronous mode |
V.120-ASYNC-V.42 | V.120 asynchronous mode with V.42 bis compression |
V.120-TRANS | V.120 bit-transparent mode |
LAPD | LAPD in accordance with Q.921 |
B3PROTOCOL=TRANS
With this parameter you specify which B3-protocol (ISDN, network layer) should be used. This is only required if
the connection is established with CAPI and the provider doesn't support the default protocols.
Using an ISDN-terminal adapter you have to select the protocol with an AT-command in MODEMINIT.
Following selections are possible:
TRANS | Transparent |
T.90NL | T.90NL with compatibility to T.70NL |
X.25-DTE-DTE | ISO 8202 (x.25 DTE-DTE) |
X.25-DCE | X.25 DCE |
T.30-FAX3 | T.30 for fax group 3 |
T.30-FAX3-EXT | T.30 for fax group 3 extended |
MODEM | Modem |
BAUD=4800
Specifies the baudrate (300, 600, 1200, 2400, 4800 or 9600). If this parameter
isn't specified the value from sendsms.cfg will be used.
BDATALEN=1024
Specifies the max. length of data blocks (CAPI; this is not the length of a message).
The value has to be in the range between 128 and 2048.
CIP=UNRESTRICTED-DIGITAL
With this parameter you can specify (normally not required) a CIP-value
(Compatibility Information Profile) for connections with CAPI.
Using an ISDN-terminal adapter you have to select the CIP-value with an AT-command in MODEMINIT.
Following selections are possible:
SPEECH | Speech |
UNRESTRICTED-DIGITAL | unrestricted digital information |
RESTRICTED-DIGITAL | restricted digital information |
3.1KHZ-AUDIO | 3.1 kHz audio |
7KHZ-AUDIO | 7 kHz audio |
VIDEO | Video |
PACKET-MODE | packet mode |
56KBIT-RATE-ADAPTION | 56 kbit/s rate adaption |
UNRESTRICTED-DIGITAL-WITH-TONES | unrestricted digital information with tones/announcements |
TELEPHONY | Telephony |
DATABITS=8
Specifies the count of databits (7 or 8). If this parameter
isn't specified the value from sendsms.cfg will be used.
DIALSUFFIX=
For some modems/ISDN-Terminaladapters it is required to append some additional
AT-commands to the phonenumber. This commands can be defined here. If this parameter
isn't specified the value from sendsms.cfg will be used.
LINETYPE=ANALOG
Specifies the connectiontype of the specified phone number (fpr that provider) (ANALOG or ISDN).
This parameter can also be defined within a device definition. SendSMS will
automatically select a corresponding device for a selected provider.
For example: If you select the provider D1_ISDN (LINETYPE=ISDN) then only Devices which are also
defined with LINETYPE=ISDN are used.
MAXMSG=
Specifies the max. count of messages which can be send in a single connection.
If this parameter is specified the connection is canceled after the
corresponding count of messages is sent and if required a new connection
will be established. This is neccessary because some providers have a limit
for sending multiple messages per connection.
MODEMINIT=
Specifies an additional initialize command for the modem. This command is called
after the initialize command defined in sendsms.cfg and doesn't substitute
it. Commonly this command can be left blank. It is only needed, if you want
to force your modem to use a specific protocol. For example you should use
V.42/LAPM for providers using UCP (that is AT&Q5 for my modem).
MSGLEN=
Specifies the max. length of a message (number of characters respectively number of seconds).
If the protocol is SKYPER or SCALL (German pagers) then this parameter is set automatically.
In the unregistered version the max. length is limited to 60 characters or 5 seconds.
MSGTYPE=
Specifies the kind of message: NUMERIC (only digits), ALPHANUMERIC
(characters and digits) or TONE (no characters, only beeping). If the
protocol is SKYPER or SCALL (German pagers) then this parameter is
set automatically. In case of Scall and Skyper the modem has to be configured for not
filtering XON/XOFF characters.
PASSWORD=
For some providers a password is required, which you can specify here.
PARITY=NONE
Specifies the kind of parity (NONE, EVEN or ODD). If this parameter
isn't specified the value from sendsms.cfg will be used.
PHONE=
Specifies the phonenumber of the provider. If the last character of the number
is a '&', this means that the specified number will be appended by the number
of the recipient.
If you are using the GSM-protocol you have to enter the SMSC-address in the form
+<a><b><c>, where <a> is the countryprefix (without zeros),
<b> the cityprefix (without zero) and <c> the phonenumber specifies.
This parameter can be defined multiple times.
PREFIX=
Specifies the predialcode for the corresponding provider. With this prefix
SendSMS tries to identify the provider to which the phonenumber of the
recipient belongs.
This parameter can be defined multiple times.
PROTOCOL=
Specifies the protocol (TAP, UCP, GSM, Scall or Skyper) which the
provider uses.
REMOVEPREFIX=
The number of the recipient will be send together with the corresponding message.
Because for some providers the number has to be send without any prefix you can
specify with this parameter (=1) that the PREFIX (if defined) will be discarded.
TRANSTABLE=tap.ctt
Specifies a character translation table (see also Character Translation Tables).
STOPBITS=1
Specifies the count of stopbits (1 or 2). If this parameter
isn't specified the value from sendsms.cfg will be used.
WAITAFTERCONNECT=
For some providers (using the UCP-protocol) there must be a delay between the
Connect-message of the modem and the first outgoing message. This parameter
specifies the duration in seconds of this delay.
This seems only be necessary if your modem isn't set to V.42/LAPM. So the
better way is to set in MODEMINIT (see below) such an AT-command.
[D1] PHONE=01712092522 PROTOCOL=TAP PREFIX=0171 MSGTYPE=ALPHANUMERIC MSGLEN=160
<alias>=<phone>
The phone book is only available in the registered version!!!!
[D1] wobo=01714160598 ; Wolfgang B÷cherer
sendsms -PVOICE 07246942484 -Fvoice.datoder
sendsms -PVOICE 07246942484 < voice.datIn both cases the specified number will be called and the voice message stored in the file voice.dat will be played.
To record a voice message the filename you specify with the parameter -F has to start with a masterspace (@).
If you are using a GSM-device you have the ability to receive and store SMSs (-Q).
To spool messages you can call SendSMS or you can generate the spool-files by yourself (ASCII-format).
sendsms [options] {phoneNo | alias | @<inputFile>} [{message | < msgFile}]
options are:
-p<provider> | specifies the provider for the corresponding phonenumber |
-f<msgFile> | specifies a filename which contents will be send as the message |
-c<cfgFile> | specifies the configuration-file (sendsms.cfg) |
-r<proFile> | specifies the provider-definition-file (sendsms.pro) |
-b<pbkFile> | specifies the phone book file (sendsms.pbk) |
-q<n> | start SendSMS as a server and check queue every <n> minutes; without reading incoming SMSs |
-Q<n> | start SendSMS as a server and check queue every <n> minutes; incoming SMs will be read and stored |
-U<userexit> | specifies a program/batch file which will be launched when a message as been sent or received (Servermodus) |
-s | spool messages (even if there is no server running) |
-n | start SendSMS standalone (even if there is a server running) |
-t<character translation table> | selects the character set for the message (iso8859 or cp850) |
-o<originator> | sets the originator of the message (default is the user ID) |
-i | installs SendSMS (server mode) as a service (WindowsNT only) |
-x | uninstalls the service SendSMS (WindowsNT only) |
-v | verbose, shows the communication with the modemdevice on the screen |
Ex.: sendsms 0171xxxxx "I am testing SendSMS"
You have to specify at least one parameter - the phonenumber of the recipient or an alias (form the phone book). If this first parameter starts with a masterspace (@), the parameter specifies the name of a file which contains multiple phonenumbers. With such a file it is possible to send one messages to multiple recipients. The specified file must have the following format:
[<provider1>] PHONE=<number1> PHONE=<number2> PHONE=<number3> PHONE=<alias1> PHONE=<alias2> [<provider2>] PHONE=<number4>
Inclosed in brackets ([]) you have to specify providers (which are defined in sendsms.pro), followed by multiple lines with phonenumbers of recipients. Every line contains a phonenumber (PHONE=...) of a recipient (number or alias), which belongs to the corresponding provider and to which the message should be send in one connection. In the above example the message will be send to 5 recipients of <provider1> using the same connection. The message will also be send to one recipient of <provider2>.
The second parameter is the message, enclosed by ' (ATTENTION: depending on the shell you are using some characters are substituted by the shell (for example '!') or you have to enclose the message by " instead of '). Alternativly you can specify the message by redirecting it from a file (< msgFile) or with the Parameter -F<msgFile>, where <msgFile> is the name of the file that will be send (at least the first n characters). If you specify only one parameter on the command line (the recipient), the message will be read from the console until you enter a line only consisting of a single '.'. If you want to send a message to a provider, which can't be identified by the predial-code of the recipients phonenumber you have to specify the corresponding provider (as defined in sendsms.pro) with the parameter -P<provider>. For Example: you want to send a message to a Quix-Pager. SendSMS can't recognize the provider (Quix_News), because the number has no predial code. That's why you have to specify -PQuix_News.
If you start SendSMS with the parameter -q<n> (in that case all other parameters are ignored), SendSMS works as a server and checks every <n> minutes the spool directory (<n> = 0 means to check only one time and terminate). If there are spooled messages they will be sent with a minimum number of connections. If there runs a server every new instance will be started in spoolmode. This can be manipulated with the parameters -s (always spool) and -n (never spool).
The -t parameter specifies in which character set the message is entered. By default SendSMS uses under DOS, OS/2 and WindowsNT the codepage 850 (cp850) and under Windows 3.x and all Unix-versions ISO-8859 (iso8859). If the message is not entered in the standard character set then you have to specify this parameter.
With the parameter -U you can define an userexit. This is an external program or script, which will always be called by SendSMS when a message has been sent or received or when a message couldn't be sent (only if running in server mode). The called program gets the following 4 command line arguments:
sendsms -PD1 01714160598 "This is a test message"
The message "This is a test message" will be sent to the specified number using the provider D1.
wird an die angegebene Nummer gesendet. Der zu verwendende Provider wird explizit angegeben.
sendsms 01714160598 -Fmsg.txt
sendsms 01714160598 < msg.txt
In both cases the content of the file msg.txt will be sent to the specified number.
sendsms @group "Alert for all"
The message "Alert for all" will be sent to all numbers which are listed in the file group.
sendsms -PVOICE 07246942484 < voice.dat
sendsms -PVOICE 07246942484 -Fvoice.dat
A voice message (voice modem or CAPI 2.0) will be send to the specified number. The file
voice.dat has to contain the voice message in the native format for the used device.
sendsms -PVOICE 07246942484 -F@voice.dat
The specified number will be called and a voice recording will be stored in the native devive format
to the file voice.dat.
\wobo, "| egrep -ih '^From:|^Subject:' | /usr/local/sendsms/sendsms -s 017112345678 > /dev/null"With this file, all arriving Emails will be forwarded to the userid wobo (here you have to enter your own userid, so that you have the same normal access to the Emails as you will have without the .forward file) and that a message (containing the originator and the subject of the Email) will be send to the specified phonenumber by SendSMS. In this example the messages will be spooled so that you have also to start a server process which will handle the spooled files. If you will send the messages directly without spooling you have to call in the .forward-file a script which will call SendSMS without the -s parametere and always returns 0 (this is needed by the mailer whereas SendSMS returns the count of submitted messages).
Example:
#! /bin/sh egrep -ih '^From:|^Subject:' | /usr/local/sendsms/sendsms 01711234567 > /dev/null exit 0
Using WindowsNT/Windows 9x it is possible to be informed by SendSMS about incoming emails with the freeware product POSTIE.
Böcherer Angewandte Informatik Dipl.-Inform. Wolfgang Böcherer Im Grün 9 D-76316 Malsch |
Tel: +49 (0)7246 942484 Fax: +49 (0)7246 942485 Email: info\@bai.de WWW: http://www.bai.de |