summaryrefslogtreecommitdiff
path: root/docs/man/gammu-smsdrc.5
blob: 591905987da05b42c3835edd785dba02a2bafad2 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
.\" Man page generated from reStructuredText.
.
.TH "GAMMU-SMSDRC" "5" "Aug 16, 2016" "1.37.4" "Gammu"
.SH NAME
gammu-smsdrc \- gammu-smsd(1) configuration file
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH DESCRIPTION
.sp
gammu\-smsd reads configuration from a config file. It\(aqs location can be
specified on command line, otherwise default path \fB/etc/gammu\-smsdrc\fP
is used.
.sp
This file use ini file syntax, see ini\&.
.sp
Configuration file of gammu\-smsd consists of at least two sections \-
\fB[gammu]\fP and \fI\%[smsd]\fP\&. For gammu\-smsd\-sql
you can also use \fI\%[sql]\fP and \fI\%[tables]\fP\&.
.sp
The \fB[gammu]\fP section is configuration of a phone connection
and is same as described in gammurc with the only exception that
\fI\%LogFile\fP is ignored and common logging for gammu library and
SMS daemon is used. However the \fBLogFormat\fP directive still
configures how much messages gammu emits.
.INDENT 0.0
.TP
.B [smsd]
The \fI\%[smsd]\fP section configures SMS daemon itself, which are described in
following subsections. First general parameters of SMS daemon are listed and
then specific parameters for storage backends.
.UNINDENT
.INDENT 0.0
.TP
.B [include_numbers]
List of numbers from which accept messages, see \fI\%Message filtering\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B [exclude_numbers]
List of numbers from which reject messages, see \fI\%Message filtering\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B [include_smsc]
List of SMSC numbers from which accept messages, see \fI\%Message filtering\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B [exclude_smsc]
List of SMSC numbers from which reject messages, see \fI\%Message filtering\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B [sql]
Configure SQL queries used by gammu\-smsd\-sql, you usually don\(aqt have to modify them.
.sp
\fBSEE ALSO:\fP
.INDENT 7.0
.INDENT 3.5
Configurable queries
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B [tables]
Configure SQL table names used by gammu\-smsd\-sql, you usually don\(aqt have to modify them.
.sp
\fBSEE ALSO:\fP
.INDENT 7.0
.INDENT 3.5
Configurable tables
.UNINDENT
.UNINDENT
.UNINDENT
.SH GENERAL PARAMETERS OF SMS DAEMON
.INDENT 0.0
.TP
.B Service
SMSD service to use, one of following choices:
.INDENT 7.0
.TP
.B \fBFILES\fP
Stores messages in files, see gammu\-smsd\-files for details.
.TP
.B \fBNULL\fP
Does not store messages at all, see gammu\-smsd\-null for details.
.TP
.B \fBSQL\fP
Stores messages in SQL database, see gammu\-smsd\-sql for details,
choose database type to use by \fI\%Driver\fP\&.
.sp
New in version 1.28.93.

.TP
.B \fBMYSQL\fP
Deprecated since version 1.28.93: Use \fI\%Service\fP = \fBSQL\fP and \fI\%Driver\fP = \fBnative_mysql\fP instead.

.sp
Compatibility option for older configuration files, stores messages in
MySQL database, see gammu\-smsd\-mysql for details.
.TP
.B \fBPGSQL\fP
Deprecated since version 1.28.93: Use \fI\%Service\fP = \fBSQL\fP and \fI\%Driver\fP = \fBnative_pgsql\fP instead.

.sp
Compatibility option for older configuration files, stores messages in
PostgreSQL database, see gammu\-smsd\-pgsql for details.
.TP
.B \fBDBI\fP
Deprecated since version 1.28.93: Use \fI\%Service\fP = \fBSQL\fP and \fI\%Driver\fP = DBI driver instead.

.sp
Compatibility option for older configuration files, stores messages in
any database supported by libdbi, see gammu\-smsd\-dbi for details.
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 7.0
.INDENT 3.5
Availability of backends depends on platform and compile time configuration.
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B PIN
PIN for SIM card. This is optional, but you should set it if your phone after
power on requires PIN.
.UNINDENT
.INDENT 0.0
.TP
.B NetworkCode
Network personalisation password. This is optional, but some phones require it
after power on.
.UNINDENT
.INDENT 0.0
.TP
.B PhoneCode
Phone lock password. This is optional, but some phones require it after power
on.
.UNINDENT
.INDENT 0.0
.TP
.B LogFile
File where SMSD actions are being logged. You can also use special value
\fBsyslog\fP which will send all messages to syslog daemon. On Windows another
special value \fBeventlog\fP exists, which will send logs to Windows Event Log.
.sp
If you run SMSD as a system daemon (or service), it is recommended to use
absolute path to log file as startup directory might be different than you
expect.
.sp
Default is to provide no logging.
.sp
\fBNOTE:\fP
.INDENT 7.0
.INDENT 3.5
For logging to Windows Event Log, it is recommended to install Event Log
source by invoking \fBgammu\-smsd \-e\fP (this is automatically done during
installation of Gammu).
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B LogFacility
Facility to use on logging backends which support it (currently only
syslog). One of following chouces:
.INDENT 7.0
.IP \(bu 2
\fBDAEMON\fP (default)
.IP \(bu 2
\fBUSER\fP
.IP \(bu 2
\fBLOCAL0\fP
.IP \(bu 2
\fBLOCAL1\fP
.IP \(bu 2
\fBLOCAL2\fP
.IP \(bu 2
\fBLOCAL3\fP
.IP \(bu 2
\fBLOCAL4\fP
.IP \(bu 2
\fBLOCAL5\fP
.IP \(bu 2
\fBLOCAL6\fP
.IP \(bu 2
\fBLOCAL7\fP
.UNINDENT
.sp
New in version 1.30.91.

.UNINDENT
.INDENT 0.0
.TP
.B DebugLevel
Debug level for SMSD. The integer value should be sum of all flags you
want to enable.
.INDENT 7.0
.TP
.B 1
enables basic debugging information
.TP
.B 2
enables logging of SQL queries of service backends
.TP
.B 4
enables logging of gammu debug information
.UNINDENT
.sp
Generally to get as much debug information as possible, use 255.
.sp
Default is 0, what should mean no extra information.
.UNINDENT
.INDENT 0.0
.TP
.B CommTimeout
How many seconds should SMSD wait after there is no message in outbox.
.sp
Default is 30.
.UNINDENT
.INDENT 0.0
.TP
.B SendTimeout
Shows how many seconds SMSD should wait for network answer during sending
sms. If nothing happen during this time, sms will be resent.
.sp
Default is 30.
.UNINDENT
.INDENT 0.0
.TP
.B MaxRetries
How many times will SMSD try to resend message if sending fails. This
is tracked per message and currently supported only with SQL backends.
.sp
Default is 1.
.UNINDENT
.INDENT 0.0
.TP
.B ReceiveFrequency
The number of seconds between testing for received SMSes, when the phone is
busy sending SMSes. Normally a test for received SMSes is done every
\fI\%CommTimeout\fP seconds and after each sent SMS.
.sp
Default is 15.
.UNINDENT
.INDENT 0.0
.TP
.B StatusFrequency
The number of seconds between refreshing phone status (battery, signal) stored
in shared memory and possibly in service backends. Use 0 to disable.
.sp
Default is 15.
.UNINDENT
.INDENT 0.0
.TP
.B LoopSleep
The number of seconds how long will SMSD sleep before checking for some
activity. Please note that setting this to higher value than 1 will have
effects to other time based configurations, because they will be effectively
rounded to multiply of this value.
.sp
Setting this to 0 disables sleeping. Please note this might cause Gammu to
consume quite a lot of CPU power.
.sp
Default is 1.
.UNINDENT
.INDENT 0.0
.TP
.B MultipartTimeout
The number of seconds how long will SMSD wait for all parts of multipart
message. If all parts won\(aqt arrive in time, parts will be processed as separate
messages.
.sp
Default is 600 (10 minutes).
.UNINDENT
.INDENT 0.0
.TP
.B CheckSecurity
Whether to check if phone wants to enter PIN.
.sp
Default is 1 (enabled).
.UNINDENT
.INDENT 0.0
.TP
.B HangupCalls
New in version 1.34.0.

.sp
Whether to automatically hangup any incoming calls.
.sp
Default is 0 (disabled).
.UNINDENT
.INDENT 0.0
.TP
.B CheckBattery
Whether to check phone battery state periodically.
.sp
Default is 1 (enabled).
.UNINDENT
.INDENT 0.0
.TP
.B CheckSignal
Whether to check signal level periodically.
.sp
Default is 1 (enabled).
.UNINDENT
.INDENT 0.0
.TP
.B ResetFrequency
The number of seconds between performing a preventive soft reset in order to
minimize the cases of hanging phones e.g. Nokia 5110 will sometimes freeze to
a state when only after unmounting the battery the phone will be functional
again.
.sp
Default is 0 (not used).
.UNINDENT
.INDENT 0.0
.TP
.B HardResetFrequency
New in version 1.28.92.

.sp
\fBWARNING:\fP
.INDENT 7.0
.INDENT 3.5
For some phones hard reset means deleting all data in it. Use
\fI\%ResetFrequency\fP instead, unless you know what you are
doing.
.UNINDENT
.UNINDENT
.sp
The number of seconds between performing a preventive hard reset in order to
minimize the cases of hanging phones.
.sp
Default is 0 (not used).
.UNINDENT
.INDENT 0.0
.TP
.B DeliveryReport
Whether delivery reports should be used, one of \fBno\fP, \fBlog\fP, \fBsms\fP\&.
.INDENT 7.0
.TP
.B \fBlog\fP
one line log entry,
.TP
.B \fBsms\fP
store in inbox as a received SMS
.TP
.B \fBno\fP
no delivery reports
.UNINDENT
.sp
Default is \fBno\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B DeliveryReportDelay
Delay in seconds how long is still delivery report considered valid. This
depends on brokenness of your network (delivery report should have same
timestamp as sent message). Increase this if delivery reports are not paired
with sent messages.
.sp
Default is 600 (10 minutes).
.UNINDENT
.INDENT 0.0
.TP
.B PhoneID
String with info about phone used for sending/receiving. This can be useful if
you want to run several SMS daemons (see \fI\%Multiple modems\fP).
.sp
When you set PhoneID, all messages (including injected ones) will be marked
by this string (stored as SenderID in the database) and it allows more SMS
daemons to share a single database.
.sp
This option has actually no effect with gammu\-smsd\-files\&.
.UNINDENT
.INDENT 0.0
.TP
.B SMSC
New in version 1.36.2.

.sp
SMSC number to use for sending messages if not specified in the message
(see options of gammu\-smsd\-inject).
.sp
In most cases you don\(aqt need this settings as Gammu tries to read correct
SMSC from phone, but sometimes this fails (try \fBgammu getsmsc\fP).
.UNINDENT
.INDENT 0.0
.TP
.B RunOnReceive
Executes a program after receiving message.
.sp
This parameter is executed through shell, so you might need to escape some
special characters and you can include any number of parameters. Additionally
parameters with identifiers of received messages are appended to the command
line. The identifiers depend on used service backend, typically it is ID of
inserted row for database backends or file name for file based backends.
.sp
Gammu SMSD waits for the script to terminate. If you make some time consuming
there, it will make SMSD not receive new messages. However to limit breakage
from this situation, the waiting time is limited to two minutes. After this
time SMSD will continue in normal operation and might execute your script
again.
.sp
The process has available lot of information about received message in
environment, check gammu\-smsd\-run for more details.
.UNINDENT
.INDENT 0.0
.TP
.B RunOnFailure
New in version 1.28.93.

.sp
Executes a program on failure.
.sp
This can be used to proactively react on some failures or to interactively
detect failure of sending message.
.sp
The program will receive optional parameter, which can currently be either
\fBINIT\fP (meaning failure during phone initialization) or message ID,
which would indicate error while sending the message.
.sp
\fBNOTE:\fP
.INDENT 7.0
.INDENT 3.5
The environment with message (as is in \fI\%RunOnReceive\fP) is not passed to the command.
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B RunOnSent
New in version 1.36.4.

.sp
Executes a program after sending message.
.sp
The program will receive optional parameter a message ID and environment
with message details as described in gammu\-smsd\-run\&.
.UNINDENT
.INDENT 0.0
.TP
.B IncludeNumbersFile
File with list of numbers which are accepted by SMSD. The file contains one
number per line, blank lines are ignored. The file is read at startup and is
reread only when configuration is being reread. See Message filtering for
details.
.UNINDENT
.INDENT 0.0
.TP
.B ExcludeNumbersFile
File with list of numbers which are not accepted by SMSD. The file contains
one number per line, blank lines are ignored. The file is read at startup and
is reread only when configuration is being reread. See Message filtering for
details.
.UNINDENT
.INDENT 0.0
.TP
.B IncludeSMSCFile
File with list of SMSC numbers which are accepted by SMSD. The file contains
one number per line, blank lines are ignored. The file is read at startup and
is reread only when configuration is being reread. See Message filtering for
details.
.UNINDENT
.INDENT 0.0
.TP
.B ExcludeSMSCFile
File with list of SMSC numbers which are not accepted by SMSD. The file
contains one number per line, blank lines are ignored. The file is read at
startup and is reread only when configuration is being reread. See Message
filtering for details.
.UNINDENT
.INDENT 0.0
.TP
.B BackendRetries
How many times will SMSD backend retry operation.
.sp
The implementation on different backends is different, for database backends
it generally means how many times it will try to reconnect to the server.
.sp
Default is 10.
.UNINDENT
.INDENT 0.0
.TP
.B Send
New in version 1.28.91.

.sp
Whether to enable sending of messages.
.sp
Default is True.
.UNINDENT
.INDENT 0.0
.TP
.B Receive
New in version 1.28.91.

.sp
Whether to enable receiving of messages.
.sp
Default is True.
.UNINDENT
.SH DATABASE BACKENDS OPTIONS
.sp
All DBI, ODBC, MYSQL and PGSQL backends (see gammu\-smsd\-mysql,
gammu\-smsd\-odbc, gammu\-smsd\-pgsql, gammu\-smsd\-dbi for
their documentation) supports same options for configuring connection to a
database:
.INDENT 0.0
.TP
.B User
User name used for connection to a database.
.UNINDENT
.INDENT 0.0
.TP
.B Password
Password used for connection to a database.
.UNINDENT
.INDENT 0.0
.TP
.B Host
Database server address. It can also contain port or socket path after
semicolon, for example \fBlocalhost:/path/to/socket\fP or
\fB192.168.1.1:8000\fP\&.
.sp
For ODBC this is used as Data source name.
.sp
\fBNOTE:\fP
.INDENT 7.0
.INDENT 3.5
Some database servers differentiate usage of \fBlocalhost\fP (to use
local socket) and \fB127.0.0.1\fP (to use locat TCP/IP connection).
Please make sure your SMSD settings match the database server ones.
.UNINDENT
.UNINDENT
.sp
New in version 1.28.92.

.UNINDENT
.INDENT 0.0
.TP
.B PC
Deprecated since version 1.28.92: Please use \fI\%Host\fP instead.

.sp
Synonym for \fI\%Host\fP, kept for backwards compatibility.
.UNINDENT
.INDENT 0.0
.TP
.B Database
Name of database (or schema) to use and where SMSD can find it\(aqs tables.
.sp
Please note that you should create tables in this database before using
gammu\-smsd. SQL files for creating needed tables are included in
documentation for individual database backends: gammu\-smsd\-mysql,
gammu\-smsd\-odbc, gammu\-smsd\-pgsql, gammu\-smsd\-dbi
.UNINDENT
.INDENT 0.0
.TP
.B SkipSMSCNumber
When you send sms from some SMS centers you can have delivery reports from
other SMSC number. You can set here number of this SMSC used by you and Gammu
will not check it\(aqs number during assigning reports to sent SMS.
.UNINDENT
.INDENT 0.0
.TP
.B Driver
SQL driver to use, Gammu supports several native drivers and generic
interface using ODBC and DBI. Availability of the backends depends on
compile time options.
.sp
Available drivers:
.sp
\fBodbc\fP
.INDENT 7.0
.INDENT 3.5
Connects to the database using ODBC, see gammu\-smsd\-odbc\&.
.UNINDENT
.UNINDENT
.sp
\fBnative_mysql\fP
.INDENT 7.0
.INDENT 3.5
Stores messages in MySQL database, see gammu\-smsd\-mysql for
details.
.UNINDENT
.UNINDENT
.sp
\fBnative_pgsql\fP
.INDENT 7.0
.INDENT 3.5
Stores messages in PostgreSQL database, see gammu\-smsd\-pgsql for
details.
.UNINDENT
.UNINDENT
.sp
\fBdb2\fP, \fBfirebird\fP, \fBfreetds\fP, \fBingres\fP, \fBmsql\fP, \fBmysql\fP, \fBoracle\fP, \fBpgsql\fP, \fBsqlite\fP, \fBsqlite3\fP
.INDENT 7.0
.INDENT 3.5
Stores messages using DBI library in given backend. You need to have
installed appropriate DBI driver to make it work. See
gammu\-smsd\-dbi for details.
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B SQL
SQL dialect to use. This is specially useful with gammu\-smsd\-odbc where SMSD
does not know which server it is actually talking to.
.sp
Possible values:
.INDENT 7.0
.IP \(bu 2
\fBmysql\fP \- MySQL
.IP \(bu 2
\fBpgsql\fP \- PostgreSQL
.IP \(bu 2
\fBsqlite\fP \- SQLite
.IP \(bu 2
\fBmssql\fP \- Microsoft SQL Server
.IP \(bu 2
\fBsybase\fP \- Sybase
.IP \(bu 2
\fBaccess\fP \- Microsoft Access
.IP \(bu 2
\fBodbc\fP \- Generic ODBC
.UNINDENT
.sp
New in version 1.28.93.

.sp
\fBSEE ALSO:\fP
.INDENT 7.0
.INDENT 3.5
You can also completely customize SQL queries used as described in SQL Queries\&.
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B DriversPath
Path, where DBI drivers are stored, this usually does not have to be set if
you have properly installed drivers.
.UNINDENT
.INDENT 0.0
.TP
.B DBDir
Database directory for some (currently only sqlite) DBI drivers. Set here path
where sqlite database files are stored.
.UNINDENT
.SS Files backend options
.sp
The FILES backend accepts following configuration options. See
gammu\-smsd\-files for more detailed service backend description. Please note
that all path should contain trailing path separator (/ on Unix systems):
.INDENT 0.0
.TP
.B InboxPath
Where the received SMSes are stored.
.sp
Default is current directory.
.UNINDENT
.INDENT 0.0
.TP
.B OutboxPath
Where SMSes to be sent should be placed.
.sp
Default is current directory.
.UNINDENT
.INDENT 0.0
.TP
.B SentSMSPath
Where the transmitted SMSes are placed, if same as \fI\%OutboxPath\fP transmitted
messages are deleted.
.sp
Default is to delete transmitted messages.
.UNINDENT
.INDENT 0.0
.TP
.B ErrorSMSPath
Where SMSes with error in transmission is placed.
.sp
Default is same as \fI\%SentSMSPath\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B InboxFormat
The format in which the SMS will be stored: \fBdetail\fP, \fBunicode\fP, \fBstandard\fP\&.
.INDENT 7.0
.TP
.B \fBdetail\fP
format used for message backup by gammu, see gammu\-smsbackup\&.
.TP
.B \fBunicode\fP
message text stored in unicode (UTF\-16)
.TP
.B \fBstandard\fP
message text stored in system charset
.UNINDENT
.sp
The \fBstandard\fP and \fBunicode\fP settings do not apply for 8\-bit messages, which
are always written raw as they are received with extension .bin.
.sp
Default is \fBunicode\fP\&.
.sp
\fBNOTE:\fP
.INDENT 7.0
.INDENT 3.5
In \fBdetail\fP format, all message parts are stored into signle file,
for all others each message part is saved separately.
.UNINDENT
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B OutboxFormat
The format in which messages created by gammu\-smsd\-inject will be stored,
it accepts same values as InboxFormat.
.sp
Default is \fBdetail\fP if Gammu is compiled in with backup functions, \fBunicode\fP
otherwise.
.UNINDENT
.INDENT 0.0
.TP
.B TransmitFormat
The format for transmitting the SMS: \fBauto\fP, \fBunicode\fP, \fB7bit\fP\&.
.sp
This option is used only if \fI\%OutboxFormat\fP is not set to
\fBdetail\fP\&. In such case encoding specified in the message is used (you can
specify it to gammu\-smsd\-inject).
.sp
Default is \fBauto\fP\&.
.UNINDENT
.SH MESSAGE FILTERING
.sp
SMSD allows one to process only limited subset of incoming messages. You can define
filters for sender number in \fI\%[include_numbers]\fP and
\fI\%[exclude_numbers]\fP sections or using
\fI\%IncludeNumbersFile\fP and \fI\%ExcludeNumbersFile\fP
directives.
.sp
If \fI\%[include_numbers]\fP section exists, all values (keys are
ignored) from it are used as allowed phone numbers and no other message is
processed. On the other side, in \fI\%[exclude_numbers]\fP you can
specify numbers which you want to skip.
.sp
Lists from both sources are merged together. If there is any number in include
list, only include list is used and only messages in this list are being
accepted. If include list is empty, exclude list can be used to ignore
messages from some numbers. If both lists are empty, all messages are
accepted.
.sp
Similar filtering rules can be used for SMSC number filtering, they just use
different set of configuration options \- \fI\%[include_smsc]\fP and
\fI\%[exclude_smsc]\fP sections or \fI\%IncludeSMSCFile\fP
and \fI\%ExcludeSMSCFile\fP directives.
.SH EXAMPLES
.sp
There is more complete example available in Gammu documentation. Please note
that for simplicity following examples do not include \fB[gammu]\fP
section, you can look into gammurc for some examples how it can look like.
.SS Files service
.sp
SMSD configuration file for FILES backend could look like:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
[smsd]
Service = files
PIN = 1234
LogFile = syslog
InboxPath = /var/spool/sms/inbox/
OutboxPath = /var/spool/sms/outbox/
SentSMSPath = /var/spool/sms/sent/
ErrorSMSPath = /var/spool/sms/error/
.ft P
.fi
.UNINDENT
.UNINDENT
.SS MySQL service
.sp
If you want to use MYSQL backend, you will need something like this:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
[smsd]
Service = sql
Driver = native_mysql
PIN = 1234
LogFile = syslog
User = smsd
Password = smsd
PC = localhost
Database = smsd
.ft P
.fi
.UNINDENT
.UNINDENT
.SS DBI service using SQLite
.sp
For gammu\-smsd\-dbi backend, in this particular case SQLite:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
[smsd]
Service = sql
Driver = sqlite3
DBDir = /var/lib/sqlite3
Database = smsd.db
.ft P
.fi
.UNINDENT
.UNINDENT
.SS ODBC service using MySQL
.sp
For gammu\-smsd\-odbc backend, in this particular case using DSN \fBsmsd\fP server:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
[smsd]
Service = sql
Driver = odbc
Host = smsd
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The DSN definition (in \fB~/.odbc.ini\fP on UNIX) for using MySQL server would look like:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
[smsd]
Description         = MySQL
Driver              = MySQL
Server              = 127.0.0.1
Database            = smsd
Port                =
Socket              =
Option              =
Stmt                =

[smsdsuse]
Driver              = MySQL ODBC 3.51.27r695 Driver
DATABASE            = smsd
SERVER              = 127.0.0.1
.ft P
.fi
.UNINDENT
.UNINDENT
.SS Numbers filtering
.sp
Process only messages from 123456 number:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
[include_numbers]
number1 = 123456
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Do not process messages from evil number 666:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
[exclude_numbers]
number1 = 666
.ft P
.fi
.UNINDENT
.UNINDENT
.SS Debugging
.sp
Enabling debugging:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
[smsd]
debuglevel = 255
logfile = smsd.log
.ft P
.fi
.UNINDENT
.UNINDENT
.SS Multiple modems
.sp
You can run any number of SMSD instances and they can even share same backend
database. For routing the messages, you need to set different
\fI\%PhoneID\fP for each instance and set \fBSenderID\fP column in
outbox table.
.sp
Following example shows configuration for two modems, but you can have any
number of SMSD instances. The only limitation is performance of your hardware,
especially if all modems are connected using USB.
.sp
Configuration for first SMSD:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
[gammu]
device = /dev/ttyACM0
connection = at

[smsd]
Service = sql
Driver = native_mysql
PIN = 1234
LogFile = syslog
User = smsd
Password = smsd
PC = localhost
Database = smsd
PhoneID = first
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Configuration for second SMSD:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
[gammu]
device = /dev/ttyACM1
connection = at

[smsd]
Service = sql
Driver = native_mysql
PIN = 1234
LogFile = syslog
User = smsd
Password = smsd
PC = localhost
Database = smsd
PhoneID = second
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
You can then start two separate instances of SMSD:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
gammu\-smsd \-c /path/to/first\-smsdrc
gammu\-smsd \-c /path/to/second\-smsdrc
.ft P
.fi
.UNINDENT
.UNINDENT
.SH AUTHOR
Michal Čihař <michal@cihar.com>
.SH COPYRIGHT
2009-2015, Michal Čihař <michal@cihar.com>
.\" Generated by docutils manpage writer.
.