Home
Accessing QueueMetrics through its XML-RPC interface
Contents
1. array set QA infor scores to be Each item code should be defined Bach item will be associated to a score number or an empty string if N A only for Not Mandatory fields Sgrading_info new XML_RPC_Value array NMYN gt new XML_RPC_Value string NMNUM gt new XML_RPC_Value 20 string MNUM gt new XML_RPC_Value 60 string MMUL gt new XML_RPC_Value 100 string ko MSTELUCE general invocation parameters S the documentation Sparams array new XML RPC_Value new XML RPC_Value robot new XML RPC_Value robot new XML_RPC_Value 2010 06 16 12 32 00 new XML RPC_Value 3600 new XML_RPC_Value Test GUI items new XML _RPC_Value 1276684326 309 Sgrading_info Scomments_block Sreq_blocks Loway research Example Accessing QueueMetrics from JavaScript 7 i Smsg new XML_RPC_Message QM qaformgrading Sparams Scli new XML_RPC_Client S qm_webapp xmlrpc do qm_server Sqm_port cli gt setDebug 1 Sresp cli gt send msg if Sresp echo Communication error Scli gt errstr exit if Sresp gt faultCode echo Fault Code S resp gt faultCode n echo Fault Reason Sresp gt faultString n else Sval Sresp gt value Sblocks XML_RPC_decode val now w
2. Accessing QueueMetrics through its XML RPC interface Loway Revision History Revision Revision 1 14 Date 2010 10 04 10 33 06 L covers QueueMetrics 1 6 2 0 Table of Contents Document CONtEMtS saena e a e a Seebos gobs cawuas sub taadtbehacs Coetd es S E a S EE EE 2 Revision Bistory eepo NE EE A E E RE E E ERN Penta R E E EEE 2 What is XMT RPO T e E E E a ede A eet sabe cos T ski Sandee ER IE AR T 2 Which functions does QueueMetrics export as XML RPC essessssseesseesrrersrrrrrerreersreeereees 3 Example accessing QueueMetrics from Python ses sssessssesrssessrerrsrrerrsrrerrererrrererreersreee 3 Example Accessing QueueMetrics from Java ssesssssesssssrssrerrsrrerrresrrrrerreresrreersreerrrees 3 Example Accessing QueueMetrics from PHP ssssnenesssssessesesssrerereserrsssresesrerererrsrsreresese 4 Example Accessing QueueMetrics from JavaScript seessesrsseerrsrrerrerssrrrrerrerrerrerreresreee 7 Understanding call parameters sisin e a E con A E eE R a a ay 9 The method QMistats iecerei rsoda e Ee ERE EEEE EEE p EE ENE EEES EERE 9 The method QM realtime syen e e e a a e EE Eaei 10 The method QM qareport ienris er cies E E E dk os E E nee ols neaea bee 10 The method QM daformreport i oneni a n E a a REE EEE RE RES 11 The method QM qaformsummary cceseceecneceeeneceeeeeceeeeeeeeeueeeeeneeeeeneeeeeneeeeeeeeeeenes 11 The method QM qaformegrading sessir EE R NE DEEE N EE NEE 12 Th
3. A sample PHP file that shows how to access the findAudio interface is supplied with QueueMetrics Understanding results The result of the analyses is made up of a Struct i e an associative array similar to Java s HashMap or Perl s Hash that maps block names to blocks Each block is a rectangular data container made up of an Array of Arrays of Strings The outer Array contains the rows while the inner ones will hold column values Loway research Using an external auth source for QueueMetrics 14 In the response you get all the requested blocks as of parameter 9 of the call plus a block named re sponse The block response will contain e The status of the call this should always be OK if no error was encountered If this is not OK the oth er blocks may be missing or be meaningless e The version of QueueMetrics running in the server e The time elapsed to run the report All other blocks will follow the convention that the inner Array 0 the first row will contain table headers while actual data will be present from row 1 onwards The table headers are the same you can see in the on screen representation The following Python code will run a simple dump of all the results in a readable form for t in res keys print Block t k for r in range len res t for c in range len res print res t r c print Nt ct K Print The output will look like the following one B
4. have to be explicitly declared Understanding call parameters There are three methods exported by the XML RPC interface and they are used for three different rea sons QM stats get the main historical stats QM realtime get the real time stats available since QM 1 3 5 QM qareport get the Quality Assessment statistics available since QM 1 6 0 QM qaformreport get some Quality Assessment Forms details available since QM 1 6 0 QM qaformsummary get Quality Assessment statistics related to same form available since QM 1 6 0 QM qaformgrading fill a QA form with the specified scores and or comments available since QM 2 0 0 todo QM auth use QueueMetrics as an auth server for third party software available since QM 1 3 5 The method QM stats This is the main methods exported its XML RPC name being QM stats It takes a number of arguments all of which must be supplied and all of which must have the correct data type They are 1 String Queue name or names the set of queues that must be include in the analysis They must be separated by a symbol if more than one queue is passed The queue name is the internal Asterisk queue name String Access username this one must be the user name of an active user holding the key ROBOT String Access password this one must be the clear text password of the given user name String Logfile always leave blank String Period always leave blank
5. s written in Java using the Redstone XML RPC client library import java io IOException import java util HashMap import java net URL Loway research Example Accessing QueueMetrics from PHP import redstone xmlrpc XmlRpcClient import java util ArrayList public class xmlRpcTestClient public void perform String stUrl http server 8080 qm130 xmlrpc do System setProperty org xml sax driver org apache xerces parsers SAXParser try XmlRpcClient client new XmlRpcClient stUrl false ArrayList arRes new ArrayList arRes add OkDO AgentsOnQueue arres add KoDO DiscCauses arRes add KoDO UnansByQueue arRes add DetailsDO CallsKO Object parms queue dps robot robot We NS M200 5S TOS LOMO 2 3s hos 2007 10 10 10 23 10 arRes Object token client invoke QM stats parms HashMap resp HashMap token System out println Resp resp catch Exceptione e printStackTrace public static void main String args xmlRpcTestClient c new xmlRpcTestClient try c perform catch Exception e e printStackTrace We ll have to explicitly set which XML parser to use for the rest the code looks very much alike the Python one Example Accessing QueueMetrics from PHP This example is based on PHP s XML_RPC class that is a part of PEAR and so should be preinstalled
6. with any modern PHP installation lt h1 gt A QueueMetrics XML RPC client in PHP lt h1 gt lt require_once XML RPC php Loway research Example Accessing QueueMetrics from PHP 5 Sqm_server 10 10 3 5 the QueueMetrics server address Sqm_port 8080 the port QueueMetrics is running on Sqm_webapp queuemetrics 1 3 3 the webapp name for QueueMetrics set which response blocks we are looking for Sreq_blocks new XML_RPC_Value array new XML_RPC_Value DetailsDO CallsOK new XML_RPC_Value DetailsDO CallsKO Narray general invocation parameters s the documentation Sparams array new XML_RPC_Value queue dps new XML RPC_Value robot new XML RPC_Value robot new XML RPC_Value new XML RPC_Value new XML RPC_Value 2007 01 01 10 23 12 new XML RPC_Value 2007 10 10 10 23 10 new XML RPC_Value Sreq_blocks Smsg new XML_RPC_Message QM stats Sparams Scli new XML_RPC_Client S qm_webapp xmlrpc do qm_server Sqm_port cli gt setDebug 1 Sresp cli gt send msg if Sresp echo Communication error Scli gt errstr exit if Sresp gt faultCode echo Fault Code Sresp gt faultCode n echo Fault Reason Sresp gt faultString n else Sval Sresp gt value Sblocks XML_RPC_decode val now we print out the deta
7. Answered SLA Oct 1 2010 Referenced QM manual for possible data blocks is XML RPC Wikipedia defines XML RPC as XML RPC is a remote procedure call protocol which uses XML to encode its calls and HTTP as a trans port mechanism It is a very simple protocol defining only a handful of data types and commands and the entire description can be printed on two pages of paper This is in stark contrast to most RPC sys tems where the standards documents often run into the thousands of pages and require considerable software support in order to be used This means that whatever your programming language of choice you can surely find an XML RPC li brary for it and once you have the library connection to QueueMetrics with it is straightforward Loway research Which functions does QueueMetrics export as XML 3 RPC Which functions does QueueMetrics export as XML RPC QueueMetrics exports the full results of an analysis in XML RPC so you can access whatever informa tion you feel you may need Information is divided into blocks i e sets of data that correspond roughly to the tables QM uses for its own output This means that you can build software that sits on top of QueueMetrics and uses its result as a starting point for further elaboration e g e Visualizing results with complex graphs currently not supported by QueueMetrics e Computing period comparison analyses one period versus another period e Accessing agen
8. It must be called with the following parameters 1 String Queue name or names the set of queues that must be included in the analysis They must be separated by a symbol if more than one queue is passed The queue name is the internal Asterisk queue name 2 String Access username this one must be the user name of an active user holding the key ROBOT 3 String Access password this one must be the clear text password of the given user name 4 String Logfile always leave blank 5 String Agent filter an agent s name like Agent 101 that must be the filter for all the relevant ac tivity 6 List A list of the required analyses to be returned to the client Each analysis name must be supplied as a String The same suggestions that are given for QM stats apply Important Please note that there is a difference between results produced by the XML rpc realtime calls and the realtime statistics produced through the QueueMetrics GUI when the key realtime members_only is equal to true The difference is related to the agents list shown Be ing the list of queues in the XML RPC call specified by a list of names instead of a list of queue unique identifiers is not possible to correctly identify elementary queues from macro queues having the same name In this situation the agent list will always be calculated as sum of all agents associated to all elementary queues composing the macro queue even if the macro queue has
9. String Start of period This must be written in exactly the format yyyy mm dd hh mm ss do not forget the dot between the date and the hour String End of period Same format as start of period String Agent filter an agent s name like Agent 101 that must be the filter for all the relevant ac tivity List A list of the required analyses to be returned to the client Each analysis name must be supplied as a String This call will start up a session in QueueMetrics check if the user exists and has the privilege to run the report run the analysis prepare the required results and return them At the end of the call the Queue Metrics session is destroyed so no data is kept for further elaboration Loway research The method QM realtime 10 This means that it s usually the most efficient thing to do to request all needed response information and once but it s wise to limit yourself to the minimum data set you will actually need as each block takes up CPU and memory space to be marshaled between the native Java format the intermediate XML for mat and the resulting client format It is also advisable to run large data set analysis at night time or when nobody is accessing the system as they may take quite a lot of RAM and CPU and this may slow down QueueMetrics for the other live users The method QM realtime This method is very similar to QM stats but it is used to retrieve the real time stats
10. String As set in QM if not set blank 1 Username String 2 Password String Loway research Response block names 16 Table 2 Output block Pos Name Type Comment 0 Status code String One of A authoritative S success F forbidden D delegate If other behaves as D 1 Real name String 2 Email String 3 Class name String Must match an existing class 4 User keys String The following values are implied in QM e Enabled yes e Masterkey no The actual user data is only read by QM in case A otherwise is ignored whatever is passed Tip As a reference implementation see the server that ships with QueueMetrics in the mysql utils xml rpc xmlrpc_auth_server php file It also contains an example of querying a LDAP server in PHP Configuration properties A set of two new configuration properties control external auth sources in in QM Property Description default authRpcServediflset XML RPC auth is used Points to the URL of the auth server default authSystemIdThe system ID for this QM license Can be currently any user chosen name for the system A Response block names Each XML RPC call will have its own admissible set of block names that can be asked for Response blocks come in families also known as Data Objects Each response block name is made up of the Data Object name dot the method name as in KoDO DiscCauses Remember that resp
11. ame or names the set of queues that must be included in the analysis They must be separated by a symbol if more than one queue is passed The queue name is the internal Asterisk queue name String Access username this one must be the user name of an active user holding the key ROBOT String Access password this one must be the clear text password of the given user name String Start of period This must be written in exactly the format yyyy mm dd hh mm ss do not forget the dot between the date and the hour String End of period Same format as start of period String Agent filter an agent s name like Agent 101 that must be the filter for all the relevant ac tivity String The form name for wich you need to have information List A list of the required analyses to be returned to the client Each analysis name must be supplied as a String The same suggestions that are given for QM stats apply The method QM qaformsummary This method is very similar to QM stats but it s used to retrieve aggregated information about a specific Quality Assessment Forms It must be called with the following parameters 1 String Queue name or names the set of queues that must be included in the analysis They must be separated by a symbol if more than one queue is passed The queue name is the internal Asterisk queue name String Access username this one must be the user name of an active u
12. by queue report AgentDetail Tracked calls details for each defined agent Response block names for QM qaformreport and QM qaformgrading DataObject QualAssFormDO Quality Assessment information related to QA Forms Method Description FormStructure The data structure of specified form Section Values Raw QA values for each section in forms matching the query Comments Comments associated to forms matching the query Response block names for QM qaformsummary DataObject QualAssDO Quality Assessment information related to QA Forms Method Description FormSummary Aggregated information for the specified form Response block names for QM auth The QM auth call will return one single block named auth This block contains the following information UserName the login name Status OK if authentication was passed or ERR if it was not passed FullName The user s full name e Email The user s email address e Class The name of the class the user belongs to e Keys The active key set of the user that is all keys given to the class plus or minus the keys that have been granted or revoked to this specifical user Masterkey If set to 1 this user has a Masterkey that is this user will pass each key ckeck e NLogons The number of logons the user has made Each successful QM auth call counts as a logon Loway research Response block names for QM findAudio 19 Respons
13. directly assigned agents The method QM qgareport This method is very similar to QM stats but it s used to retrieve Quality Assessment statistics It must be called with the following parameters 1 String Queue name or names the set of queues that must be included in the analysis They must be separated by a symbol if more than one queue is passed The queue name is the internal Asterisk queue name 2 String Access username this one must be the user name of an active user holding the key ROBOT 3 String Access password this one must be the clear text password of the given user name Loway research The method QM qaformreport 11 String Start of period This must be written in exactly the format yyyy mm dd hh mm ss do not forget the dot between the date and the hour String End of period Same format as start of period String Agent filter an agent s name like Agent 101 that must be the filter for all the relevant ac tivity String The form name for wich you need to have information List A list of the required analyses to be returned to the client Each analysis name must be supplied as a String The same suggestions that are given for QM stats apply The method QM gaformreport This method is very similar to QM stats but it s used to retrieve raw information about Quality Assess ment Forms It must be called with the following parameters 1 String Queue n
14. e method QM auth seras ara a a a E RE TEE N E EN 12 The method QM findAUCIO seetri neer e a e a eE EE Ea NE 13 Understanding results ennenen a E E pE AE wis S AE E A E S NS 13 Using an external auth source for QueueMetrics ss eseesseessrerrsrrsrrrresrererrrerrsrreereresreeeereeees 14 Log on proced re hesusp cheese ce ooreen iT a E A a T TE E Me E a i yDs 14 XML RPC call parameters sasv csesjssqcued nee ea N E EEEN n 15 A Response block ET a ei edie A E EE EA E A I he 16 Response block names for QM stats sssrssensepecsrssstsrirsirsiostspeivedespu seste eeaeeeeeeeeeeeeeeeeeaees 16 Response block names for QM realtime 0 0 0 0 ce ceeeeeceeenecceeceeceeceeceeeereeeeeeeaseeeeanereeaeenes 17 DataObyect RealttmeDO 3 0 jjascscesh ie cceesoss rent ea ead ecg ee own tee tied aoa canes ethos Meek 17 Response block names for QM qareport cececeeeceeeneceeeeeceeeeceeeeeeaeeeeaeeeeaeeneeaeeneeas 17 DataOby ct QualAsSsDO rei nr eevee deeheugessge tee ahshs wetess paved deers Saude desea seeby outs 17 Response block names for QM gaformreport and QM qaformgrading cece eeeeee eee ee 18 DataObyect QualAssFormDO Seiri aeea a cubs gens A seston sauee dazaav edness 18 Response block names for QM qaformsummiaty cceeeecceeceeeceeeceeeeeeeeaeeeaeeae eeu eees 18 DataObyect QualAssDO inc en n thes seueesapetis egies aE thes o E Iae 18 Response block names for QM auth 2 0 0 0 cece ce cece ence ence eeeeeceeee
15. e block names for QM findAudio The QM findAudio call will return one single block named AudioFiles This block contains the following information Column 0 Filename A file name of the audio file e Column 1 URL The download URL for this audio recording If no calls are found the block has zero rows Appendix II A short list of XML RPC libraries To access QueueMetrics you only need a library with Client capabilities Server capabilities are not needed The following list is by no means exhaustive of all possible implementations available Perl Python JavaScript JavaScript 2 Java C C C Net VisualBasic PHP The BlackPerl library is available at http www blackperl com RPC XML The xmlrpclib ships with any modern version of the language The JSON XML RPC library can be found at http code google com p json xml rpc The Jsolait library also offers an XML RPC module http jsolait net There are a lot of implementations available for Java we recommend Redstone s LGPL library http xmlrpc sourceforge net See http xmlrpc c sourceforge net A connector is available at http www xml rpc net A COM component that will work on most languages on the Windows plat form http sourceforge net projects comxmlrpe The package XML_RPC is a part of the standard Pear library Loway research
16. e print out the details printBlock result Sblocks printBlock QualAssFormDO FormStructure Sblocks printBlock QualAssFormDO SectionValues Sblocks printBlock QualAssFormDO Comments Sblocks output a response block as HTML function printBlock Sblockname Sblocks echo nResponse block Sblockname n Sblock Sblocks blockname for r 0 Sr lt sizeof block Sr echo n for Sc 0 c lt sizeof S block r Sct echo Sblock Sr c t gt As you can see it is very similar to the other programming languages and reading into the results is simply a matter of selecting the correct block and then accessing the data cell by row and column The added complexity is due to the explicit error condition check and result printout Example Accessing QueueMetrics from JavaScript In order to access the XML RPC interface from JavaScript you need to use an adaptor library We have been able to use successfully a library called JSON XML RPC that can be found at http code google com p json xml rpc in a file caller rpc js Generally speaking a JavaScript client can make requests only against the same server that is serving the HTML page therefore you need to install it on the same server as QueueMetrics creating a separate webapp Loway research Example Accessing QueueMetrics from JavaScript lt html gt lt head gt lt title gt javascript_c
17. eeeseeeeaeeea essa seas eeaeeegs 18 Response block names for QM findAUdio 2 0 0 0 eee ee ce cence cece eee neceneeeneeeeeeeeeeeeeeeeeeaes 19 Appendix II A short list of XML RPC libraries 1 0 0 0 eee eee cee cee ce eeceeeeeeeeaeeea essa eeu eeueeegs 19 Loway research Document contents Document contents This document details how to access and use the XML RPC access functionality in Loway QueueMet rics This makes it possible for your programs to leverage the power of QueueMetrics by calling a very simple API with bindings available in nearly every programming language Revision history What Nov 13 2006 First draft March 22 2007 Added PHP example April 13 2007 raw blocks available May 11 2007 real time blocks and auth server Jun 11 2007 multi stint calls Nov 11 2007 enter queue position and schedule adherence Nov 10 2008 Added Outcomes data blocks and external XML RPC Authentication description Jan 14 2009 Added support for JavaScript Feb 11 2009 Moved to AsciiDoc format for ease of updating Feb 17 2009 Added QM findAudio methods Aug 07 2009 Added QM qareport and QM qaformreport reports Aug 10 2009 Added AgentsDO AnsCallsCG for Answered calls by custom group reporting Dec 2 2009 Added QM qaformsummary report Jul 8 2010 Added new blocks Call Overview Traffic analysis Agent performance Jul 21 2010 Added QM qaformgrading method Aug 20 2010 Added new block Inclusive
18. ils printBlock result Sblocks printBlock DetailsDO CallsOK Sblocks printBlock DetailsDO CallskO Sblocks output a response block as HTML function printBlock Sblockname Sblocks echo lt h2 gt Response block S blockname lt h2 gt echo lt table border 1 gt Sblock Sblocks blockname for r 0 Sr lt sizeof block Sr echo lt tr gt for Sc 0 Sc lt sizeof Sblock Sr Sct Loway research Example Accessing QueueMetrics from PHP 6 echo lt td gt S block Sr c lt td gt echo lt tr gt n echo lt table gt 2 gt In this next example the PHP code is able to submit QA grading information in order to fill a specific form lt php require_once XML RPC php Sqm_server 10 10 3 5 the QueueMetrics server address Sqm_port 8080 the port QueueMetrics is running on Sqm_webapp queuemetrics 1 3 3 the webapp name for QueueMetrics set which response blocks we are looking for Sreq_blocks new XML_RPC_Value array new XML_RPC_Value QualAssFormDO FormStructure new XML_RPC_Value QualAssFormDO SectionValues new XML_RPC_Value QualAssFormDO Comments array set notes we want to update Scomments_block new XML_RPC_Value array new XML_RPC_Value This is a form note added with XMLRPC new XML_RPC_Value This is the next form note added with XMLRPC
19. lient html lt title gt lt script src rpc js gt lt script gt lt head gt lt body gt lt hl gt QueueMetrics JavaScript XML RPC example lt h1 gt lt script gt var server DAILY xmlrpc do function run try var service new rpc ServiceProxy server asynchronous false protocol XML RPC methods QOM stats OM realtime QM auth o res service QM stats ql robot robot 2005 10 7107 1023s 2T 2009 10 10 10 23 510 KoDO DiscCauses CallDistrDO AnsDistrPerDay document getElementById RESULT innerHTML plotBlocks res catch e alert Error raised e function plotBlocks hmBlocks s WW for var i in hmBlocks s lt h2 gt Block i lt h2 gt s plotBlock hmBlocks i return s function plotBlock arBlock s wis for vr 0 r x arBlock length r s Wet rol for c 0 c lt arBlock r length ctt s lt td gt arBlock r c lt td gt s lt tr gt return lt table border 1 gt s lt table gt lt script gt lt input type button value Click me onclick run gt lt div id RESULT gt lt div gt lt body gt Loway research Understanding call parameters lt html gt As you can see the code is actually very similar to the Python one The only important difference here is that the names of the methods
20. lock result Status OK Description Time elapsed ms 3008 QM Version 1 341 Block KoDO DiscCauses Cause N Calls amp nbsp Caller abandon 46 83 6 Agent dump 1 1 8 Timeout voicemail 8 14 5 As you can see the block KoDO DiscCauses has one full line of header on its first row Using an external auth source for QueueMet rics It is possible for QueueMetrics to accept an external authentication source By using a simple XML RPC interface it is be possible to write easily third party scripts that are able to authenticate against a chosen authentication system e g Kerberos LDAP a Microsoft domain server etc Log on procedure When an user logs in to QueueMetrics QM checks to see if there is an XML RPC auth source defined QueueMetrics will execute a query to that third party server passing along the user id and the password given for authentication plus a given service id that will be defined in the configuration file The server will respond passing along a fixed set of data Loway research XML RPC call parameters 15 e An auth response see below e A set of login information for that user e g real name email The current class and user keys for that user If the class passed along is empty only the user keys will be computed If the class is not empty it will be searched by name on the QueueMetrics storage and it will be loaded Trying to load a non existent class will
21. nt report TrkCallsQ Tracked calls per queue report CallSupervs Supervisors tracking calls report Res1 Section 1 as defined in the form calls by agent report Res1Q Section 1 as defined in the form calls by queue report Res2 Section 2 as defined in the form calls by agent report Res2Q Section 2 as defined in the form calls by queue report Res3 Section 3 as defined in the form calls by agent report Res3Q Section 3 as defined in the form calls by queue report Res4 Section 4 as defined in the form calls by agent report Res4Q Section 4 as defined in the form calls by queue report Res5 Section 5 as defined in the form calls by agent report Res5Q Section 5 as defined in the form calls by queue report Res6 Section 6 as defined in the form calls by agent report Res6Q Section 6 as defined in the form calls by queue report Res7 Section 7 as defined in the form calls by agent report Res7Q Section 7 as defined in the form calls by queue report Res8 Section 8 as defined in the form calls by agent report Res8Q Section 8 as defined in the form calls by queue report Res9 Section 9 as defined in the form calls by agent report Loway research Response block names for QM qaformreport and 18 QM qaformgrading Method Description Res9Q Section 9 as defined in the form calls by queue report Res10 Section 10 as defined in the form calls by agent report Res10Q Section 10 as defined in the form calls
22. onse block names are case sensitive Response block names for QM stats A complete list of possible QueueMetrics blocks is now maintained in the QueueMetrics User Manual chapter 6 Report Details The User Manual can be obtained from the QueueMetrics website For every possible block there is a name a description a shortcut code for ease of identification and an XML RPC code That is the name of the block that it to be retrieved over XML RPC Note For example if we want to access the Disconnection Causes block we will look it up in the manual until we encounter UN0O3 Disconnection Causes Loway research Response block names for QM realtime 17 We see that its XML RPC code is KoDO DiscCauses so that is the name of the block we ll be asking for Block names are case sensitive so make sure you are writing it as it is on the Us er Manual Response block names for QM realtime DataObject RealtimeDO Real time information as displayed in the main QM real time page using system defaults Method Description RTRiassunto An overview table of the queues in use RTCallsBeingProc Calls being processed in real time RTA Agents logged in and paused gentsLoggedIn Response block names for QM qareport DataObject QualAssDO Quality Assessment information as displayed in the QA report page Method Description TrkCalls Tracked calls per age
23. rd Response There is only one response block returned named auth where the caller will retrieve all user data in cluding the live key set for that user The method QM findAudio This method is used to retrieve a recorded file name from the QueueMetrics server In order to retrieve the file name QM will invoke the currently configured Pluggable Modules to search within the current recording set This can be used by third party software that needs to retrieve audio recordings via HTTP Call parameters 1 String User name 2 String Password 3 String Server 4 String Asterisk ID 5 String Call start integer timestamp 6 String Agent 7 String Queue The username and password of an user with ROBOT access are mandatory If QM is on a clustered setup the Server parameter must be passed to qualify the Asterisk call id The Asterisk Id is mandatory and is the one retrieved in the Call Details blocks Some PM may optionally require the Call start Agent and Queue parameters those are used for fuzzy matching of calls e g on an external storage Most PMs that do an exact match do not need those param eters Response There is only one response block returned named AudioFiles where the caller will retrieve the file name of each recorded file and an URL to actually download the file The response may include zero or more files it is well possible that multiple recordings be present for one call
24. result in auth failure The auth server may return four different responses e Access allowed e Access allowed with supplied user data e Access is forbidden e Access is fully delegated to QM The following table explains the relationship between those states Auth OK Auth KO User data from AUTHORITA FORBIDDEN RPC TIVE User data from SUCCESSFUL DELEGATED QM If auth was SUCCESSFUL the local QM database is checked for that user name If such a user is present the user details class and key information are loaded from QM If such a user is not present the details are taken from the ones supplied via XML RPC If auth was AUTHORITATIVE the details are taken from the ones supplied via XML RPC Then they are copied to the local user database with a random password so that though the user cannot login man ually it is possible to decode the user name for all logged operations e g Updating a queue If a user with the same name is present its credentials are forcibly updated with the authoritative credentials If auth was FORBIDDEN no other check is done and the user is rejected access If auth was DELEGATED the standard QM logon procedure is done The whole procedure is wholly transparent to the user that is they do not need to know which is the au thority that grants or denies access XML RPC call parameters Method QMAuth auth Table 1 Input parameters Pos Name Type Comment 0 System ID
25. ser holding the key ROBOT String Access password this one must be the clear text password of the given user name String Start of period This must be written in exactly the format yyyy mm dd hh mm ss do not forget the dot between the date and the hour Loway research The method QM qaformgrading 12 String End of period Same format as start of period String Agent filter an agent s name like Agent 101 that must be the filter for all the relevant ac tivity String The form name for wich you need to have information List A list of the required analyses to be returned to the client Each analysis name must be supplied as a String The same suggestions that are given for QM stats apply The method QM qaformgrading This method lets you able to fill a QA form through an RPC XML call It replies with the same raw in formation reported by the QM qaformreport method and could replace it if QA parameters are empty when calling 1 String Queue name or names the set of queues that must be included in the analysis They must be separated by a symbol if more than one queue is passed The queue name is the internal Asterisk queue name String Access username this one must be the user name of an active user holding the key ROBOT String Access password this one must be the clear text password of the given user name String Start of period This must be written in exactly
26. t presence data for payroll computation Of course there are a very big number of possible scenarios where you might want to use such informa tion The XML RPC interface is available in all version of QueueMetrics starting from version 1 3 1 Example accessing QueueMetrics from Python In this example we ll see how easy it is to access QueueMetrics from a scripted language like Python You can enter the following statements interactively using a Python IDE like IDLE or make them a part of a larger program The following code connects to a the XML RPC port of a QueueMetrics instance running at http qm server 8080 qm130 and asks for a couple of tables namely the distribution of answered calls per day and the Disconnection causes gt import xmlrpclib gt server_url http qmserver 8080 qm130 xmlrpc do gt server xmlrpclib Server server_url gt res server QM stats queue dps robot robot 2005 10 10 10 23 1 gt res keys CallDistrDO AnsDistrPerDay result KoDO DiscCauses gt res result Status OK Description Time elapsed ms 3008 QM Version gt res result 2 1 3008 As you can see it only takes four lines of Python code to connect to QueueMetrics and get all the results back Example Accessing QueueMetrics from Java This is an example functionally equivalent to the one above in Python but it
27. the format yyyy mm dd hh mm ss do not forget the dot between the date and the hour String End of period This is at least the number of seconds the call was in the waiting status or the complete call time or a suitable number that comfortably contains the call like for example 3600 String The form name for wich you need to have information String The unique identifier for the call to be graded Struct The list of QA items score supplied as string string pairs The list should contain all specific form items codes and their relative score In order to specify N A values for not mandatory items an empty string should be specified If the list is left empty no QA score will be filled into the form List A list of the notes to be filled in the form Each note must be supplied as a String If the list will be empty no new comments will be added to the form 10 List A list of the required analyses to be returned to the client Each analysis name must be supplied as a String The same suggestions that are given for QM stats apply The method QM auth This method is used to authenticate a username password couple against the QueueMetrics server This can be used by third party software that does not want to keep its own separate user database but wants to use QueueMetrics instead Call parameters 1 String User name Loway research The method QM findAudio 13 2 String Passwo
Download Pdf Manuals
Related Search
Related Contents
DGPS - MP State Electronics development corporation ltd. Admiral Craft HDS-1200W Owner's Manual Blusens TOUCH102B tablet Pioneer DEH-P780MP Life Jacket User Manual 平成25年度七ヶ浜町農業用機械格納庫新築工事仕様書PDF版 Solutions for Information Technologies BIS Calculateur SAMC]ÏNE MK2 et MK3 One GSM User Manual nadoby na slehacku delicia.indd Copyright © All rights reserved.
Failed to retrieve file