Hi,
Asterisk 13.19.1
FreePBX 14.0.3.6
I need to use the PostgreSQL database to save the PBX configuration
At the moment, I have configured the ODBC driver to work with PostgreSQL
created 2 databases in PostgreSQL from Asterisk sources
1.Asterisk
2.Asteriskcdrdb
my configuration file /etc/asterisk/res_odbc_additional.conf has the following text:
[asteriskcdrdb]
enabled => yes
dsn => PostgreSQL-asteriskcdrdb
max_connections => 5
pooling => no
limit => 1
pre-connect => yes
username => postgres
password => 123456
database => asteriskcdrdb
The Asterix kernel console, when called odbc show, shows the following:
ODBC DSN Settings
Name: asteriskcdrdb
DSN: PostgreSQL-asteriskcdrdb
Last connection attempt: 1970-01-01 00:00:00
Number of active connections: 1 (out of 5)
Data about calls are written in PostgreSQL -> asteriskcdrdb everything is fine
Problem
When adding a new user through the web interface
Applications -> Extension-> Add SIP Extension
I specify the number, click Submit and Apply Config
eventually
/etc/asterisk/res_odbc_additional.conf
itself is changed to
[asteriskcdrdb]
enabled => yes
dsn => MySQL-asteriskcdrdb
pre-connect => yes
max_connections => 5
username => freepbxuser
password => bIxbp13Cl5NM
database => asteriskcdrdb
and the PostgreSQL database does not record calls
but in the core of Asteriks
odbc show shows
ODBC DSN Settings
Name: asteriskcdrdb
DSN: MySQL-asteriskcdrdb
Last connection attempt: 2018-06-11 09:52:20
Number of active connections: 1 (out of 5)
why there is a change of settings myself I do not know
Question
- How can I change the location of the Asterisk configuration from MySQL to the PostgreSQL database
in the database 1.Asterisk
- Where still it is necessary what that to adjust that change ODBC the driver did not occur independently?
I understand that the file /etc/asterisk/res_odbc_additional.conf is generated automatically, but I can not find where to fix it