Re: [asterisk-users] Queue agent login notification

2011-09-09 Thread Ishfaq Malik
Hi

Is the MySQL database running?
Can you access the database from command line on that server?
Does the res_mysql.conf file have the same details to access the
database as you used from command line?

On Thu, 2011-09-08 at 22:25 +0300, Michael wrote:
 I changed to extconfig.conf to:
 [settings]
 queue_log = mysql,general
 
 and I get this error:
  MySQL RealTime: Failed to connect database server asterisk on
 localhost (err 2002). Check debug for more info.
 
 Seems there's some progress...
 
 On Thu, Sep 8, 2011 at 9:21 PM, Michael voip.quest...@gmail.com
 wrote:
 I made test calls and go this:
  res_config_mysql.c:789 store_mysql: MySQL RealTime: Invalid
 database specified: 'asterisk' (check res_mysql.conf)
 
 In extconfig.conf I started with:
 [settings]
 queue_log = mysql,asterisk
 
 
 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
Ishfaq Malik
Software Developer
PackNet Ltd

Office:   0161 660 3062


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Queue agent login notification

2011-09-08 Thread Ishfaq Malik
Here's the table structure

CREATE TABLE `queue_log` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `time` char(26) default NULL,
  `callid` varchar(32) NOT NULL default '',
  `queuename` varchar(32) NOT NULL default '',
  `agent` varchar(32) NOT NULL default '',
  `event` varchar(32) NOT NULL default '',
  `data` varchar(100) NOT NULL default '',
  `data1` varchar(100) default NULL,
  `data2` varchar(100) default NULL,
  `data3` varchar(100) default NULL,
  `data4` varchar(100) default NULL,
  `data5` varchar(100) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB

in your extconfig.conf you need a line along the lines of

queue_log=mysql,db-name,queue_log

you will also need an entry in your res_config_mysql.conf along the lines of

[db-name]
dbhost = location of db
dbname = db-name
dbuser = db-user
dbpass = db-pass
dbport = 3306

All the above are for asterisk 1.8

Regards

Ish



On Thu, 2011-09-08 at 09:20 +0500, Sam Govind wrote:
 you definitely need to create the file extconfig - take sample from
 internet. the DB tables need to be created on your own, take help from
 internet pages. 
 
 On Wed, Sep 7, 2011 at 6:19 PM, Michael voip.quest...@gmail.com
 wrote:
 I couldn't find the extconfig.conf file in /etc/asterisk and
 queue_log doesn't exist either (as a file or as a db table).
 We're using AsteriskNOW, so maybe these files/tables were not
 created.
 
 How should we add them?
 
 Thanks.
 
 On Wed, Sep 7, 2011 at 8:54 AM, Sam Govind
 govoi...@gmail.com wrote:
 
 See this link: 
 http://www.voip-info.org/wiki/view/Asterisk+queue_log
 +on+MySQL
 
 
 You'll find similar pages where you can setup to store
 queue logs/events(as Alex mentioned) in MySQL DB and
 further do your triggers or functions on them.
 
 --
 _
 -- Bandwidth and Colocation Provided by
 http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every
 Thurs:
   http://www.asterisk.org/hello
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
 
 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
Ishfaq Malik
Software Developer
PackNet Ltd

Office:   0161 660 3062


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Queue agent login notification

2011-09-08 Thread Michael
OK. I created the table and the file and restarted Asterisk.

How do I check to see that it's properly loaded and running?

Thanks.

On Thu, Sep 8, 2011 at 7:20 AM, Sam Govind govoi...@gmail.com wrote:

 you definitely need to create the file extconfig - take sample from
 internet. the DB tables need to be created on your own, take help from
 internet pages.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Queue agent login notification

2011-09-08 Thread Michael
I made test calls and go this:
 res_config_mysql.c:789 store_mysql: MySQL RealTime: Invalid database
specified: 'asterisk' (check res_mysql.conf)

In extconfig.conf I started with:
[settings]
queue_log = mysql,asterisk

As it didn't work, I added queue_log:
[settings]
queue_log = mysql,asterisk,queue_log

But this also doesn't work.

I noticed that res_mysql.conf wasn't present (AsteriskNOW system), so I
added it, but it didn't change matters.

Any suggestion?

Thanks.

On Thu, Sep 8, 2011 at 8:56 PM, Michael voip.quest...@gmail.com wrote:

 OK. I created the table and the file and restarted Asterisk.

 How do I check to see that it's properly loaded and running?

 Thanks.


 On Thu, Sep 8, 2011 at 7:20 AM, Sam Govind govoi...@gmail.com wrote:

 you definitely need to create the file extconfig - take sample from
 internet. the DB tables need to be created on your own, take help from
 internet pages.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Queue agent login notification

2011-09-08 Thread Michael
I changed to extconfig.conf to:
[settings]
queue_log = mysql,general

and I get this error:
 MySQL RealTime: Failed to connect database server asterisk on localhost
(err 2002). Check debug for more info.

Seems there's some progress...

On Thu, Sep 8, 2011 at 9:21 PM, Michael voip.quest...@gmail.com wrote:

 I made test calls and go this:
  res_config_mysql.c:789 store_mysql: MySQL RealTime: Invalid database
 specified: 'asterisk' (check res_mysql.conf)

 In extconfig.conf I started with:
 [settings]
 queue_log = mysql,asterisk


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Queue agent login notification

2011-09-07 Thread Michael
Thanks. I'll look into it.

On Wed, Sep 7, 2011 at 8:54 AM, Sam Govind govoi...@gmail.com wrote:

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

 You'll find similar pages where you can setup to store queue logs/events(as
 Alex mentioned) in MySQL DB and further do your triggers or functions on
 them.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Queue agent login notification

2011-09-07 Thread Michael
I couldn't find the extconfig.conf file in /etc/asterisk and queue_log
doesn't exist either (as a file or as a db table). We're using AsteriskNOW,
so maybe these files/tables were not created.

How should we add them?

Thanks.

On Wed, Sep 7, 2011 at 8:54 AM, Sam Govind govoi...@gmail.com wrote:

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

 You'll find similar pages where you can setup to store queue logs/events(as
 Alex mentioned) in MySQL DB and further do your triggers or functions on
 them.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Queue agent login notification

2011-09-07 Thread Sam Govind
you definitely need to create the file extconfig - take sample from
internet. the DB tables need to be created on your own, take help from
internet pages.

On Wed, Sep 7, 2011 at 6:19 PM, Michael voip.quest...@gmail.com wrote:

 I couldn't find the extconfig.conf file in /etc/asterisk and queue_log
 doesn't exist either (as a file or as a db table). We're using AsteriskNOW,
 so maybe these files/tables were not created.

 How should we add them?

 Thanks.

 On Wed, Sep 7, 2011 at 8:54 AM, Sam Govind govoi...@gmail.com wrote:

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

 You'll find similar pages where you can setup to store queue
 logs/events(as Alex mentioned) in MySQL DB and further do your triggers or
 functions on them.


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Queue agent login notification

2011-09-06 Thread Michael
We're using FreePBX and I'm wondering if it's possible to add to the
login/logout macros a command to execute an AGI/Command to launch an
external process for that.

Thanks.

On Fri, Aug 12, 2011 at 2:30 PM, Alex Vishnev alex9...@gmail.com wrote:

 you can monitor queue_log file for ADDMEMBER or REMOVEMEMBER events. from
 that point on, you can store them or take any other action.
 the other way is to use AMI an monitor for Agent login/logoff events
 On Aug 12, 2011, at 7:06 AM, Michael wrote:

  Hello,
 
  Is there a way to either store login/logout agent information in a
 database or at least send an email when an agent logs in or out of a queue?
 
  Thanks,
 
  Michael

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Queue agent login notification

2011-09-06 Thread Sam Govind
See this link:
http://www.voip-info.org/wiki/view/Asterisk+queue_log+on+MySQL

You'll find similar pages where you can setup to store queue logs/events(as
Alex mentioned) in MySQL DB and further do your triggers or functions on
them.


On Wed, Sep 7, 2011 at 10:46 AM, Michael voip.quest...@gmail.com wrote:

 We're using FreePBX and I'm wondering if it's possible to add to the
 login/logout macros a command to execute an AGI/Command to launch an
 external process for that.

 Thanks.

 On Fri, Aug 12, 2011 at 2:30 PM, Alex Vishnev alex9...@gmail.com wrote:

 you can monitor queue_log file for ADDMEMBER or REMOVEMEMBER events. from
 that point on, you can store them or take any other action.
 the other way is to use AMI an monitor for Agent login/logoff events
 On Aug 12, 2011, at 7:06 AM, Michael wrote:

  Hello,
 
  Is there a way to either store login/logout agent information in a
 database or at least send an email when an agent logs in or out of a queue?
 
  Thanks,
 
  Michael


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Queue agent login notification

2011-08-12 Thread Alex Vishnev
you can monitor queue_log file for ADDMEMBER or REMOVEMEMBER events. from that 
point on, you can store them or take any other action.
the other way is to use AMI an monitor for Agent login/logoff events
On Aug 12, 2011, at 7:06 AM, Michael wrote:

 Hello,
 
 Is there a way to either store login/logout agent information in a database 
 or at least send an email when an agent logs in or out of a queue?
 
 Thanks,
 
 Michael
 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users