Author Topic: XML-RPC realtime method does not filter by queue  (Read 6373 times)

Marquis

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
    • View Profile
    • Email
XML-RPC realtime method does not filter by queue
« on: August 21, 2007, 17:51:54 »
I'm having a hard time with the realtime XML-RPC method, in particular that even though I'm giving it a queue name it is still returning the stats for *all* queues.

Here's a sample method call and its response:

####
T 10.1.1.1:59310 -> 10.2.1.1:8088 [AP]
POST /queuemetrics/xmlrpc.do HTTP/1.1.
TE: deflate,gzip;q=0.3.
Connection: TE, close.
Host: queuemetrics.domain.com:8088.
User-Agent: libwww-perl/5.805.
Content-Type: text/xml.
Content-Length: 481.
.
<?xml version="1.0"?>
<methodCall>
<methodName>QM.realtime</methodName>
<params>
<param><value><string>ithd-q</string></value></param>
<param><value><string>username</string></value></param>
<param><value><string>password</string></value></param>
<param><value><string></string></value></param>
<param><value><string></string></value></param>
<param><value><array><data>
<value><string>RealTimeDO.RTRiassunto</string></value></data></array></value>
</param>
</params>
</methodCall>

##
T 10.2.1.1:8088 -> 10.1.1.1:59310 [A]
HTTP/1.1 200 OK.
Server: Apache-Coyote/1.1.
Set-Cookie: JSESSIONID=49AE0E17B7FCCB52628A6EC94A38C30B; Path=/queuemetrics.
Content-Type: text/xml.
Content-Length: 1654.
Date: Tue, 21 Aug 2007 15:48:01 GMT.
Connection: close.
.
<?xml version="1.0" encoding="ISO-8859-1"?><methodResponse><params><param><value><struct><member><name>result</name><value><array><data><value><array><data><value><string>Status</string></value><value><string>OK</string></value></data></array></value><value><array><data><value><string>Description</string></value><value><string></string></value></data></array></value><value><array><data><value><string>Time elapsed (ms)</string></value><value><i4>97</i4></value></data></array></value><value><array><data><value><string>QM Version</string></value><value><string>1.3.5</string></value></data></array></value></data></array></value></member><member><name>RealTimeDO.RTRiassunto</name><value><array><data><value><array><data><value><string>&amp;nbsp;</string></value><value><string>Queue &amp;nbsp;</string></value><value><string>N. agents</string></value><value><string>Ready agents</string></value><value><string>On pause</string></value><value><string>Unk</string></value><value><string>Bsy</string></value><value><string>N. Calls waiting</string></value><value><string>On phone inbound</string></value><value><string>On phone outbound</string></value></data></array></value><value><array><data><value><string>&amp;nbsp;<
##
T 10.2.1.1:8088 -> 10.1.1.1:59310 [AP]
/string></value><value><string>All selected</string></value><value><string>16</string></value><value><string>9</string></value><value><string>7</string></value><value><string>0</string></value><value><string>0</string></value><value><string>0</string></value><value><string>0</string></value><value><string>0</string></value></data></array></value></data></array></value></member></struct></value></param></params></methodResponse>
####


If there's something wrong with that, please let me know.  But it looked ok to me (or else why would I be asking :) ).

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: XML-RPC realtime method does not filter by queue
« Reply #1 on: August 21, 2007, 18:24:25 »
"All Selected" is the same as one single queue, is fyou selected that single queue  ;D

Marquis

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
    • View Profile
    • Email
Re: XML-RPC realtime method does not filter by queue
« Reply #2 on: August 21, 2007, 18:52:43 »
"All Selected" is the same as one single queue, is fyou selected that single queue  ;D

Actually, it's not the "All Selected" that I dispute, it is the actual values returned.  On this box, it is returning the collected values of *all* queues rather than just the one that I asked for.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: XML-RPC realtime method does not filter by queue
« Reply #3 on: August 21, 2007, 19:06:24 »
I am filing this as  a possible bug - from what I know of QM's "guts" it seems pretty strange, but anything is possible  ;D

Marquis

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
    • View Profile
    • Email
Re: XML-RPC realtime method does not filter by queue
« Reply #4 on: August 21, 2007, 21:20:32 »
I don't know if this helps or is redundant, but I get the exact same values as if I were on the Realtime Monitoring page and clicked "Show any agent" where I would expect it to return the values that are displayed with "Show members only".

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: XML-RPC realtime method does not filter by queue
« Reply #5 on: August 21, 2007, 22:13:21 »
This looks correct then - But I'll have the tech people have a look, just in case.

Marquis

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
    • View Profile
    • Email
Re: XML-RPC realtime method does not filter by queue
« Reply #6 on: August 21, 2007, 22:25:56 »
By correct, do you mean you the behavior I'm experiencing is by design, or I am correct that this is a bug. ;)


QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: XML-RPC realtime method does not filter by queue
« Reply #7 on: August 22, 2007, 09:21:24 »
No I think it's by design, as long as you get the same results of the realtime page without pressing any button on it.

Marquis

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
    • View Profile
    • Email
Re: XML-RPC realtime method does not filter by queue
« Reply #8 on: August 22, 2007, 13:21:22 »
If that is by design, then I would claim it is horribly flawed.  You aren't really getting per-queue stats unless you get the "Show members only" data.  Is there by any chance some way to modify my XML-RPC query so that's what i get?

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: XML-RPC realtime method does not filter by queue
« Reply #9 on: August 22, 2007, 18:54:43 »
I run the following test:

I have a system with many calls on it, but none on "Q Test" (which internal name is queue-test). I run a realtime report for it and I get:

Response block: RealTimeDO.RTRiassunto
Code: [Select]
Queue  N. agents Ready agents On pause Unk Bsy N. Calls waiting On phone inbound On phone outbound
All selected 0 0 0 0 0 0 0 0

(Sorry if it's not really readable - hard to format)
This is correct - I get that All selected queues are zero calls and zero agents.

If I run a call to it, I get:

Response block: RealTimeDO.RTRiassunto
Code: [Select]
Queue  N. agents Ready agents On pause Unk Bsy N. Calls waiting On phone inbound On phone outbound
All selected 0 0 0 0 0 1 0 0
Q Test 0 0 0 0 0 1 0 0
   

This looks correct to me as well - I have one call waiting in the queue, and so one waiting as well in "All selected" that is the same as my very queue.

About the problem with agents, Asterisk agents are - generally speaking - not linked to one specific queue, so the agent logon/logoff status is orthogonal to the taken calls system.
If you'd like the "Show members only" button to be pressed for XML-RPC reports, well, you can change the default setting in configuration.properties and Qm will use that setting.

And yes, I agree, it would be nice to be able to override system settings from the XML-RPC interface as well - but this might be for the future releases  ;D

Marquis

  • Newbie
  • *
  • Posts: 20
  • Karma: 0
    • View Profile
    • Email
Re: XML-RPC realtime method does not filter by queue
« Reply #10 on: August 22, 2007, 19:21:09 »
OK, I now understand what's going on.  If I change realtime.members_only to 0, then I get the behavior I would expect.
« Last Edit: August 22, 2007, 19:30:48 by Marquis »

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: XML-RPC realtime method does not filter by queue
« Reply #11 on: August 22, 2007, 19:43:56 »
That's correct.