12-15-2013 01:59 AM - edited 03-14-2019 12:53 PM
I am currently working on creating an XML file from stats in the CSQ's. Based upon what I have read, due to the file being updated quite often, I believe I have 3 choices:
1) Write/overwrite to the customer directory (havent figured this one out), also thought about trying to update it in the /default/webapps/ROOT folder as I can have an app on the phone look directly there (like this one, dont know if possible).
2) Write the xml file to an external server where it is retrieved (believe to be my best option, havent figured this out either)
3) Quit
I have written the script, transformed it properly (I believe) but unable to write anywhere
The script and xml template are attached, although the script (after the stats collection) may be in a tattered state. Any help would be greatly appreciated, thank you.
Platform is uccx 8.0.2 (was on 7.02, 8.02 is a necessary interim hop to 8.6)
License is Premium
Solved! Go to Solution.
12-16-2013 08:33 AM
Hi,
OK, let's do it this way: remove the last three steps - (Set, Set, Write) and place a Send HTTP Response step as the last step (well, I mean, before the End step), with Document = statsData.
Then insert a Set HTTP Contact Info step before the Send HTTP Response step, click the Headers tab, then the Add... button. We'll need the following headers:
Name: "Content-Type", Value: "text/xml" - so the IP phone knows it's not plaintext but XML;
Name: "Refresh", Value: "3" - for 3 seconds.
Save it, refresh it, create an application for it, add a HTTP Trigger, then use the http://
G.
12-16-2013 03:08 AM
Can you help us understand what you're trying to do with the XML file? I must confess that I'm confused why you would need to write this if you're just going to store it locally on the CCX server; any of the AEF scripts could just use Get Reporting Statistics step to retireve the data themselves.
Please remember to rate helpful responses and identify helpful or correct answers.
12-16-2013 04:05 AM
Jonathan,
I need the xml file for a CUCM application. The customer likes to view their stats on the phone. If Icould write via script to the /default/webapps/ROOT folder this wouldnt be an issue.
Never found a page 92 on the step reference guide (they are numbered 3-4, 5-2, etc)
Not sure that #3 would help me for what I am trying to do
This would likely be a high frequency script (as far as updates go), so 4 probably wouldnt be good
12-16-2013 04:17 AM
Hi, you can easily create a HTTP application (I mean, a UCCX application, with a HTTP trigger). You can take the stats, create the XML on the fly, and then serve it up. All in one application. This might work well in a relatively small call center.
If you need something more sophisticated, and asked me, then I would create a minimalistic web server with an Apache HTTP server (or if you insist, IIS); then do the following: create a HTTP application in UCCX that saves the information on to the filesystem of this web server periodically (perhaps triggered by a cron job or something similar) and serve up this XML to the phones from the web server's local file system. This does not put (almost) any load on the UCCX, as calculations and I/O operations are done only once in a while, but hundreds or even thousands of phones would be able to access the information using our little web server.
G.
12-16-2013 04:34 AM
This may work well, there are only about 50 agents on this uccx system. Just tested the transform from my xml template though and I get nothing...somewhat perplexing.
12-16-2013 04:41 AM
Hi,
can you please explain in detail what you mean by "I get nothing". Did you try reactive debugging? Does the value of the statsData variable change?
Also, I noticed the template XML file contains expressions like this: %expression% but the Keyword Transform Document step looks for expression (without %'s). It's not a technical problem, but expect the result XML contain % after the transformation, too. Like %12% or %applepie% - I guess this is not your intention.
G.
12-16-2013 05:00 AM
I do a stepthrough and I get 0's (which is a system not in production yet, this is an upgrade from a 7.x uccx) which I expect, just the transform document (when I write it) gives me nothing (a 0 byte file, which when i open is empty). I thought I needed the "%" signs to denote the variable placeholders.
12-16-2013 05:16 AM
OK, this way: when doing the reactive debug, do you see the value of statsData changing from DOC[] to BIN[something] and then TEXT[something] when you reach the only Set step in your script (I am looking at the script you posted the other day).
G.
12-16-2013 06:58 AM
Finally got a file to write the proper data to the customer directory. The "%" signs are not there and the variables are. Now the problem I have is accessing the "Customer" directory directly (even possible) to retrieve the xml file. I know there are some other ways with Java to push to a web server, but I am not a Java person at all.
Should I try to write the file elsewhere (within the repository) and push from there...somehow. I am happy the file wrote but now am faced with getting it to where it needs to be.
I did see the satus go from "DOC[] to BIN[xx], problem was I wrote over it in the next step with an unnecessary assignment
12-16-2013 07:21 AM
Hi,
well, it depends on what you want to do. You can create an HTTP application sitting on the UCCX server, reading the already prepared XML file from the customer directory and send it back.
Or, the other way, forget the UCCX customer dir and save the XML with the script that creates it - on a separate server. Again, it's up to you, what kind of protocol you would like to use: Samba (Windows share), SFTP, FTP - or, you can even save that XML in a database.
I can help you with both approaches.
G.
12-16-2013 07:34 AM
Any benefits on one over the other? I am leaning towards the HTTP application on the uccx server. Also needsing some auto refresh...would that change thoughts on the method?
12-16-2013 07:51 AM
Hi,
well, I would choose a completely different approach (firing SQL commands periodically, or even setting up a monitoring session with UCCX CTI, compile the information into a nice and neat XMLish thing the Cisco IP phone can understand - but all this requires a separate server. A very minimalistic one, but it's not an all-in-one solution).
I understand this is a relatively small call center, I guess 50 agent phones asking for stats from time to time won't kill the UCCX. So I'd say it's alright to go with the HTTP application approach.
Auto refresh is easy, as the IP Phone understands the HTTP refresh header. But just to save cycles, I wouldn't go over 3 seconds.
G.
12-16-2013 08:13 AM
So what do I need to do to make this happen. Should I upload my updated script? New script (StatsSub.aef) has been uploaded.
12-16-2013 08:33 AM
Hi,
OK, let's do it this way: remove the last three steps - (Set, Set, Write) and place a Send HTTP Response step as the last step (well, I mean, before the End step), with Document = statsData.
Then insert a Set HTTP Contact Info step before the Send HTTP Response step, click the Headers tab, then the Add... button. We'll need the following headers:
Name: "Content-Type", Value: "text/xml" - so the IP phone knows it's not plaintext but XML;
Name: "Refresh", Value: "3" - for 3 seconds.
Save it, refresh it, create an application for it, add a HTTP Trigger, then use the http://
G.
12-16-2013 08:54 AM
Thank you Gergely, this has done exactly what I needed. Five stars to you!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide