03-01-2011 03:34 AM - edited 03-14-2019 07:29 AM
Hello,
I had a script on UCCX7 that was storing customer recordings in the filesystem when calls are not handled in a timely fashion so that the contact Center could contact them afterwards.
I have seen that now on UCCX8 the procedure has changed and i have been using the WriteStep to store files in the customer folder of the UCCX8 ( /opt/cisco/uccx/Customer) so we could get the files stored there.
But within all the test that i have done the file is not accessible using "file uccx list custom_file *".
Am i doing something wrong? For all the information that i have the WriteDocument step will store the file on the folder given by (Set ficheiro = System.getProperty("uccx.customer.dir")) and then this would be accessible using CLI command "file uccx list custom_file *"
Is this correct?
I have attached here the script i used and the logs that were seen after running the script.
Thanks for the help.
Solved! Go to Solution.
03-01-2011 10:29 PM
03-02-2011 02:33 PM
As far as I know, ftp:// scheme does not support upload, only download. So, no, you could not upload a file to an FTP server via that method.
If you have premium, then you can implment one of several methods for creating an FTP client, and uploading that way.
EDIT: I worked up a solution that can be used as a subflow. You would set up the subflow with hard coded credentials, and pass it a filename. It would then FTP upload the file, and return a boolean "was_successful" to the calling script. Please test it though. This will not work in Standard, as I am using Java expression blocks.
Here is a screenshot for those not on UCCX 8x yet. (You may see a grey rectangle, just click to enlarge)
And we're able to read the file once uploaded!
EDIT2: I cannot see the inline images, so I'm attaching them as well.
03-01-2011 03:44 AM
The version i am using is 8.0.2.11003-10
03-01-2011 10:29 PM
This is also on a UCCX 8.0.2.11003-10 system
Script
CLI Output
03-02-2011 04:35 AM
Hello Anthony,
Yes indeed the problem i had is that i was not placing the space between the path and the filename.
Thanks for the answer. It was most clarifying.
Cheers,
José Albino
03-02-2011 07:32 AM
Hello Anthony,
By any chance have you been able to upload a file to a FTP site directly from the script? I have seen that on Cisco Unified Contact Center Express Expression Language Reference Guide, they are making a reference to URL Literals with FTP, namely:
URL[ftp://12.12.12.12:8080/schedule.doc]
This would be interesting if the script could upload the file to a FTP.
Cheers,
Jose
03-02-2011 02:33 PM
As far as I know, ftp:// scheme does not support upload, only download. So, no, you could not upload a file to an FTP server via that method.
If you have premium, then you can implment one of several methods for creating an FTP client, and uploading that way.
EDIT: I worked up a solution that can be used as a subflow. You would set up the subflow with hard coded credentials, and pass it a filename. It would then FTP upload the file, and return a boolean "was_successful" to the calling script. Please test it though. This will not work in Standard, as I am using Java expression blocks.
Here is a screenshot for those not on UCCX 8x yet. (You may see a grey rectangle, just click to enlarge)
And we're able to read the file once uploaded!
EDIT2: I cannot see the inline images, so I'm attaching them as well.
03-02-2011 09:54 PM
And this is why you need to be a programmer to really make CCX useful. Very impressive Anthony!
03-03-2011 04:22 AM
Hello Anthony,
Yep... that is what i wanted indeed. You just opened a brand new world in UCCX Scripts for me now that i saw how to use Java Class in here.
My only concern is that the script migth take too long, but i guess i need to do some stress test to check it out.
Thanks or the help,
Cheers
03-03-2011 05:59 AM
Hello Anthony,
I have tested this, and i have seen that afterwards i will have a problem here as apparently i need to store the 'temporary file' on the UCCX Custom directory first, and then transfer it to FTP. So here is the problem i see:
1. After a sucessufully transfer i will not be able to delete the temporary file, so on a long run the disk will be out of space and the UCCX can crash.
2. User the same temporary file that will be overwritten each time a transfer is made, is also a problem as i could get different instances trying to access this file.
3. Also if the transfer fails it will be interesting to send an email when this occurs. I believe this would be easy to achieve.
I tested uploading directly the Document object created by Gravaçao but i was not able to do it as the FileInputStream does not accept this object.
Thanks for your valuable assistance.
Cheers,
José
03-04-2011 02:05 PM
Hello Anthony,
I was able already to use FTP do upload the file, but i was here a question within the code you provided. I have seen here the use of the variable was_successful, in order to identify a failure in the script. But i want to know how can we identify if the FTP upload failed and then change the variable in order to save the message on a different folder.
In order to avoid filling up the disk i will be using a Script to clean the folder of the UCCX where the temporary recordings are stored using CLI Commands, but i will need also to make sure that a recording is always available if there is a failure.
Cheers,
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