WARNING[23172]: cdr_adaptive_odbc.c:123 load_config: No such connection 'MySQL-asterisk' in the 'adaptive-connection' section of cdr_adaptive_odbc.conf. Check res_odbc.conf.
现在这里有所有相关的文件,我无法理解有什么问题:
/etc/odbc.ini:
[MySQL]
Description = MySQL ODBC MyODBC Driver
Driver = /usr/lib/libmyodbc3.so
FileUsage = 1
[Text]
Description = ODBC for Text Files
Driver = /usr/lib/libodbctxt.so
Setup = /usr/lib/libodbctxtS.so
FileUsage = 1
CPTimeout =
CPReuse =
[PostgreSQL]
Description = PostgreSQL driver for Linux & Win32
Driver = /usr/lib/libodbcpsql.so
Setup = /usr/lib/libodbcpsqlS.so
FileUsage = 1
[DB2]
Description = DB2 Driver
Driver = /opt/IBM/db2/V8.1/lib64/libdb2.so
FileUsage = 1
DontDLClose = 1
DMEnvAttr = SQL_ATTR_UNIXODBC_ENVATTR={DB2INSTANCE=db2inst1}
[MySQL-asterisk]
Description = MySQL asterisk database
Driver = MySQL
Socket = /var/run/mysqld/mysqld.sock
Server = localhost
User = root
Password = XXXXX
Database = ics
Option = 3
/etc/asterisk/cdr_adaptive_odbc.conf:
[adaptive-connection]
connection = MySQL-asterisk
table = cdr
alias start => calldate
/etc/asterisk/res_odbc.conf:
[Asterisk]
enabled => yes
dsn => MySQL-asterisk
username => root
password => XXX
;pooling => no
;limit => 0
pre-connect => yes
这是我检查cdd状态时得到的结果:
Call Detail Record (CDR) settings
----------------------------------
Logging: Enabled
Mode: Simple
Log unanswered calls: No
* Registered Backends
-------------------
Adaptive ODBC
cdr-custom
ODBC
csv
radius
res_config_sqlite
这是我检查de odcb时得到的结果
ODBC DSN Settings
-----------------
Name: Asterisk
DSN: MySQL-asterisk
我无法弄清楚出了什么问题。有人有想法吗?
答案 0 :(得分:0)
我认为你现在已经解决了这个问题。我遇到了类似的问题,问题源于文档。它指的是cdr_adaptive_odbc.conf中的connection=
是DSN名称。这是你想要的名字而不是DSN。所以在你的情况下:
connection = Asterisk
然后在命令行执行
CLI> module reload cdr_adaptive_odbc.so
当Asterisk找到表并执行您指定的任何映射时,您应该看到一个完整的屏幕。