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
Kevin Larsen
2016-Jan-21 15:52 UTC
[asterisk-users] Queue logfile txt format in mySQL needed
> From: Thomas <thomasitcom at gmail.com> > To: asterisk-users at lists.digium.com, > Date: 01/21/2016 04:17 AM > Subject: [asterisk-users] Queue logfile txt format in mySQL needed > Sent by: asterisk-users-bounces at lists.digium.com > > 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 dowriting 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?I haven't done this myself, but it looks like you just need to set up the appropriate database connections. See here for a semi-recent example: http://stackoverflow.com/questions/30161384/asterisk-11-queue-log-to-mysql ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160121/7798cbb2/attachment.html>
Am Donnerstag, 21. Januar 2016, 09:52:53 schrieben Sie:> > From: Thomas <thomasitcom at gmail.com> > > To: asterisk-users at lists.digium.com, > > Date: 01/21/2016 04:17 AM > > Subject: [asterisk-users] Queue logfile txt format in mySQL needed > > Sent by: asterisk-users-bounces at lists.digium.com > >> > database instead of using var/log/asterisk/queue_log? > > I haven't done this myself, but it looks like you just need to set up the > appropriate database connections. See here for a semi-recent example: > http://stackoverflow.com/questions/30161384/asterisk-11-queue-log-to-mysqlHi, 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