Translate this page...

Sunday, 10 April 2011

Script to upload MOTD / prompt by phone for UCCX v8

< Apologies if this post is all over the shop – was operating on about 3 hours sleep when writing >
As most would be aware, as of version 8 of UCCX the OS is now a Linux based OS with a different structure in terms of file storage/document management and access.
Most folks would also know that if you had a ‘dial-in prompt recording’ script working in the past and then upgraded to v8 and above, it breaks.
I struggled to find a ‘how to’ online to get this working for UCCX 8+.
I ended up using the ‘SNU.aef’ tutorial script described in the scripting ‘getting started’ guide and then tinkering until I got it working.
To save you the tinkering, this is how it’s done.
Important note and deal breaker: You must have an authenticated user, with prompt upload access to the UCCX system, in order to save the prompt. As I don’t want staff to have to use domain (long) passwords, I set a PIN for them in their user account in CUCM. Cisco say:
“The Upload Prompt step will not work unless the user specified in the step is an authenticated user. Use the Authenticate User step before the Upload Prompt step to authenticate the user.”
What you need to do…
  1. Record and upload a [random] prompt of your choice using the GUI. This prompt will be overwritten by the script when you record a new prompt. Take note of the path and name.
    If you need assistance recording a prompt that will work in Cisco VoIP systems (including Unity, CUCM, and UCCX) – see my post here:
    "Saving WAV files in CCITT u-law format using Audacity (free)"
    I have a TEST folder in the prompts root folder for my language.
    I uploaded a random WAV file to the TEST folder in Prompt Management, named:  "pMotD.wav"
    image
  2. Create the script
    1. Gather username
    2. Gather PIN
    3. Authenticate user with gathered username and PIN
    4. Record new prompt
    5. Write new prompt to .
I’ve linked to the script for you to download and work with/modify but also laid it out in text format down the post (below). I’ve also taken screen shots of ALL variable editor and programming steps dialog boxes right at the end of this blog post.
Remember to change the localised things – such as the folder for the ‘Upload Prompt’ step – where I use L[en_AU] – you would need to select your language.
Disclaimer and important note:
I took a previous script (‘Designing a Basic Script’ – Chapter 6/page 163 – SNU.aef from "Cisco Unified Contact Center Express Getting Started with Scripts Release 8.0(1)") and modified it – so it isn’t necessarily the most efficient script under the sun. It got it working and I haven’t bothered to refine it or configure it for all clients yet. When I rewrite this as a more simple and efficient  script for multiple clients/prompts – I’ll re-post for sure.
Also – uploading prompts to UCCX is something that should be kept to a minimum per Cisco warning in this document: UCCX Scripting Step Reference Guide
”Although the prompt repository is meant to hold prompts used by scripts,
do not use the Upload Prompt functionality to store all types of prompts.
There is no provision for a delete prompt operation from a script. Also, the
system will not behave properly if this step is over-utilized. This means that
this step has not been designed to be extensively used by all calls coming into the system. Rather, this step is meant for updating prompts, like the
"message-of-the-day" prompt, in the repository database from time to time.”
NOTE:

One handy method for enabling and disabling a message of the day without complex programming is to simply have the MotD play every time.
With the recording script attached to an application - you simply call in, record the MotD, it saves it to the repository, the customer script always plays the file so it will be heard by folks, when you want to "remove" the MotD, you simply call in and record silence (when you hear the beep to start recording, instantly press the # key) - then when the file plays - it isn't heard.
You don't notice the sound of the silent prompt and customers are none the wiser.
I've been using this technique for several of our customers as it makes life a lot easier than adding them into my complex script - which I will eventually post here.
For now - I hope that helps someone.



Right – now to the script…
Variables:
Note that I have not set any of my variables to parameters – which means that any modifications need to be performed using Unified CCX Editor and can’t be modified using the UCCX GUI Application Management. I leave all checkboxes un-checked in the Edit Variable dialog box:
image
Name
Type
Value
finalPrompt Prompt P[]
firstName String ""
fullName String ""
instructPrompt Prompt P[]
language Language L[en_AU]  (***set this to your own language e.g. L[en_US])
lastName String ""
namePrompt Prompt P[]
pin String ""
pound Prompt P[]
recording Document null
triesAuthentication int 0
triesGetDigit int 0
triesMaxAuthentication int 3
triesMaxGetDigit int 3
triesMaxRecord int 3
triesRecord int 0
user User null
MotD String "TEST\pMotD.wav"
             
Script (screenshots follow this listing):
Script download link: /UCCX/TESTMOTD.aef
Start
    Accept (--Triggering Contact—)
    Play Prompt (--Triggering Contact--, P[TEST\pMotD.wav] )
    GetUser:
    user = Name To User (--Triggering Contact--, -- Default –)
       Successful
          Get User Info (user)
          GetPin:
          pin = Get Digit String (--Triggering Contact—)
             Successful
                Authenticate:
                Authenticate User PIN (user, pin)
                   Success
                      pound = Create Generated Prompt telephone.number ("#")
                      Record:
                      /* Localise based on language */
                      instructPrompt = Create Language Prompt(L[en_AU]: SP[SNU\finished.wav] + pound + SP[SNU\press.wav], L[]: SP[SNU\finished.wav] + pound + SP[SNU\press.wav])
                      recording = Recording (--Triggering Contact--, SP[SNU\rec_name.wav] + instructPrompt , 10)
                         Successful
                            Play Prompt (--Triggering Contact--, SP[SNU\new_rec.wav] + recording )
                            Menu (--Triggering Contact--, SP[SNU\menu_re_rec.wav])
                               Key 1
                                  Upload Prompt (recording to L[en_AU], MotD)
                                     Successful
                                        finalPrompt = Create Container Prompt Concatenation (SP[SNU\store_success.wav])
                                        Goto Bye
                                     Unsuccessful
                                        finalPrompt = Create Container Prompt Concatenation (SP[SNU\error_general.wav] + SP[SNU\error_try_later.wav])
                                        Goto Bye
                               Key 2
                                  If (triesRecord < triesMaxRecord ) Then
                                     True
                                        Set triesRecord = triesRecord + 1
                                        Goto Record
                                     False
                                        finalPrompt = Create Container Prompt Concatenation (SP[SNU\error_try_later.wav])
                                        Goto Bye
                               Timeout
                                  finalPrompt = Create Container Prompt Concatenation (SP[SNU\error_try_later.wav])
                                  Goto Bye
                               Unsuccessful
                                  finalPrompt = Create Container Prompt Concatenation (SP[SNU\error_try_later.wav])                                  Goto Bye
                         Unsuccessful
                            finalPrompt = Create Container Prompt Concatenation (SP[SNU\error_rec.wav] + SP[SNU\error_try_later.wav])
                            Goto Bye
                   Unsuccessful
                      If (triesAuthentication < triesMaxAuthentication ) Then
                         True
                            Play Prompt (--Triggering Contact--, SP[SNU\error_auth.wav] )
                            Set triesAuthentication = triesAuthentication + 1
                            Goto GetUser
                         False
                            finalPrompt = Create Container Prompt Concatenation (SP[SNU\error_auth.wav] + SP[SNU\error_try_later.wav])
                            Goto Bye
             Timeout
                If (pin == "") Then
                   True
                      /* No pin was entered */
                      If (triesGetDigit < triesMaxGetDigit ) Then
                         True
                            Set triesGetDigit = triesGetDigit + 1
                            Play Prompt (--Triggering Contact--, SP[SNU\still_there.wav])
                            Goto GetPin
                         False
                            /* Disconnect caller
                               Max retries reached */
                            finalPrompt = Create Container Prompt Concatenation (SP[SNU\error_try_later.wav])
                            Goto Bye
                   False
                      Goto Authenticate
             Unsuccessful
                finalPrompt = Create Container Prompt Concatenation (SP[SNU\error_try_later.wav])
                Goto Bye
       Timeout
          finalPrompt = Create Container Prompt Concatenation (SP[SNU\error_try_later.wav])
          Goto Bye
       Unsuccessful
          finalPrompt = Create Container Prompt Concatenation (SP[SNU\error_try_later.wav])
          Goto Bye
    End
    Bye:
    Set Contact Info (--Triggering Contact--, handled)
    Set finalPrompt = finalPrompt + DP[500] + SP[SNU\goodbye.wav]
    Play Prompt (--Triggering Contact--, finalPrompt)
    Terminate (--Triggering Contact—)
    End



Screenshots of everything relevant:
Variables…
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image

Coding ‘steps’…
NOTE: SP[] stands for System Prompt. These are prompts that should be readily available to anyone and come as part of the UCCX deployment/installation. I’ve not been able to navigate to them anywhere in the Prompt Management with the GUI – but they work so go ahead an use them (I have yet to find a complete list of system prompts – if I do I will post here).

image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
SP[SNU\finished.wav] + pound + SP[SNU\press.wav]
image
image
image
image
image
Be sure to set the ‘Duration’ to something appropriate to your needs.
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
Note DP[] is Delay Prompt and inserts a delay between the first and second prompts specified.
image

That is a good selection of the steps – the rest are essentially replications of the above with minor variation which I’m certain you can work out (especially since you can just open the .aef I linked to and check it out yourself).
Hope this helps.
Disclaimer: As always use this information and script at your own risk. Be sure to test everything in a non-production system or at least a test application which is not considered part of production. This works for me and hasn’t destroyed our system yet.
There was an error in this gadget

Mandala el Ubby

Mandala el Ubby
Acrylic on canvas ~75cm x 75cm

Lateralus Vinyl Picture Disc

Lateralus Vinyl Picture Disc
Best album ever....ever.....ever....ehem

I procure heaps o fashizniz from Amazon, why don't you?