The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This guide provides an overview using the Cisco Unity Express 7.0 Script Editor for writing Auto Attendant (AA) scripts. The guide also includes a line-by-line description of the AA sample script and a script step reference.
The Interactive Voice Response option is a separately licensed option that integrates with Cisco Unity Express. The functionality described for IVR is available only if you have purchased a separate IVR software license.
Scripts enable you to customize the Cisco Unity Express AA and IVR features. Scripts work to receive input, make decisions, and perform tasks. By using the Cisco Unity Express Script Editor, you identify variables to receive user input, create conditions that require decisions (or branches), and determine which tasks to perform, based on those decisions.
A script stored on the router module runs in response to a request from a user or a predetermined condition. The scripts allow callers to receive recorded audio messages and prompts for further action. For example, if a caller calls a business during nonbusiness hours, the caller can hear either a recorded message stating the business's hours of operation or hear a prompt to leave a message. The message and prompt are the result of the Cisco Unity Express software running a script.
A more advanced use of scripts could involve checking an account balance at a bank. For example, a caller is prompted to enter an account number by using a telephone keypad, and the caller then receives an audio message stating the account balance.
This chapter contains the following sections:
•Obtaining Documentation, Obtaining Support, and Security Guidelines
This section provides information on the main concepts that are used in writing scripts.
Use variables in your program to hold data. You must provide a name and a type for each variable that you want to use in your script. Use the variable name to refer to the data that the variable contains. The type of variable determines what types of data (text, integers, and so on) it can hold and what operations can be performed on it.
A parameter is a property of a variable that allows the variable to be visible to the administrator through the Cisco Unity Express web interface. The administrator can then change the variable without having to edit the script and then upload it to the Cisco Unity Express module again.
In addition to performing an operation, an operator returns a value. The return value and its type depend on the operator and the types of data the operator is operating on. For example, the increment operator (increment step) adds 1 to a value.
Variables and operators are the basic building blocks of scripts. You can combine variables and operators to form expressions that compute, return values, and control the flow of a script.
A flow control step directs the order in which the script is run. The If, Switch, and Goto steps are examples of flow control steps.
Without flow control steps, the script runs these steps in the sequential order in which they appear in the Design pane from top to bottom. You can use flow control in your scripts to conditionally run steps, to repeatedly run a block of steps, and to otherwise change the normal, sequential flow of the script.
Control steps direct the script to proceed in a specific way. For example, you might want a set of steps to run only if certain conditions are met.
Flow control is accomplished by following these steps:
•If: If the following condition x is met, perform the following task, y.
•Switch: Matches a condition to one of several tasks.
•Goto: When a script reaches a Goto step, the script stops running and continues at the indicated next point in the script.
Error handling provides a way for a script to stop running in a predetermined sequence, or to continue running when it receives unexpected results or when a task does not complete successfully.
Prompts exist as audio files on the router and have the file extension .wav, as in greeting.wav. The Cisco Unity Express Script Editor uses the following two types of prompts:
•System prompts: Used internally by Cisco modules and Cisco sample scripts.
•User prompts: Defined by the user, and managed by the administrator through Voice Mail > Prompts on the Cisco Unity Express GUI administrator interface or by calling in to Administration via Telephone (AvT).
A trigger is a specific event or condition that causes an application to run. There can be several triggers for a single application. A number of triggers are created automatically in Cisco Unity Express.
For example, a call to extension 1000 causes Cisco Unified Communications Manager Express (formerly known as Cisco Unified CallManager Express) to route the call to Cisco Unity Express, which then looks for a trigger for the call and starts the associated application.
The auto attendant (AA) sample script uses the sample script aa_sample1.aef, which is included with the Cisco Unity Express Script Editor, to illustrate basic procedures for configuring auto attendant scripts. For details on the auto attendant script, see the Auto Attendant Script Example chapter.
The functionality described for the Cisco Unity Express IVR software is available only if you have purchased a separate IVR software add-on package.
The Cisco Unity Express IVR software allows a telephone caller to select options from a voice menu and to otherwise interact with the Cisco Unity Express system. After the system plays a pre-recorded voice prompt, the caller presses a number on a telephone keypad to select an option.
To select the IVR option, complete the following steps:
Step 1 Choose Tools > Options from the Cisco Unity Express toolbar. The Cisco Unity Express Options window, shown in Figure 1, appears.
Figure 1 Cisco Unity Express Options Window
Step 2 In the Hostname field, enter the DNS hostname or IP address of your host.
Step 3 Check the Enable IVR steps check box.
Step 4 Click OK.
The Palette pane includes the additional IVR steps you need to create your script.
Designing a script involves describing the call flow, mapping script steps to the call flow, validating the script, and testing the script in the system.
The following simple scenario illustrates scripting techniques. Table 1lists and describes the call flow script steps of this scenario. In this case, the script:
1. Answers a call.
2. Checks for an emergency alternate greeting.
3. Checks if this time is during regular business hours.
4. Checks for unexpected user or script actions.
5. Plays a custom greeting and transfers the caller to the operator if the current time is not during regular business hours.
6. Plays a menu prompt that allows the caller to dial 1 for dial-by-name, 2 for dial-by-extension, or 0 for an operator if the current time is during regular business hours.
Use the dial-by-extension option to transfer a caller to a number in a specified range, not to transfer the caller to any number dialed.
7. Checks for the number of times the caller has been rerouted to the Main Menu.
8. Add to the Menu step if necessary.
9. Handles error conditions.
A call flow is a description of events that occur during a call. Describing a call flow in detail allows you to recognize the script editor steps to use and avoid logic flaws in your script. In the call flow for this scenario, extensions are in the range of 200 to 299. You can add additional error handling branches. For example, if the caller tries multiple unsuccessful transfers, the script plays a "Try again later" prompt and disconnects the call.
To debug your script, verify its operation in various scenarios, such as regular user input, timeout, and anticipated error conditions.
Before uploading a script, use the Cisco Unity Express Script Editor Validate tool and check that the Validation Succeeded message appears. Any errors appear in the Debug pane. Double-click them to find the error condition in the script.
After uploading the script to the Cisco Unity Express system, use the default traces to troubleshoot problems. Use the EXECUTING_STEP filter to display only the script steps, as they are run, in the trace. Use the clear trace command to clear previous trace messages before using the show trace command. For example:
clear trace
Make a test call.
show trace buffer long | include EXECUTING_STEP
When Maximum Retries on the NameToUser step is set to 0 or 1, you must use a Terminating Key character. Without the Terminating Key character, the step does not go to the Successful branch of this step. Instead, the step always goes to the Timeout branch, even if there is a match.
You must create all variables in a script before you can use them. If you create a variable and you later delete it, use the Validate tool to find it.
Set the Parameter of a variable property to make the variable available to the Cisco Unity Express administrator through the web page.
Alternately, do not set the Parameter of a variable property to prevent it from being accidentally changed through the web page.
Note You cannot assign a system prompt to a prompt variable when you define it. You must use the Set step or the Create Prompt step to assign a system prompt to a variable.
Table 2 contains the most commonly used terms in initially writing scripts, see the Glossary page for more definitions.
The following sections provide references related to Cisco Unity Express.
See Cisco Unity Express Documentation, By Version for links to documents related to Cisco Unity Express.
For information on obtaining documentation, obtaining support, providing documentation feedback, security guidelines, and also recommended aliases and general Cisco documents, see the monthly What's New in Cisco Product Documentation, which also lists all new and revised Cisco technical documentation, at:
http://www.cisco.com/en/US/docs/general/whatsnew/whatsnew.html