Queue Logfile Txt Format In MySQL Needed

Home » Asterisk Users » Queue Logfile Txt Format In MySQL Needed
Asterisk Users 2 Comments

Hello,

Iam using queues and agents, thats OK.

I have interesting information form Asterisk in txt file format var/log/asterisk/queue_log

Today Iam reading these txt files and wrote them in an mySQL databases.

I would need this information more realtime. Some information I do writing in the dialplan direct in an mySQL database.

Is there any way that Asterisk write this information direct in an mySQL
database instead of using var/log/asterisk/queue_log?

best regards Thomas

2 thoughts on - Queue Logfile Txt Format In MySQL Needed

  • Am Donnerstag, 21. Januar 2016, 09:52:53 schrieben Sie:

    Hi, thanks…

    in /etc/asterisk/res_config_mysql.c for example define in [mydatabase] acsess to your database

    in /etc/asterisk/extconfig.conf

    queue_log => mysql,mydatabase,queue_log

    CREATE TABLE IF NOT EXISTS `queue_log` (
    `id` int(10) unsigned NOT NULL auto_increment,
    `time` varchar(40) default NULL,
    `callid` varchar(80) NOT NULL default ”,
    `queuename` varchar(80) NOT NULL default ”,
    `agent` varchar(80) NOT NULL default ”,
    `event` varchar(32) NOT NULL default ”,
    `data` varchar(255) NOT NULL default ”,
    `data1` varchar(255) NOT NULL default ”,
    `data2` varchar(255) NOT NULL default ”,
    `data3` varchar(255) NOT NULL default ”,
    `data4` varchar(255) NOT NULL default ”,
    `data5` varchar(255) NOT NULL default ”, PRIMARY KEY (`id`)
    );

    after make an reload of asterisk info will be written in this table and not any more in the txt file….

    I found some explantion for the data written in the fields:
    https://wiki.asterisk.org/wiki/display/AST/Queue+Logs