将星号cdr导出到phpmyadmin

时间:2016-04-16 15:48:48

标签: asterisk

我正在使用Asterisk处理PHP项目。我需要将Asterisk CDR存储在数据库中。我想知道如何将Asterisk连接到phpmyadmin。我在centos 6上安装了Asterisk(安装在虚拟机上) box)和phpmyadmin安装在另一个系统上。

2 个答案:

答案 0 :(得分:0)

Asterisk支持直接mysql cdr日志。所以不需要做那样的事情

http://www.voip-info.org/wiki/view/Asterisk+cdr+mysql

答案 1 :(得分:0)

您需要 cdr_mysql 模块。它位于插件类别中。

配置位于 /etc/asterisk/cdr_mysql.conf

[global]
dbname = asteriskcdrdb
user = asterisk
password = supersecret
charset = utf8
table = cdr
;timezone = UTC
;compat = no
hostname = 127.0.0.1
port = 3306

检查模块是否已加载:

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

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

检查连接是否成功:

asterisk*CLI> cdr mysql status
Connected to asteriskcdrdb on 127.0.0.1 using table cdr for 8 days, 12 hours, 8 minutes, 38 seconds.
  Wrote 0 records since last restart.