diff options
Diffstat (limited to 'docs/manual/smsd')
-rw-r--r-- | docs/manual/smsd/backends.rst | 1 | ||||
-rw-r--r-- | docs/manual/smsd/config.rst | 9 | ||||
-rw-r--r-- | docs/manual/smsd/odbc.rst | 55 | ||||
-rw-r--r-- | docs/manual/smsd/sql.rst | 3 | ||||
-rw-r--r-- | docs/manual/smsd/tables.rst | 56 |
5 files changed, 108 insertions, 16 deletions
diff --git a/docs/manual/smsd/backends.rst b/docs/manual/smsd/backends.rst index a8836ab..80cd67b 100644 --- a/docs/manual/smsd/backends.rst +++ b/docs/manual/smsd/backends.rst @@ -14,6 +14,7 @@ outgoing ones). mysql pgsql dbi + odbc null tables diff --git a/docs/manual/smsd/config.rst b/docs/manual/smsd/config.rst index ad36b90..b9f4c98 100644 --- a/docs/manual/smsd/config.rst +++ b/docs/manual/smsd/config.rst @@ -72,7 +72,7 @@ General parameters of SMS daemon .. deprecated:: 1.28.93 ``PGSQL`` - synonym for :config:option:`Service` = ``SQL`` and :config:option:`Driver` = ``native_mysql`` + synonym for :config:option:`Service` = ``SQL`` and :config:option:`Driver` = ``native_pgsql`` stores messages in PostgreSQL database, see :ref:`gammu-smsd-pgsql` for details @@ -362,6 +362,8 @@ supports same options for configuring connection to a database: Database server address. It can also contain port or socket path after semicolon, for example ``localhost:/path/to/socket``. + For ODBC this is used as Data source name. + .. versionadded:: 1.28.92 .. config:option:: PC @@ -386,7 +388,8 @@ supports same options for configuring connection to a database: SQL driver to use. - Can be either one of native drivers (``native_mysql`` or ``native_pgsql``) or :ref:`gammu-smsd-dbi` driver. + Can be either one of native drivers (``odbc``, ``native_mysql`` or + ``native_pgsql``) or :ref:`gammu-smsd-dbi` driver. Depends on what DBI drivers you have installed, DBI supports: ``mysql``, ``freetds`` (provides access to MS SQL Server and @@ -475,7 +478,7 @@ that all path should contain trailing path separator (/ on Unix systems): Message filtering ----------------- -SMSD allows to process only limited subset of incoming messages. You can define +SMSD allows one to process only limited subset of incoming messages. You can define filters for sender number in :config:section:`[include_numbers]` and :config:section:`[exclude_numbers]` sections or using :config:option:`IncludeNumbersFile` and :config:option:`ExcludeNumbersFile` diff --git a/docs/manual/smsd/odbc.rst b/docs/manual/smsd/odbc.rst new file mode 100644 index 0000000..17527f4 --- /dev/null +++ b/docs/manual/smsd/odbc.rst @@ -0,0 +1,55 @@ +.. _gammu-smsd-odbc: + +ODBC Backend +============ + +.. versionadded:: 1.29.92 + +ODBC backend stores all data in any database supported by `ODBC`_, which +parameters are defined by configuration (see :ref:`gammu-smsdrc` for description of +configuration options). + +For tables description see :ref:`gammu-smsd-tables`. + +This backend is based on :ref:`gammu-smsd-sql`. + +Supported drivers +----------------- + +On Microsoft Windows, Gammu uses native ODBC, on other platforms, `unixODBC`_ +can be used. + +.. _ODBC: http://en.wikipedia.org/wiki/Open_Database_Connectivity +.. _unixODBC: http://www.unixodbc.org/ + +Limitations +----------- + +Due to limits of the ODBC interface, you might have to tweak SQL queries to +work in used SQL server, see :ref:`gammu-smsd-sql` for more details. + +Configuration +------------- + +You specify data source name (DSN) as :config:option:`Host` in +:ref:`gammu-smsdrc`. The data source is configured depending on your platform. + +On Microsoft Windows, you can find instructions on Microsoft website: +http://support.microsoft.com/kb/305599 + +For unixODBC this is documented in user manual: +http://www.unixodbc.org/doc/UserManual/ + +Example +------- + +Example configuration: + +.. code-block:: ini + + [smsd] + service = sql + driver = odbc + host = dsn_of_your_database + user = username + password = password diff --git a/docs/manual/smsd/sql.rst b/docs/manual/smsd/sql.rst index f15528e..520b7ca 100644 --- a/docs/manual/smsd/sql.rst +++ b/docs/manual/smsd/sql.rst @@ -8,6 +8,7 @@ SQL service stores all its data in database. It can use one of these SQL backend * ``native_mysql`` for :ref:`gammu-smsd-mysql` * ``native_pgsql`` for :ref:`gammu-smsd-pgsql` +* ``odbc`` for :ref:`gammu-smsd-odbc` * drivers supported by DBI for :ref:`gammu-smsd-dbi`, which include: * ``sqlite3`` - for SQLite 3 * ``mysql`` - for MySQL @@ -21,7 +22,7 @@ Common for all backends: * :config:option:`User` - user connecting to database * :config:option:`Password` - password for connecting to database -* :config:option:`Host` - database host +* :config:option:`Host` - database host or data source name * :config:option:`Database` - database name * :config:option:`Driver` - ``native_mysql``, ``native_pgsql`` or DBI one diff --git a/docs/manual/smsd/tables.rst b/docs/manual/smsd/tables.rst index df51f4e..b4219be 100644 --- a/docs/manual/smsd/tables.rst +++ b/docs/manual/smsd/tables.rst @@ -15,13 +15,13 @@ daemon will have separate outbox queue. Receiving of messages --------------------- -Received messages are stored in ``inbox`` table. +Received messages are stored in :ref:`inbox` table. Transmitting of messages ------------------------ -Transmitted messages are read from table ``outbox`` and possible subsequent parts -of the same message from ``outbox_multipart``. +Transmitted messages are read from table :ref:`outbox` and possible subsequent parts +of the same message from :ref:`outbox_multipart`. Description of tables --------------------- @@ -34,8 +34,10 @@ Information about running daemons. gammu +++++ -Table holding single value - version of a database schema. See HISTORY for -details what has changed. +Table holding single field ``Version`` - version of a database schema. See +:ref:`smsd-tables-history` for details what has changed. + +.. _inbox: inbox +++++ @@ -81,11 +83,13 @@ Fields description: you can use for marking, whether SMS was processed or not +.. _outbox: + outbox ++++++ Messages enqueued for sending should be placed in this table. If message -is multipart, subsequent parts are stored in table outbox_multipart. +is multipart, subsequent parts are stored in table :ref:`outbox_multipart`. Fields description: @@ -155,6 +159,7 @@ Fields description: sender identification, it has to match PhoneID in SMSD configuration to make SMSD process this message +.. _outbox_multipart: outbox_multipart ++++++++++++++++ @@ -179,7 +184,7 @@ Fields description: the same meaning as values in outbox table ``SequencePosition`` (integer) - info, what is SMS number in SMS sequence (start at 2, first part is in outbox + info, what is SMS number in SMS sequence (start at 2, first part is in :ref:`outbox` table). @@ -328,8 +333,10 @@ pbk_groups Not used by SMSD currently, included only for application usage. -History -------- +.. _smsd-tables-history: + +History of database structure +----------------------------- History of schema versions: @@ -337,24 +344,49 @@ History of schema versions: Changed name of ``Signal`` field to ``SignalStrength`` to avoid problems with database which have ``SIGNAL`` as reserved word. Added ``SendBefore`` and ``SendAfter`` fields. + + .. versionchanged:: 1.29.90 12 the changes only affect MySQL structure changing default values for timestamps from ``0000-00-00 00:00:00`` to ``CURRENT_TIMESTAMP()`` by using triggers, to update to this version, just execute triggers definition at the end of SQL file. + + .. versionchanged:: 1.28.94 11 all fields for storing message text are no longer limited to 160 chars, - but are arbitrary length text fields (1.25.92) + but are arbitrary length text fields. + + .. versionchanged:: 1.25.92 10 ``DeliveryDateTime`` is now NULL when message is not delivered, added several indexes + + .. versionchanged:: 1.22.95 9 added sent/received counters to phones table + + .. versionchanged:: 1.22.93 8 - introduced phones table + Signal and battery state are now stored in database. + .. versionchanged:: 1.20.94 7 - added CreatorID to tables (it holds PhoneID if set) + Added ``CreatorID`` to several tables. + + .. versionchanged:: 1.07.00 +6 + Many fields in outbox can now be NULL. + + .. versionchanged:: 1.06.00 +5 + Introduced daemons table and various other changes. + + .. versionchanged:: 1.03.00 +3 + Introduced phones table and various other changes. + + .. versionchanged:: 0.98.0 Examples |