blob: 049bccd4ff90a7a81dd34032c509ed4129d1f06c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
Usage: blasms sender-number send-date
SMS content should be passed using stdin.
blasms.conf is the configuration file and should be in the format:
default SYSTEMCOMMANDS
CMD1 SYSTEMCOMMANDS
CMD2 SYSTEMCOMMANDS
etc.
Where SYSTEM COMMANDS can be any command to be executed. The line starting
with 'default' must be present, and is the default command in the absense of a
recognised command. CMD1, CMD2, etc. are commands which can be matched at the
start of SMSes, in order to execute commands other than the default. Macros
are available, allowing for text replacement. The macros available are:
%N - replaced with the sender-number, and attempts to set a sender name (see
below)
%n - replaced with the sender-number
%d - replaced with the send-date
%s - replaced with the SMS content
%P - attempts to replace the second word in the SMS with a destination number
from phonebook.conf - SMS not processed if entry not found
%M - intepret the second word (i.e. after the command) of the SMS
as FILENAME, attempt to open the file "pending/FILENAME", treating
the first word of it as a number, attempting to look up its name,
and insert a colon between it and the rest of the file.
An example blasms.conf might be:
default echo \"SMS from %N at %d: %s\"
LS ls %s
Sender names are looked up in phonebook.conf, which should be in the format:
NUMBER1 NAME1 NAME1-ALT
NUMBER2 NAME2
etc.
An example phonebook.conf might be:
+447777123456 John
+447713987654 Bill Billy
With a default gnokii (at least with gnokii-0.6.29) apostrophes (') will be
escaped. Removing this behaviour is desirble to blasms and does not cause
any adverse effects (so far). A patch for gnokii to remove the escaping
behaviour is in gnokii/.
|