updating the code you’ve got to the new queue report from Asterisk shouldn’t be that big a deal, and if you do it out on GitHub and post a new notes “here and there” that you’re working on it, you might get some help.
Can you give me some pointers on the “new queue report”? I’m only just starting with the CLI and using it for very basic tasks. I have created a simple script that runs “queue show” like the code I posted and which output some data, but have no clue as to what to so next. To be honest I have not looked into the result in depth.
This presents the structure “$result” with a data stream that you need to parse. The data being presented back to the program has probably changed, so the information you need to present needs to change. The ‘else’ leg of the program should be parsing this data out, and it looks like the data that’s being queried is a space delimited set of options (“Busy xxxx”, for example) which are then turned into an array (in $pieces) that are being displayed on the screen. The “pieces” have changed, so the data isn’t being presented correctly any more.
It’s pretty straightforward regex decoding.
If I was starting the project, I’d add a line that said something like "echo “<!-- $pieces[0] - $pieces[1] - …” to the code right at the top of the table rows (before the “<tr>” and then look at the page source and see what the pieces (0 through 9 ?) are so that you know which ones are which, then change the indexes on the display so the pieces are right.
I’d ALSO add a check at the top for the Asterisk Version so that the code would continue to work with the older expression of the “queue show …” command, but that’s just me.
Array
(
[0] => Privilege: Command
[1] => 778 has 0 calls (max unlimited) in 'ringall' strategy (4s holdtime, 162s talktime), W:0, C:2, A:2, SL:100.0% within 60s
[2] => Members:
[3] => Local/903@from-internal (ringinuse enabled) (dynamic) (Not in use) has taken no calls yet
[4] => Local/902@from-internal (ringinuse enabled) (dynamic) (Not in use) has taken no calls yet
[5] => Local/418@from-internal (ringinuse enabled) (dynamic) (Not in use) has taken 5 calls (last was 18277 secs ago)
[6] => No Callers
[8] => 63 has 0 calls (max unlimited) in 'ringall' strategy (11s holdtime, 169s talktime), W:0, C:18, A:6, SL:100.0% within 60s
[9] => Members:
[10] => Local/903@from-internal (ringinuse enabled) (dynamic) (Not in use) has taken no calls yet
[11] => Local/902@from-internal (ringinuse enabled) (dynamic) (Not in use) has taken no calls yet
[12] => Local/410@from-internal (ringinuse enabled) (dynamic) (Not in use) has taken no calls yet
[13] => Local/425@from-internal (ringinuse enabled) (dynamic) (Not in use) has taken 3 calls (last was 106 secs ago)
Rerun it with “queue show 778” and display the output (the program displays information based on a per-queue basis, so if you want to figure out the pieces, you need to work one queue at a time.
Based on looking at these queue reports once about a million years ago, here’s what I think is happening:
The ‘0’ is your “calls in the queue”.
The “Not in use” items are a +1 for “agent idle” and a “not +1” for “agents in call”.
There’s a document out on the Wiki somewhere that tells you what each of the pieces of the report means. It seems to me that “W:0” means “no calls waiting”, “C:2” is the number of calls on the queue, “A:2” is the number of calls answered, and “SL” is the percentage of calls answered within the Service Limit of “60 seconds”.
Double check that, and if that’s the case, you can parse the metrics out from the line using normal regex information. I’m pretty sure the information you’re looking for is all here. It is just going to take you a few minutes to figure out the pieces and parse them out of the report.