Fixed fatal linker error (global symbol conflict of "writephonebook")
[gnokii.git] / smsd / README
1 The SMSD (SMS daemon) program is intended for receiving and sending SMS's.
2 This code is a part of one project on which I work and I provide it for free
3 use under GPL. I provide the program AS IS without any warranty.
4
5 The program is designed to work with Postgres SQL server but you can adapt
6 it for other SQL engines by rewriting db.{hc} modules. SMSD uses SQL server
7 as repository for SMS's. You must create a database (default name is 'sms')
8 with tables defined in sms.tables.sql file. Table 'inbox' is for received
9 SMS's:
10 number - phone number from which is sms received
11 smsdate - date setted by SMS center
12 insertdate - date of inserting SMS in table
13 text - SMS text
14 processed - smsd sets this always to FALSE
15
16 PRIMARY KEY from 'number' and 'smsdate' is important. You must create it.
17
18 When phone receive SMS, SMSD move it into table 'inbox'. (SMSD remove SMS
19 from phone.)
20
21 Table 'outbox' is for outgoing SMS's. SMSD periodicaly looking in this table
22 and searching for lines with attribut 'processed' setted to FALSE. If it find
23 such SMS, it will send SMS to 'number':
24 number - recipient's phone number
25 insertdate - date of inserting SMS in table
26 text - SMS text
27 processed - new SMS must have this attribut setted to FALSE. SMSD will send
28             this SMS and will update 'processed' to TRUE
29
30
31 By default SMSD connect to localhost DB server, to database sms, with user
32 name of user which start SMSD, without password. You can change this with
33 -d,--db command line option. As argument of this option you must write Postgres
34 connect info string. For example:
35 ./smsd --db "dbname=smsgateway host=bigserver user=ja password=secure" &
36
37 SMSD is multi threaded program. After running SMSD you can see 5 threads.
38 The first thread is thread manager, the second is for lowlevel communication
39 with phone, the third for high level phone monitoring, the fourth is for
40 receiving SMS's and last fifth is for SMS's sending.
41
42 SMSD is not compiled by default with main 'make' command. You must compile it
43 manually by typing 'make' in smsd directory. But before SMSD compilation
44 you must right configure gnokii (autoconf, configure). SMSD shares gnokii
45 runtime configuration file.
46
47                                         Jan Derfinak <ja@mail.upjs.sk>
48                                         17 December 2000