How do I get to "active outside channels"?

Discussions about development of VICIDIAL and astGUIclient

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

How do I get to "active outside channels"?

Postby Baylink » Thu Mar 04, 2010 10:04 am

Since I'm the guy charged with keeping the T-1s running around here, I'd like to build myself a status page that shows me what's going on on a timeslot by timeslot basis: rows of (usually) 24 colored boxes, one for each timeslot on a span; green if the channel's active, blue if it's idle, yellow if it's been in-use more than a configurable time (for us, about 5 minutes), and red if the entire span is inop. Clearly, the last bit I'll have to dig out of things other than VICIdial, but it seems to me that the other info ought to be in the tables somewhere.

I looked at live_agents, but that only shows me the agent's channel, except for closers where it shows me a loopback.

I'm sure some table must have the information about the client side of each call, but there are a lot of tables. :-) Any pointers?
Baylink
 
Posts: 77
Joined: Wed Aug 06, 2008 10:58 am

Postby williamconley » Thu Mar 04, 2010 11:39 am

/var/log/asterisk/cdr-csv/Master.csv

Asterisk has an option of saving this data to a table instead (or in addition).
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby Baylink » Thu Mar 04, 2010 11:43 am

I'm not sure, but that doesn't *look* like something I can query once a second from an AJAX server-side script. ;-)
Baylink
 
Posts: 77
Joined: Wed Aug 06, 2008 10:58 am

Postby williamconley » Thu Mar 04, 2010 11:45 am

that would not be wise. but if you move it into a table and then run a script on it to collect the data you DO want FROM it into another table, you should be good.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby Baylink » Thu Mar 04, 2010 11:46 am

I'm not entirely sure, but it sounds as if you're solving a problem a couple steps removed from what I'm trying to do...

I'm trying to get the info out of the live tables; presumably, if it's in that .csv file, then it's being extracted from somewhere; the 'somewhere' is where I'm trying to go.
Baylink
 
Posts: 77
Joined: Wed Aug 06, 2008 10:58 am

Postby williamconley » Thu Mar 04, 2010 11:50 am

getting the information out is easy. but do you want to parse a multi-megabyte file every second? no. so you have to manipulate the data and extract a limited amount (suitable for fast parsing). mysql is very good at that. then you take that small result and place it in a tiny file and parse it every second.

have you done this before? :) (I am a professional, do not try this at home! LOL)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby Baylink » Thu Mar 04, 2010 12:26 pm

No, I don't want to parse a multimeg file every second. I want to do one 2-way join, and parse the results, inside my code. :-)

I should be able to get a join that will give me outside_channel, outside_server_ip, agent, seat, custphone, call_length with no more than 3 tables, I would hope, and the join shouldn't kill anything.

I just don't know the data dictionary well enough to know where to go, and I'm not aware there's any documented data dictionary available; is there?
Baylink
 
Posts: 77
Joined: Wed Aug 06, 2008 10:58 am

Postby williamconley » Thu Mar 04, 2010 12:40 pm

data dictionary for the asterisk csv log? don't think so.

for vicidial's table structure? Nope. The closest you would get to that is a structure only sql export. of course, you can query the system for structure as well, but that seems an awful stretch when the struct isn't changing and you CAN just look at it in phpMyAdmin and choose your data. It's all MyISAM, so you won't be doing a whole lot within the database
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby Baylink » Mon Mar 08, 2010 8:31 am

> but that seems an awful stretch when the struct isn't changing

Not pertinent when the problem is that I don't *know* the structure.

I've got a copy of deZigner laying around somewhere; I'll install that and extract the ERD from the database; that ought to get me where I want to go.
Baylink
 
Posts: 77
Joined: Wed Aug 06, 2008 10:58 am

Postby williamconley » Mon Mar 08, 2010 9:15 am

phpmyadmin ... have a look (built in to vicibox)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Development

Who is online

Users browsing this forum: No registered users and 11 guests