cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4610
Views
10
Helpful
9
Replies

UCCX8: Not able to access customer file created with WriteStep

jose.albino
Level 1
Level 1

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.

2 Accepted Solutions

Accepted Solutions

This is also on a UCCX 8.0.2.11003-10 system

Script

CLI Output

View solution in original post

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)

uccx-ftp-uploader-active-debug.png

And we're able to read the file once uploaded!

uccx-custom-file-ftp-result.png

EDIT2: I cannot see the inline images, so I'm attaching them as well.

View solution in original post

9 Replies 9

jose.albino
Level 1
Level 1

The version i am using is 8.0.2.11003-10

This is also on a UCCX 8.0.2.11003-10 system

Script

CLI Output

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

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

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)

uccx-ftp-uploader-active-debug.png

And we're able to read the file once uploaded!

uccx-custom-file-ftp-result.png

EDIT2: I cannot see the inline images, so I'm attaching them as well.

And this is why you need to be a programmer to really make CCX useful. Very impressive Anthony!

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

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é

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,

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: