我正在使用Asterisk处理一个PHP问题。我需要在数据库中存储Asterisk CDR。我想知道如何将Asterisk连接到phpmyadmin。我在centos 6上安装了Asterisk(安装在虚拟机上),在另一个系统上安装了phpmyadmin。
Asterisk支持直接mysql-cdr日志。所以不需要做任何类似的事情
http://www.voip-info.org/wiki/view/Asterisk+cdr+mysql
您将需要cdr_mysql模块。它属于插件类别。
配置位于/etc/星号/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.