Asterisk 11中的MySQL CDR?

时间:2014-09-10 21:52:31

标签: mysql asterisk

由于Asterisk 1.8 MySQL CDR存储是内置的(cdr_mysql.so已被弃用,Asterisk附加组件也是如此)。我配置了一个cdr_mysql.conf(类似于res_config_mysql.conf中的设置可以工作)并且我运行了mySQL并创建了cdr表(并且是Asterisk可以写入表)。但是,我没有在该表中获得CDR(我确实获得了Master.csv CDR)。我错过了什么?

建议?

2 个答案:

答案 0 :(得分:0)

在星号11中cdr_mysql仍可通过

进行选择
make menuconfig

被剥夺了。由于cdr_odbc工作相同,我没有看到任何问题。

您还需要包含cdr.conf文件

[general]

; Define whether or not to use CDR logging.  Setting this to "no" will override
; any loading of backend CDR modules.  Default is "yes".
enable=yes

cdr_custom.conf就像这样

[mappings]
Master.csv => ${CSV_QUOTE(${CDR(clid)})},${CSV_QUOTE(${CDR(src)})},${CSV_QUOTE(${CDR(dst)})},${CSV_QUOTE(${CDR(dcontext)})},${CSV_QUOTE(${CDR(channel)})},${CSV_QUOTE(${CDR(dstchannel)})},${CSV_QUOTE(${CDR(lastapp)})},${CSV_QUOTE(${CDR(lastdata)})},${CSV_QUOTE(${CDR(start)})},${CSV_QUOTE(${CDR(answer)})},${CSV_QUOTE(${CDR(end)})},${CSV_QUOTE(${CDR(duration)})},${CSV_QUOTE(${CDR(billsec)})},${CSV_QUOTE(${CDR(disposition)})},${CSV_QUOTE(${CDR(amaflags)})},${CSV_QUOTE(${CDR(accountcode)})},${CSV_QUOTE(${CDR(uniqueid)})},${CSV_QUOTE(${CDR(userfield)})},${CDR(sequence)}

答案 1 :(得分:0)

没有ODBC!只需启用 make menuselect 中的所有Mysql(即使它已被删除)并运行:

make clean & make & make install

干净 - 是必要的! modules.conf 中写下:

load => app_db.so
load => app_cdr.so
load => app_mysql.so
load => cdr_csv.so
load => cdr_mysql.so
load => func_cdr.so
load => func_db.so

cdr.conf

[general]
enable=yes

cdr_mysql.conf 中 - 全部用于连接MySQL。

毕竟这是转到CLI并输入 cdr show status 并寻找mysql! ))尝试使用此命令之前)

CLI> cdr show status
Call Detail Record (CDR) settings
----------------------------------
  Logging:                    Enabled
  Mode:                       Simple
  Log unanswered calls:       Yes
  Log congestion:             No

* Registered Backends
  -------------------
    mysql
    csv