1GAMMU-SMSDRC(5) Gammu Documentation GAMMU-SMSDRC(5)
2
3
4
6 gammu-smsdrc - gammu-smsd(1) configuration file
7
8
10 /etc/gammu-smsdrc
11
13 gammu-smsd(1) reads configuration from a config file. It's location can
14 be specified on command line, otherwise default path /etc/gammu-smsdrc
15 is used.
16
17 This file use ini file syntax, with comment parts being marked with
18 both ; and #. Sections of config file are identified in square brackets
19 line [this]. All key values are case insensitive.
20
21 Configuration file of gammu-smsd consists of at least two sections -
22 [gammu] and [smsd].
23
24 The [gammu] section is configuration of a phone connection and is same
25 as described in gammurc(5) with the only exception that logfile is
26 ignored and common logging for gammu library and SMS daemon is used.
27 However the logformat directive still configures how much messages
28 gammu emits.
29
30 The [smsd] section configures SMS daemon itself, which are described in
31 following subsections. First general parameters of SMS daemon are
32 listed and then specific parameters for storage backends.
33
34 Then there are optional sections [include_numbers] and [exclude_num‐
35 bers], which control message filtering (see bellow).
36
37
38 General parameters of SMS daemon
39 Service
40
41 SMSD service to use, one of FILES, MYSQL, PGSQL, DBI (depends on
42 compiled in support for backends).
43
44 FILES - stores messages in files, see gammu-smsd-files(7) for
45 details
46 MYSQL - stores messages in MySQL database, see gammu-smsd-
47 mysql(7) for details
48 PGSQL - stores messages in PostgreSQL database, see gammu-smsd-
49 pgsql(7) for details
50 DBI - stores messages in any database supported by libdbi, this
51 includes MSSQL, MySQL, PostgreSQL or SQLite databases, see
52 gammu-smsd-dbi(7) for details
53
54
55 PIN
56
57 PIN for SIM card. This is optional, but you should set it if
58 your phone after power on requires PIN.
59
60
61 NetworkCode
62
63 Network personalisation password. This is optional, but some
64 phones require it after power on.
65
66
67 PhoneCode
68
69 Phone lock password. This is optional, but some phones require
70 it after power on.
71
72
73 LogFile
74
75 File where SMSD actions are being logged. You can also use spe‐
76 cial value "syslog" which will send all messages to syslog dae‐
77 mon. On Windows another special value "eventlog" exists, which
78 will send logs to Windows Event Log.
79
80 Default is to provide no logging.
81
82
83 DebugLevel
84
85 Debug level for SMSD. The integer value should be sum of all
86 flags you want to enable.
87
88 1 - enables basic debugging information
89 2 - enables logging of SQL queries of service backends
90 4 - enables logging of gammu debug information
91
92 Generally to get as much debug information as possible, use 255.
93
94 Default is 0, what should mean no extra information.
95
96
97 CommTimeout
98
99 How many seconds should SMSD wait after each read/write loop.
100
101 Default is 30.
102
103
104 SendTimeout
105
106 Shows how many seconds SMSD should wait for network answer dur‐
107 ing sending sms. If nothing happen during this time, sms will be
108 resent.
109
110 Default is 30.
111
112
113 MaxRetries
114
115 How many times will SMSD try to resend message if sending fails.
116
117 Default is 1.
118
119
120 ReceiveFrequency
121
122 The number of seconds between testing for received SMSes, when
123 the phone is busy sending SMSes. Normally a test for received
124 SMSes is done every CommTimeout seconds and after each sent SMS.
125
126 Default is 0 (not used).
127
128
129 CheckSecurity
130
131 Whether to check if phone wants to enter PIN.
132
133 Default is 1 (enabled).
134
135
136 CheckBattery
137
138 Whether to check phone battery state periodically.
139
140 Default is 1 (enabled).
141
142
143 CheckSignal
144
145 Whether to check signal level periodically.
146
147 Default is 1 (enabled).
148
149
150 ResetFrequency
151
152 The number of seconds between performing a preventive soft reset
153 in order to minimize the cases of hanging phones e.g. Nokia 5110
154 will sometimes freeze to a state when only after unmounting the
155 battery the phone will be functional again.
156
157 Default is 0 (not used).
158
159
160 DeliveryReport
161
162 Whether delivery reports should be used, one of 'no', 'log',
163 'sms'.
164
165 log - one line log entry,
166 sms - store in inbox as a received SMS
167 no - no delivery reports
168
169 Default is 'no'.
170
171
172 DeliveryReportDelay
173
174 Delay in seconds how long is still delivery report considered
175 valid. This depends on brokeness of your network (delivery
176 report should have same timestamp as sent message). Increase
177 this if delivery reports are not paired with sent messages.
178
179 Default is 600 (10 minutes).
180
181
182 PhoneID
183
184 String with info about phone used for sending/receiving. This
185 can be useful if you want to run several SMS daemons.
186
187 When you set PhoneID, all messages (including injected ones)
188 will be marked by this string and it allow more SMS daemons to
189 share single database. This option has actually no effect of
190 FILES backend service.
191
192
193 RunOnReceive
194
195 Executes a program after receiving message. This parameter is
196 executed through shell, so you might need to escape some special
197 characters and you can include any number of parameters. Addi‐
198 tionally parameters with identifiers of received messages are
199 appended to the command line. The identifiers depend on used
200 service backend, typically it is ID of inserted row for database
201 backends or file name for file based backends.
202
203
204 Database backends options
205 All DBI, MYSQL and PGSQL backends (see gammu-smsd-mysql(7),
206 gammu-smsd-pgsql(7), gammu-smsd-dbi(7)) for their documentation) sup‐
207 ports same options for configuring connection to a database:
208
209
210 User
211
212 User name used for connection to a database.
213
214
215 Password
216
217 Password used for connection to a database.
218
219
220 PC
221
222 Database server address. It can also contain port or socket path
223 after semicolon, for example localhost:/path/to/socket.
224
225
226 Database
227
228 Name of database to use. Please note that you should create
229 tables in this database before using gammu-smsd. SQL files for
230 creating needed tables are included in documentation.
231
232
233 SkipSMSCNumber
234
235 When you send sms from some SMS centere you can have delivery
236 reports from other SMSC number. You can set here number of this
237 SMSC used by you and Gammu will not check it's number during
238 assigning reports to sent SMS.
239
240
241 Driver
242
243 DBI driver to use. Depends on what DBI drivers you have
244 installed, DBI supports: mysql, freetds (provides access to MS
245 SQL Server and Sybase), pgsql, sqlite, sqlite3, firebird and
246 ingres, msql and oracle drivers are under development.
247
248
249 DriversPath
250
251 Path, where DBI drivers are stored, this usually does not have
252 to be set if you have properly installed drivers.
253
254
255 DBDir
256
257 Database directory for some (currently only sqlite) DBI drivers.
258 Set here path where sqlite database files are stored.
259
260
261 Files backend options
262 The FILES backend accepts following configuration options. See
263 gammu-smsd-files(7) for more detailed service backend description.
264 Please note that all path should contain trailing path separator (/ on
265 Unix systems):
266
267
268 InboxPath
269
270 Where the received SMSes are stored.
271
272 Default is current directory.
273
274
275 OutboxPath
276
277 Where SMSes to be sent should be placed.
278
279 Default is current directory.
280
281
282 SentSMSPath
283
284 Where the transmitted SMSes are placed, if same as OutBoxPath
285 transmitted messages are deleted.
286
287 Default is to delete transmitted messages.
288
289
290 ErrorSMSPath
291
292 Where SMSes with error in transmission is placed.
293
294 Default is same as SentSMSPath.
295
296
297 InboxFormat
298
299 The format in which the SMS will be stored: 'detail', 'unicode',
300 'standard'.
301
302 detail - format used for message backup by gammu(1)
303 unicode - message text stored in unicode (UTF-16)
304 standard - message text stored in system charset
305
306 The 'standard' and 'unicode' settings do not apply for 8-bit
307 messages, which are always written raw as they are received with
308 extension .bin.
309
310 Default is 'unicode'.
311
312
313 TransmitFormat
314
315 The format for transmitting the SMS: 'auto', 'unicode', '7bit'.
316
317 Default is 'auto'.
318
319
320
321 Message filtering
322 SMSD allows to process only limited subset of incoming messages. You
323 can define filters in [include_numbers] and [exclude_numbers] sections.
324 If [include_numbers] section exists, all values (keys are ignored) from
325 it are used as allowed phone numbers and no other message is processed.
326 On the other side, in [exclude_numbers] you can specify numbers which
327 you want to skip.
328
329
331 There is more complete example available in Gammu documentation. Please
332 note that for simplicity following examples do not include [gammu] sec‐
333 tion, you can look into gammurc(5) for some examples how it can look
334 like.
335
336 SMSD configuration file for FILES backend could look like:
337
338
339 [smsd]
340 Service = files
341 PIN = 1234
342 LogFile = syslog
343 InboxPath = /var/spool/sms/inbox/
344 OutboPpath = /var/spool/sms/outbox/
345 SentSMSPath = /var/spool/sms/sent/
346 ErrorSMSPath = /var/spool/sms/error/
347
348
349 If you want to use MYSQL backend, you will need something like this:
350
351
352 [smsd]
353 Service = mysql
354 PIN = 1234
355 LogFile = syslog
356 User = smsd
357 Password = smsd
358 PC = localhost
359 Database = smsd
360
361
362 Process only messages from 123456 number:
363
364
365 [include_numbers]
366 number1 = 123456
367
368
369 Do not process messages from evil number 666:
370
371
372 [exclude_numbers]
373 number1 = 666
374
375
377 gammu-smsd(1), gammu(1), gammurc(5)
378
379 gammu-smsd-files(7), gammu-smsd-mysql(7), gammu-smsd-pgsql(7),
380 gammu-smsd-dbi(7), gammu-smsd-tables(7)
381
383 gammu-smsd and this manual page were written by Michal Cihar
384 <michal@cihar.com>.
385
387 Copyright © 2009 Michal Cihar and other authors. License GPLv2: GNU
388 GPL version 2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
389 This is free software: you are free to change and redistribute it.
390 There is NO WARRANTY, to the extent permitted by law.
391
393 Please report bugs to <http://bugs.cihar.com>.
394
395 Before reporting a bug, please enable verbose logging in SMSD configu‐
396 ration:
397
398 [smsd]
399 debuglevel = 255
400 logfile = smsd.log
401
402 and include this verbose log within bug report.
403
404
405
406Gammu 1.23.0 January 4, 2009 GAMMU-SMSDRC(5)