Asterisk 11 queue log for mysql

How can I change the default queue log store from file to table in MySQL in Asterisk 11? /var/log/asterisk/queue_log

asteriskcdrdb.queue_log

+3


source to share


2 answers


You should have in /etc/asterisk/extconfig.conf:

[settings]
queue_log => mysql,dsn,tablename

      

and in the / etc / asterisk / res _config_mysql.conf file:



[dsn]
dbname = database_name
dbuser = database_user
dbpass = database_pass
dbcharset = utf8
requirements = warn

      

Schema for the table:

CREATE TABLE `tablename` (
  `id` bigint(255) unsigned NOT NULL AUTO_INCREMENT,
  `time` varchar(26) NOT NULL DEFAULT '',
  `callid` varchar(40) NOT NULL DEFAULT '',
  `queuename` varchar(20) NOT NULL DEFAULT '',
  `agent` varchar(20) NOT NULL DEFAULT '',
  `event` varchar(20) NOT NULL DEFAULT '',
  `data` varchar(100) NOT NULL DEFAULT '',
  `data1` varchar(40) NOT NULL DEFAULT '',
  `data2` varchar(40) NOT NULL DEFAULT '',
  `data3` varchar(40) NOT NULL DEFAULT '',
  `data4` varchar(40) NOT NULL DEFAULT '',
  `data5` varchar(40) NOT NULL DEFAULT '',
  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `queue` (`queuename`),
  KEY `event` (`event`)
) DEFAULT CHARSET=utf8;

      

+6


source


I suggest you take a look at the following link:

http://www.voip-info.org/wiki/view/Asterisk+queue_log+on+MySQL



Keep in mind that most of these configurations are already well known and will be documented on the www.voip-info.org wiki.

+1


source







All Articles