Need UCCX Script: Recorded prompt & save to default prompt location

Answered Question
Feb 18th, 2013

I have UCCX 8.5.1 installated on UCS, and configured. Just wondering if anyone knows how to use UCCX script to record prompt and save it to default language location please?

We do have UCCX script which can do it in UCCX 7.5 (Windows based), now we need to know how can we do it with UCCX 8.5 (Linux based).

Many thanks

I have this problem too.
0 votes
Correct Answer by Gergely Szabo about 1 year 1 month ago

Hi,

HTTP Error 500 means server error, there must be something really nasty happening behind the scenes.

Did you try to call the URL from a browser? Does it return anything?

This is how I do it:

At IVR 1, I have a prompt management script. The relevant part:

So the usual stuff, I record the prompt and upload it to the local repository of IVR 1.

Next, I trigger a script on IVR 2, actually telling it to download the prompt from IVR1.

The detail of the Create URL Document step above:

So I am actually sending two parameters, "calling" (with the value of "broaaf") and "ivrDirName" with the value of the variable ivrDirName, set earlier.

The URL is pointing to an application at IVR 2, trigger ahpsync12 (similarly, on IVR A, I have a trigger called ahpsync12).

First, it accepts the contact, then harvests the values of the parameters. Next, there is a security check (sort of) comparing the value of the value of HTTP variable "calling" (assigned to local variable woIsItCalling, and if it is "brooaf" then the script continues: creates an URL Document, with an URL of IVR 1, with the directory and file name. The Cache Document step downloads it, and then finally, it is uploaded to the local repository.

In the above example, the file name is static "adhoc.wav", only the directory name changes, but with a little effort this can be changed, too, to have dynamic filenames.

G.

Correct Answer by Gergely Szabo about 1 year 1 month ago

Hi,

as long as the srcipt runs, the prompt is in the memory, so you don't have to save it as a file.

G.

Correct Answer by Gergely Szabo about 1 year 1 month ago

Hi,

... welcome to the beautiful world of UCCX scripting. Hope you already found the three scripting guides ;-)

First, you need at least one variable, of type Document.

Use the Recording step - its result would be the variable created above.

You can decide where to save your new document, containing your recording.

1. UCCX Prompt repository: easiest, but you need a user who has the rights to upload the document to the repository;

2. database - requires some Java programming,

3. Windows share - requires some Java programming.

For 1: create another variable, type User. With the help of Get User,  Authenticate and Upload Prompt steps you can upload the recording to the repository. Like this:

(Yes, I know it's not considered safe to have passwords in scripts.)

As for 2 and 3, I committed two documents some while ago, you can get inspiration from them.

G.

  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 0 (3 ratings)
Correct Answer
Gergely Szabo Tue, 02/19/2013 - 02:28

Hi,

... welcome to the beautiful world of UCCX scripting. Hope you already found the three scripting guides ;-)

First, you need at least one variable, of type Document.

Use the Recording step - its result would be the variable created above.

You can decide where to save your new document, containing your recording.

1. UCCX Prompt repository: easiest, but you need a user who has the rights to upload the document to the repository;

2. database - requires some Java programming,

3. Windows share - requires some Java programming.

For 1: create another variable, type User. With the help of Get User,  Authenticate and Upload Prompt steps you can upload the recording to the repository. Like this:

(Yes, I know it's not considered safe to have passwords in scripts.)

As for 2 and 3, I committed two documents some while ago, you can get inspiration from them.

G.

pingliu29 Tue, 02/19/2013 - 13:59

Hi Gergely

Thanks for your assistance. I will try it during next a few days. it seems similar to the one we used in UCCX 7.

Also, I noticed that we use Write Document(recordedPromptDoc to TempPromptLocation) in UCCX 7 to save copy of record.

Can we also do it in UCCX 8.5? if so, which location we can write to please?

thanks

Gergely Szabo Tue, 02/19/2013 - 23:25

Hi,

yes, you can do that in UCCX 8.5, but if you don't mind, I don't want you to write anything to that temporary location. It's just a directory on the file system, for temporary files - temporary meaning write it, read it, forget it. It's not a safe location, not covered by the disaster recovery system (= not being backed up).

The proper way of doing it is:

1. Prompt or Document repository. Safe and fast, excellent solution if you need to access the recording only within the UCCX.

2. Database or a shared directory on a different server: less safe, slower, but the recording files can be accessed easily. 

G.

pingliu29 Sun, 02/24/2013 - 14:48

Thanks, Gergely

The ideal of this script will be able to:

1. Record a prompt, after completed recording;

2. Provide options: 1) play-back; 2) re-record; 3) Discard recording; 4) Upload;

I was thinking that to be able to allow user to play-back, re-record, and discard recorded prompt, we need to save the recorded file in temporary location first. Once script completed task, we can delete the file in temporary location. for instance:

A: Play-Back --> Upload:     -->   -->

B: Play-Back --> Discard:     -->

We do not need keep temporary file, but we need to confirm the recorded prompt before uploading it. I would like this process is as simple as possible.



Correct Answer
Gergely Szabo Mon, 02/25/2013 - 03:55

Hi,

as long as the srcipt runs, the prompt is in the memory, so you don't have to save it as a file.

G.

pingliu29 Fri, 03/01/2013 - 03:24

Hi

Now, my IVR script works. it records prompt, playback it for check, upload it to save. It works as I want.

This IVR script is working, but it only can upload recorded prompt to the UCCX server it runs. I had read some discussion, but I still want to ask that is there better way to not only upload prompt to IVR server it is runing, but also upload same recorded prompt to second IVR server. Is http trigger the best solution?

By the way, the UCCX version is 8.5.

Many thanks.

Gergely Szabo Fri, 03/01/2013 - 05:00

Hi, I am afraid, the only solution - unless you want to hack into the UCCX server, which is, naturally, not recommended -, is to call the 2nd UCCX server's application using HTTP trigger, which would, in turn, download the prompt from the triggering server, using HTTP and upload it to its own prompt repository.

I have such a solution implemented in 8.0(x), not sure whether it works in 8.5(x), to be quite honest with you, allowing nonrestricted HTTP access to the prompts looks like a security flaw .

Or, you can explore completely different solutions, like saving the prompt into a database or on to a Window share.

G.

pingliu29 Sun, 03/03/2013 - 16:40

Thanks Gergely

I think the Send/Get HTTP Contact Info will be the one suitable for us.

Send HTTP is easy. I can send my recorded prompt document with it. But:

1. How does the Send HTTP Contact from first UCCX know where to send it to?

2. How does the Get HTTP Contact from second UCCX know where to get it from?

3. How can the recorded prompt document be passed to second UCCX?

do you have sample script which can be shared please?

pingliu29 Sun, 03/03/2013 - 22:39

Hi Gergery

I have read you other artical, and setup URL Document for uploading prompt to IVR B server. I get Java.io.IOException error.Here is my IVR script from IVR A which records prompt and upload it locally. when it reachs Cach Document statement. it pop out this error.

From B site IVR, i have setup application: UploadPrompts linked with UploadPrompts.aef script with http trigger /UploadPrompts

Which part I did wrong please?

Correct Answer
Gergely Szabo Mon, 03/04/2013 - 02:13

Hi,

HTTP Error 500 means server error, there must be something really nasty happening behind the scenes.

Did you try to call the URL from a browser? Does it return anything?

This is how I do it:

At IVR 1, I have a prompt management script. The relevant part:

So the usual stuff, I record the prompt and upload it to the local repository of IVR 1.

Next, I trigger a script on IVR 2, actually telling it to download the prompt from IVR1.

The detail of the Create URL Document step above:

So I am actually sending two parameters, "calling" (with the value of "broaaf") and "ivrDirName" with the value of the variable ivrDirName, set earlier.

The URL is pointing to an application at IVR 2, trigger ahpsync12 (similarly, on IVR A, I have a trigger called ahpsync12).

First, it accepts the contact, then harvests the values of the parameters. Next, there is a security check (sort of) comparing the value of the value of HTTP variable "calling" (assigned to local variable woIsItCalling, and if it is "brooaf" then the script continues: creates an URL Document, with an URL of IVR 1, with the directory and file name. The Cache Document step downloads it, and then finally, it is uploaded to the local repository.

In the above example, the file name is static "adhoc.wav", only the directory name changes, but with a little effort this can be changed, too, to have dynamic filenames.

G.

pingliu29 Mon, 03/04/2013 - 03:17

Many thanks. I will give it a try again tomorrow.

the error was generated when it run Cache Document statement.

will let you know tomorrow.

pingliu29 Mon, 03/04/2013 - 15:01

Hi Gergely

it is working now...

the error was generated by seconde IVR script runs from B site on statement of Create URL Document. it was wrong URL string points back to IVR A.

Now it is working fine.

Thanks a lot.

Actions

Login or Register to take actions

This Discussion

Posted February 18, 2013 at 7:57 PM
Stats:
Replies:13 Avg. Rating:
Views:2938 Votes:0
Shares:0
Tags: No tags.
Categories: Express
+

Discussions Leaderboard