Showing results for 
Search instead for 
Did you mean: 

How to get LIVE current wait time (or OldestContact) per extension (CalledNumber) or priority?

Level 1
Level 1

Hello, I am hoping someone can help me (and my apologies in advance for my lack of proper terminology since I am not trained in UCCX at all).

I wish to get live data on calls in queue (most importantly: OldestContact) but split by extension (CalledNumber) or by Priority. Our current UCCX is version 10.6 and we have many queues set up and in use.

One of the queues that I am interested in (let's name it "ABC_Q") has three extensions (1305, 1500 and 1600) that are transfered into that queue.

Calls that are transfered to one of the three extensions (which shows up in the CalledNumber column in the database) is assigned a priority as follows: ext 1305 = P1, ext 1500 = P8 and ext 1600 = P10.

So the question is, how can I retrieve the live OldestContact duration for each extension (or priority) in queue ABC_Q ?

BTW I have access to the Informix database with user uccxhruser - so I have access to almost anything (i think). I have created some SQL statements that give me historical data on call times. Here is one of those queries..

SELECT CCD.sessionid, CCD.startdatetime, CCD.enddatetime, CCD.callednumber, CCD.originatorid, ACD.ringtime, ACD.talktime, ACD.holdtime, CRD.queuetime, CRD.finalpriority
contactcalldetail CCD
INNER JOIN agentconnectiondetail ACD
ON CCD.sessionid = ACD.sessionid AND CCD.sessionseqnum = ACD.sessionseqnum AND CCD.profileid = ACD.profileid AND CCD.nodeid = ACD.nodeid
INNER JOIN contactroutingdetail CRD
ON CCD.sessionid = CRD.sessionid AND CCD.sessionseqnum = CRD.sessionseqnum AND CCD.profileid = CRD.profileid AND CCD.nodeid = CRD.nodeid
CCD.callednumber IN (1305,1500,1600)
CCD.startdatetime BETWEEN '2015-12-01 13:00:00' AND '2015-12-02 01:00:00'
ORDER BY sessionid desc;

(since our call center operates from 8am until 8pm, i added the date filters)

Also, I can get access to the Cisco UCCX Script Editor if needed. Since I am on the Script Editor topic.. is there a way to write a script that outputs the OldestContact (or current wait time) to an XML files when hitting a URL? For example: https:/ (i could then make others for 1500 and 1305) would output an XML with the data i need. Then I can hit that URL every 10 seconds.

I did a search for "live queue wait time by priority" on and I found this post: that sheds some light, but I dont know how to do that either.

Thank you very much.


2 Replies 2

Deepak Rawat
Cisco Employee
Cisco Employee


It will be worth to post your query at the below forum as well which is dedicated to custom scripting issues while you waiting for a response here on the community



- Rate Helpful Posts -

Thank you Deepak.. I have also posted this question on the forum that you suggested !