1
我有一個小問題。我使用的是Debian,而且我得到了星號1.8,我想使用CDR和mysql一起使用。 在星號1.8中,你顯然必須使用cdr-adaptive模塊而不是常規模塊。這正是我所做的。現在我有1個錯誤,當我「模塊重裝cdr_adaptive_odbc.so」我解決不了:星號1.8 cdr自適應mysql
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 /星號/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
這是我所得到的,當我去檢查ODCB
ODBC DSN Settings
-----------------
Name: Asterisk
DSN: MySQL-asterisk
我無法弄清楚什麼是錯的。任何人有想法?
嗨, 感謝您的回答! 這個項目有點遠在我後面,但是我解決了這個問題,如果我確實記得,有兩個問題。第一個是你剛剛說的那個。這是固定的,在[MYSQL]下的驅動程序的位置是錯誤的。 這兩個變化都解決了我的問題。 謝謝! – user2407268