我们使用Asterisk 1.6.2.20,FreePBX 2.9.0.12。记录存储在cdr数据库表中。但报告显示没有条目。有人知道原因吗?
以下是详细信息:
mysql> select count(*) from cdr;
+----------+
| count(*) |
+----------+
| 127 |
+----------+
1 row in set (0.00 sec)
asterisk*CLI> cdr mysql status
Connected to asterisk on socket file default using table cdr for 6 days, 19 hours, 26 minutes, 22 seconds.
Wrote 79 records since last restart.
asterisk*CLI> cdr show status
Call Detail Record (CDR) settings
----------------------------------
Logging: Enabled
Mode: Simple
Log unanswered calls: No
* Registered Backends
-------------------
mysql
The cdr_mysql.conf:
[global]
hostname=localhost
dbname=asterisk
password=asterisk
user=asterisk
userfield=1
loguniqueid=yes
;port=3306
;sock=/tmp/mysql.sock
答案 0 :(得分:0)
检查文件中的freepbx数据库配置:
/admin/libraries/freepbx_conf.class.php
答案 1 :(得分:0)
我已经解决了这个问题。
首先,我在 /etc/freepbx.conf 中设置了正确的值。
其次我在 /var/www/html/admin/bootstrap.php 中替换了字符串:
'database' => $amp_conf['CDRDBNAME'] ? $amp_conf['CDRDBNAME'] : 'asteriskcdrdb',
使用:
'database' => $amp_conf['CDRDBNAME'] ? $amp_conf['CDRDBNAME'] : $amp_conf['AMPDBNAME'],
第三,我在 /var/www/html/admin/cdr/lib/defines.php 中替换了字符串:
define ("DBNAME", (( (!isset($amp_conf["CDRDBNAME"]) || !$amp_conf["CDRDBNAME"]) ? "asteriskcdrdb" : $amp_conf["CDRDBNAME"] )) );
使用:
define ("DBNAME", (( (!isset($amp_conf["CDRDBNAME"]) || !$amp_conf["CDRDBNAME"]) ? $amp_conf['AMPDBNAME'] : $amp_conf["CDRDBNAME"] )) );