;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright (c) 2011-2014 Unixmedia S.r.l. <info@unixmedia.it>
; Copyright (c) 2011-2014 Franco (nextime) Lanza <franco@unixmedia.it>
;
; Domotika System Controller Daemon "domotikad"  [http://trac.unixmedia.it]
;
; This file is part of domotikad.
;
; domotikad is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program.  If not, see <http://www.gnu.org/licenses/>.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;
; Sample configuration for res_config_mysql.c
;
; The value of dbhost may be either a hostname or an IP address.
; If dbhost is commented out or the string "localhost", a connection
; to the local host is assumed and dbsock is used instead of TCP/IP
; to connect to the server.  If no dbcharset is specified, the connection
; is made with no extra charset configurations sent to MySQL, leaving all 
; configured MySQL charset options and defaults untouched.
;
; Multiple database contexts may be configured, with the caveat that
; all context names should be unique and must not contain the slash ('/')
; character.  If you wish to separate reads from writes in your database
; configuration, you specify the database (NOT HERE, in other files)
; separated by a slash, read database first.  If your database
; specification does not contain a slash, the implication is that reads
; and writes should be performed to the same database.
;
; For example, in extconfig.conf, you could specify a line like:
;    sippeers => mysql,readhost.asterisk/writehost.asterisk,sippeers
; and then define the contexts [readhost.asterisk] and [writehost.asterisk]
; below.
;
; The requirements parameter is available only in Asterisk 1.6.1 and
; later and must be present in all contexts.  It specifies the behavior
; when a column name is required by the system.  The default behavior is
; "warn" and simply sends a warning to the logger that the column does
; not exist (or is of the wrong type or precision).  The other two
; possibilities are "createclose", which adds the column with the right
; type and length, and "createchar", which adds the column as a char
; type, with the appropriate length to accept the data.  Note that with
; the MySQL driver, both "createclose" and "createchar" will, on occasion,
; widen a table column width to meet the requirements specified.
;
[domotika]
dbhost = localhost
dbname = domotika
dbuser = asterisk
dbpass = astdbpwd
;dbport = 3306
dbsock = /var/run/mysqld/mysqld.sock
;dbcharset = latin1
requirement=createclose
;requirements=warn ; or createclose or createchar