CDR databases installation


System requires two databases: one for routing and one for CDRs. Setting up different PostgreSQL instances is highly recommended to make replication possible.

Packages installation

CDRs databases require similar set of packages as routing database

# apt update && apt install postgresql-9.4 postgresql-contrib-9.4 postgresql-9.4-prefix postgresql-9.4-pgq3 postgresql-9.4-pgq-ext postgresql-9.4-yeti pgqd

or for Debian 9 and Postgresql 10:

# apt update && apt install postgresql-10 postgresql-10-prefix postgresql-10-pgq3 postgresql-10-pgq-ext postgresql-10-yeti pgqd


Since yeti-web version 1.6.0 it is important to install Postgresql from PGDG repository. See Repositories configuration for details

Databases creation

Create routing database

# su - postgres
$ psql
postgres=# create user cdr encrypted password 'somepassword' superuser;
postgres=# create database cdr owner cdr;
postgres=# \q


It’s recommended to choose databases names, usernames and passwords different from specified in this manual for security reasons.

For large installations it’s recommended to place CDR database on dedicated server.

PGQd ticker

After initialization of CDR database you should run pgq ticker daemon(pgqd) on server with CDR database.

Create configuration file /etc/pgqd.ini

base_connstr = host= port=5432 dbname=cdr user=cdr password=somepassword
initial_database = cdr
database_list = cdr
script = /usr/bin/pgqd
pidfile = /var/run/postgresql/

Then you should start ticker:

# service pgqd start


Check if databases were successfully created and are accessible:

root@cdr-server:/# psql -h -U cdr -d cdr
Password for user cdr:  psql (9.4.5) SSL connection
(cipher: DHE-RSA-AES256-GCM-SHA384, bits: 256)
Type "help" for help.

cdr=# \q

Don’t forget to make changes in /etc/postgresql/9.4/main/pg_hba.conf and apply them if you plan to access this databases from other hosts and/or set up database replication