Hello @all,
can anybody help me with that?
WARNING[22257] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Data source name not found, and no default driver specified
WARNING[22257] cdr_adaptive_odbc.c: No such connection ‘asteriskcdrdb’ in the ‘adaptive_connection’ section of cdr_adaptive_odbc.conf. Check res_odbc.conf.
I checked all the files, but always after restarting asterisk this error will not go away. I tried a lot, nothing really helped me to solve this problem.
Other errors while starting asterisk are like:
ERROR[22574] res_sorcery_config.c: Could not create an object of type ‘auth’ with id ‘dcs-trunk-auth’ from configuration file ‘pjsip.conf’
ERROR[22574] res_pjsip/config_auth.c: No authentication username for auth ‘dcs-auth’
But, there, on this part i have no real config @all, therefore this errors are regular.
But how can i solve this
[unixODBC][Driver Manager]Data source …
problem?
I do have this files:
#######################################################
/etc/asterisk/freepbx.conf:
#######################################################
/etc/asterisk/odbc.ini
[MySQL-asteriskcdrdb]
Description=MySQL connection to asterisk database
driver=MySQL
server=localhost
database=asteriskcdrdb
username=freepbxuser
password=password
Port=3306
Socket=/var/lib/mysql/mysql.sock
option=3
#######################################################
/etc/odbcinst.ini
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
FileUsage = 1
#######################################################
/etc/asterisk/cdr_adaptive_odbc.conf
[adaptive_connection]
connection=asteriskcdrdb
loguniqueid=yes
table=cdr
alias start => calldate
#######################################################
/etc/asterisk/res_odbc.conf
[asteriskcdrdb]
enabled=>yes
dsn=>asteriskcdrdb
pre-connect=>yes
max_connections=>5
username=>freepbxuser
password=>password
database=>asteriskcdrdb
#include res_odbc_custom.conf
#include res_odbc_additional.conf
#######################################################
res_odbc_custom.conf
res_odbc_additional.conf
are blank.
#######################################################
Also i have an asterisk and a freepbxuser in the mysql-DB, you guess, the same password, password.
I am using for all conns/users the same password, it is a testing machine, not productive system, therefore there is no auth-data for connecting to a provider.
But before connecting to my provider, asterisk needs to connect to mysql(?)
*CLI> odbc show status
delivers
ODBC DSN Settings
#####################
*CLI> odbc show
ODBC DSN Settings
Name: asteriskcdrdb
DSN: asteriskcdrdb
Last connection attempt: 2018-10-10 22:03:38
Number of active connections: 0 (out of 5)
######################
Users in mysql:
±-----------------+
| User |
±-----------------+
| asterisk |
| freepbxuser |
| root |
| debian-sys-maint |
| phpmyadmin |
±-----------------+
5 rows in set (0.00 sec)
dbs are:
±-------------------+
| Database |
±-------------------+
| information_schema |
| asterisk |
| asteriskcdrdb |
| mysql |
| performance_schema |
| phpmyadmin |
±-------------------+
6 rows in set (0.00 sec)
Files in /etc/asterisk owns asterisk himself, also other needed dirs too.
Somehow, edting the files above, i lost the overview. Which user has to be connected with which db/dsn and which conf-file will assure with the right configuration the connection.
therefore ONE password.
Later i will change, reinstall with more secure ones.
Why i am getting this errors?
Thx in advance for any appreciated help.
ELindemann
PS:
asterisk-certified-13.21-cert2
complied on debian
3.16.0-4-amd64 #1 SMP Debian 3.16.51-3 (2017-12-13) x86_64 GNU/Linux