[SR-Users] Howto configure to use SQLITE

Perazim perazim at inbox.lt
Thu Feb 9 14:06:08 CET 2012


I got a little further but still not working. Here are changes I have
made to default:

kamailio.cfg:

...
# *** To enable mysql: 
#!define WITH_MYSQL
#
# *** To enable authentication execute:
#     - enable mysql
#!define WITH_AUTH
#     - add users using 'kamctl'
...

...
####### Defined Values #########

# *** Value defines - IDs used later in config
#!ifdef WITH_MYSQL
# - database URL - used to connect to database server by modules such
#       as: auth_db, acc, usrloc, a.s.o.
#!define DBURL "sqlite:////usr/local/etc/kamailio/db.sqlite"
#!endif
...

...
####### Modules Section ########

# set paths to location of modules (to sources or installation folders)
#!ifdef WITH_SRCPATH
mpath="modules_k:modules"
#!else
mpath="/usr/local/lib/kamailio/modules_k/:/usr/local/lib/kamailio/modules/"
#!endif

#!ifdef WITH_MYSQL
loadmodule "db_sqlite.so"
#!endif
...

and kamctlrc:

...
## your SIP domain
SIP_DOMAIN=perazim.net

## chrooted directory
# $CHROOT_DIR="/path/to/chrooted/directory"

## database type: MYSQL, PGSQL, ORACLE, DB_BERKELEY, DBTEXT, or SQLITE
# by default none is loaded
#
# If you want to setup a database with kamdbctl, you must at least
specify
# this parameter
DBENGINE=SQLITE

## database host
# DBHOST=localhost
...

Still looks like kamailio is looking for mysql:

[root at travelmate yossi]# kamctl db show user
psql: could not connect to server: Connection refused
	Is the server running on host "localhost" and accepting
	TCP/IP connections on port 5432?
[root at travelmate yossi]# 


I checked db.sqlite permissions and this should not be a problem.

Tried it with firewall disabled just in case.

What did I miss?

Thanks,

Perazim






More information about the sr-users mailing list