cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1015
Views
5
Helpful
8
Replies

Script to set an Oncall number in a document

So I've created a script based off of one from the forums, but the digit input isn't writing into the document. Also looking for a way on Success that it will read the contents of the document as verification.

CiscoUnifiedCCXEditor_TXcIsc4dW4.png

 

1 Accepted Solution

Accepted Solutions

Anthony Holloway
Cisco Employee
Cisco Employee

I think you might be uploading the document contents from CC\OnCallEN.txt to a file name of just digits.  I think this because, your upload document step looks backwards.  It should look like this instead:

Upload Document ((Document) OnCall_number to L[en_US], OnCallEn_Filename)
  Successful
    ...
  Unsuccessful
    ...

Note that I had to cast the string obtained from the caller to a document so it can be uploaded.

Also, now that you likely would have fixed the upload, reading it out is this easy:

Upload Document ((Document) OnCall_number to L[en_US], OnCallEn_Filename)
  Successful
/* Small delay to give the document time to be refreshed in memory */ Delay 2 seconds
/* Read the contents of the file we just updated into a String variable */ Set OnCall_confirm = OnCallEN_Doc
/* Use the [S]pelling prompt literal to have the system spell back the number, digit by digit */ Play Prompt (--Triggering Contact--, S[OnCall_confirm]) Unsuccessful ...

View solution in original post

8 Replies 8

Anthony Holloway
Cisco Employee
Cisco Employee

I think you might be uploading the document contents from CC\OnCallEN.txt to a file name of just digits.  I think this because, your upload document step looks backwards.  It should look like this instead:

Upload Document ((Document) OnCall_number to L[en_US], OnCallEn_Filename)
  Successful
    ...
  Unsuccessful
    ...

Note that I had to cast the string obtained from the caller to a document so it can be uploaded.

Also, now that you likely would have fixed the upload, reading it out is this easy:

Upload Document ((Document) OnCall_number to L[en_US], OnCallEn_Filename)
  Successful
/* Small delay to give the document time to be refreshed in memory */ Delay 2 seconds
/* Read the contents of the file we just updated into a String variable */ Set OnCall_confirm = OnCallEN_Doc
/* Use the [S]pelling prompt literal to have the system spell back the number, digit by digit */ Play Prompt (--Triggering Contact--, S[OnCall_confirm]) Unsuccessful ...

So OnCall_Number is a string are you saying I have to change that variable to a doc?

Nope, just look at the syntax of the Upload Document step I provided. You will notice the "(Document)" preceding the variable name. This temporarily converts it's value to a Document to satisfy the Upload Document step, without needing a whole new variable.
If you did change it to a doc, it wouldn't work in the Get Digit String step.

Awesome got it working, now if I can enchance the user experience, like if this is correct or incorrect to terminate or to input number again.
Also do you happen to know other than my voice for my prompts a way to record prompts with a different voice, like a generated voice?

UCCX does not have a built-in TTS engine. It does have a lot of pre-recorded audio files however. This is why it might seem like UCCX has TTS, when it reads back like a phone number, a date, or credit car number, but it's really just a trick.

I now have my main script reading this file and setting the after hours oncall variable and I have a call redirect step, should this be a place call step?

Depends on if you are trying to send the caller to the on call phone or just play an announcement to the on call phone.  The former requires either Call Consult Transfer or Call Redirect, while the latter requires Place Call.

 
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: