overview of cisco unity express script editor · script by entering a filename with an .aef...

24
3 Cisco Unity Express Script Editor Installation and Configuration Guide Cisco Unity Express Release 2.1 Overview of Cisco Unity Express Script Editor The Cisco Unity Express Script Editor is a visual programming environment for creating auto attendant application scripts. You can use the Cisco Unity Express Script Editor on any PC with Microsoft Windows software. Note Do not install the Cisco Unity Express Script Editor application on hardware on which you previously installed the Cisco Customer Response Applications Developer (CRA) Editor application. These applications share registry files and will not work if installed on the same hardware. This chapter provides an overview of the Cisco Unity Express Script Editor application, including the windows and panes, and gives information about using script elements. It contains the following topics: Creating Cisco Unity Express Scripts, page 3 Using the Cisco Unity Express Script Editor Window, page 4 Using Prompts, page 18 Using Expressions, page 19 Configuring Error Handling, page 23 Configuring Script Interruption, page 26 Creating Cisco Unity Express Scripts The Cisco Unity Express Script Editor allows you to create and validate scripts for handling calls that reach the auto attendant application. A script is comprised of steps and variables. A step is a Java-based block of contact-processing logic. You do not need to understand Java programming to build a Cisco Unity Express script. Each step has its own unique capabilities, such as simple incrementing, generating and playing out prompts, and obtaining user input. Steps can act individually or they can be grouped to work as a subprocedure, called an output branch. An output branch returns a value to the main procedure. Some steps require variables in order to complete their function; other steps do not require additional information. Variables provide data that influence how the script will proceed. The data source may be user input or values calculated by other script steps or procedures.

Upload: others

Post on 11-Jul-2020

19 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor

The Cisco Unity Express Script Editor is a visual programming environment for creating auto attendant application scripts. You can use the Cisco Unity Express Script Editor on any PC with Microsoft Windows software.

Note Do not install the Cisco Unity Express Script Editor application on hardware on which you previously installed the Cisco Customer Response Applications Developer (CRA) Editor application. These applications share registry files and will not work if installed on the same hardware.

This chapter provides an overview of the Cisco Unity Express Script Editor application, including the windows and panes, and gives information about using script elements. It contains the following topics:

• Creating Cisco Unity Express Scripts, page 3

• Using the Cisco Unity Express Script Editor Window, page 4

• Using Prompts, page 18

• Using Expressions, page 19

• Configuring Error Handling, page 23

• Configuring Script Interruption, page 26

Creating Cisco Unity Express ScriptsThe Cisco Unity Express Script Editor allows you to create and validate scripts for handling calls that reach the auto attendant application. A script is comprised of steps and variables.

A step is a Java-based block of contact-processing logic. You do not need to understand Java programming to build a Cisco Unity Express script.

Each step has its own unique capabilities, such as simple incrementing, generating and playing out prompts, and obtaining user input.

Steps can act individually or they can be grouped to work as a subprocedure, called an output branch. An output branch returns a value to the main procedure.

Some steps require variables in order to complete their function; other steps do not require additional information.

Variables provide data that influence how the script will proceed. The data source may be user input or values calculated by other script steps or procedures.

3Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 2: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Using the Cisco Unity Express Script Editor Window

Creating a script involves the following tasks:

• Assemble steps in an appropriate order.

Drag step icons from a palette on the left pane of the workspace to the design area on the right pane of the workspace. You can add, delete, or reorder steps as needed.

The Cisco Unity Express Script Editor supplies the code required to connect the steps.

• Provide any variable definitions and other parameters required for the steps.

• Validate the completed script directly in the Cisco Unity Express Script Editor.

Using the Cisco Unity Express Script Editor WindowTo start the Cisco Unity Express Script Editor, use the following path:

Start > Programs > Cisco CUE Developer > Cisco CUE Editor

The Cisco Unity Express Script Editor window appears, as shown in Figure 1.

4Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 3: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Using the Cisco Unity Express Script Editor Window

Figure 1 Cisco Unity Express Script Editor Window

Table 1 describes the four panes of the Cisco Unity Express Script Editor window:

Table 1 Cisco Unity Express Script Editor Window

Pane Number Pane Name Description

1 Palette pane Use the Palette pane to choose the steps you need to create your script. See “Using the Palette Pane” on page 8 for a description of this pane.

2 Design pane Use the Design pane to create your script. See “Using the Design Pane” on page 9 for a description of this pane.

5Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 4: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Using the Cisco Unity Express Script Editor Window

Using the Menu BarThe following sections describe the menu bar options in the Cisco Unity Express Script Editor window.

• File Menu Options, page 6

• Edit Menu Options, page 7

• Tools Menu Options, page 7

• Window Menu Options, page 7

• Help Menu Options, page 7

File Menu Options

Use File menu options to perform a variety of tasks with files as shown in Table 2:

3 Debug pane Use the Debug pane to view messages when you are validating a script. See “Using the Debug Pane” on page 18 for a description of this pane.

4 Variable pane Use the Variable pane to create, modify, and view variables for your script. See “Using the Variable Pane” on page 12 for a description of this pane.

Table 1 Cisco Unity Express Script Editor Window

Pane Number Pane Name Description

Table 2 File Menu Options

Option Description

New Creates a new script and places a Start step in the Design pane.

(The Start step is the first step of every new script.)

Open Displays a standard Open window that allows you to choose and open an existing script (.aef) file.

Use the Open option to modify an existing script.

Close Closes the current script file.

Save Saves the current script file.

Save As Opens a standard Save As window that you can use to save your current script by entering a filename with an .aef extension.

Print Prints the current file.

Properties Provides two tabs:

• General—Describes the type, location, and size of the opened file.

• Summary—Provides fields you can use to enter descriptive information about the opened file.

6Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 5: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Using the Cisco Unity Express Script Editor Window

Edit Menu Options

Use Edit menu options to perform various editing tasks as shown in Table 3:

Tools Menu Options

The only Tools menu option is Validate.

Use the Validate menu option to check that your script sequence and your step properties usage conform to the general syntax that the Cisco Unity Express Script Engine requires.

Window Menu Options

Use Window menu options to control how multiple files appear in the Design pane as shown in Table 4:

Help Menu Options

Use Help menu options to obtain more information about Cisco Unity Express Script Editor screens, fields, and software as shown in Table 5:

Table 3 Edit Menu Options

Option Description

Undo Undoes last action

Redo Redoes last action

Cut Cuts selected items

Copy Copies selected items

Paste Pastes selected items

Table 4 Window Menu Options

Option Description

Cascade Displays files as stacked windows

Tile Horizontally Displays files as equal windows tiled horizontally

Tile Vertically Displays files as equal windows tiled vertically

Table 5 Help Menu Options

Option Description

Help Displays information about the Cisco Unity Express Script Editor screens and fields.

About Displays the version number of the Cisco Unity Express Script Editor software.

7Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 6: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Using the Cisco Unity Express Script Editor Window

Using the ToolbarThe Cisco Unity Express Script Editor toolbar provides icons you click to choose some of the same options available from the Menu bar. (See Figure 2.)

Figure 2 Cisco Unity Express Script Editor Toolbar

Table 6 describes the function of each numbered tool on the toolbar shown in Figure 2.

Using the Palette PaneThe Palette pane of the Cisco Unity Express Script Editor contains all the steps available for developing scripts. (See Figure 3.)

Figure 3 .Cisco Unity Express Script Editor Palette Pane

For complete descriptions of the steps in every palette pane category, go to:

• “General Steps” on page 69

• “Contact Steps” on page 88

Table 6 Cisco Unity Express Script Editor Window Toolbar Functions

Tool Number Description

1 Creates a script

2 Opens a script

3 Saves a script

4 Prints selected file

5 Cuts selected item

6 Copies selected item

7 Pastes selected item

8 Undoes previous command

9 Redoes previous command

8Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 7: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Using the Cisco Unity Express Script Editor Window

• “Call Contact Steps” on page 93

• “Media Steps” on page 98

• “User Steps” on page 125

• “Prompt Steps” on page 129

To display the contents of a palette, click the plus sign (+) to the left of the palette icon in the Palette pane.

To create your script, click a step in the Palette pane and drag it on top of the step that it should follow in the Design pane. Each step performs a specific function and creates a portion of the underlying programming. You can customize most of the steps once you have placed them in the Design pane.

Your cursor will display the international prohibited sign until you move a step into a location that the Cisco Unity Express Script Editor allows.

Note If you try to drag a step to the Design pane when a customizer window is open, the Design pane will not accept the step. Before you drag a step to the Design pane, close any open customizer window(s), one or more of which may be hidden behind the Cisco Unity Express Script Editor window.

Using the Design PaneThe Design pane of the Cisco Unity Express Script Editor is the location where you perform the largest portion of your script development.

Starting a Script

To begin a new script in the Design pane of the Cisco Unity Express Script Editor window, choose File > New. The Cisco Unity Express Script Editor adds the Start step automatically and provides the starting point to which you add your steps.

Adding a Step

To add a step to your script, drag the step icon from the Palette pane and drop it onto the step it will follow in the Design pane. Place the steps in logical order for the script you are building.

To change the order of a step in the script, drag the individual step icon from its old location to its new location. To delete a step, select the step icon and press the Delete key.

To end the script, click the General palette and drag End to your script. The End step appears.

Figure 4 shows an example of how a script displays in the Design pane.

9Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 8: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Using the Cisco Unity Express Script Editor Window

Figure 4 Script Example in the Design Pane

Many steps have output branches under which you add steps to provide desired script logic based on the exit condition of the step.

In Figure 4 above, for example, the Menu step has five output branches:

• DialByExtn

• DialByName

• Operator

• Timeout

• Unsuccessful

Output branches often contain steps and other output branches. In Figure 4, for example, the DialByExtn output branch contains five steps below it, one of which (the Get Digit String step) contains three output branches.

To expand the script under a step, click the plus sign (+) to the left of the step icon. To contract the script under a step, click the minus sign (-) to the left of the step icon.

At run time, each script follows a hierarchical sequence, as indicated by the vertical lines connecting steps. In Figure 4, for example, if the script reaches the Timeout output branch of the Get Digit String step, the script will move to the next step at the level of the Menu step, which, in this example, is the Play Prompt step.

Customizing a Step

You can customize most of the steps in the Cisco Unity Express Script Editor by opening windows called customizer windows. A customizer window contains text fields, called properties, that you can configure to meet the needs of your script. Depending on the step, the properties may be grouped under multiple tabs.

To display the customizer window for a step, perform the following procedure:

Step 1 In the Design pane, right-click the step you want to customize.

The Properties popup menu appears. For example, Figure 5 shows the Menu step Properties popup menu.

10Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 9: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Using the Cisco Unity Express Script Editor Window

Figure 5 Properties Popup Menu—Menu Step

Step 2 Click Properties.

The customizer window of the step appears. For example, Figure 6 shows the Menu customizer window.

Figure 6 Menu Customizer Window

Step 3 Enter appropriate data to customize the step. See each step description later in this guide for the explanation of the customizer window properties for that step.

Each customizer window contains four buttons:

• OK—Applies the changes and closes the customizer window.

• Apply—Applies the changes without closing the customizer window.

11Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 10: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Using the Cisco Unity Express Script Editor Window

• Cancel—Closes the customizer window without applying any changes.

• Help—Displays context-sensitive help for this step.

Customizer windows may also have additional buttons that you use to modify and display various properties within a step.

Step 4 Click the appropriate button after you finish making the changes to the step.

Using the Variable PaneThe Variable pane of the Cisco Unit Express Script Editor is the location where you add and modify the variables used by the script. (See Figure 7 on page 12.) Variables store data that a script uses when it executes the steps. Any step in your script can use variables once you define them in the Variable pane of the Cisco Unity Express Script Editor window. (See Figure 1 on page 5.)

You can also map variables you define for your script to variables you define in a subflow, which is a set of steps that function as part of another script, called the primary script. A subflow can use and manipulate a variable, then return the data that is stored in the variable to the primary script. Scripts cannot share variables with other scripts, except in the case of default scripts, in which the primary script automatically transfers the values of its variables to a default script.

The value of a variable can change during execution.

This section includes the following topics:

• Defining Variables, page 12

• Using Basic Built-in Variable Types, page 13

• Exporting Variables Using Parameters, page 16

• Using Advanced Built-in Variable Types, page 16

Defining Variables

To define a new variable, click the New Variable icon at the top left corner of the Variable pane of the Cisco Unity Express Script Editor window. The Edit Variable window appears. (See Figure 7.)

Figure 7 Variable Pane and Edit Variable Window

12Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 11: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Using the Cisco Unity Express Script Editor Window

Table 7 describes the function of each tool in the Variable pane.

After you use the Edit Variable window to define your variables, the variables appear in the Variable pane. You can select a variable and use the Modify or Delete icons to make any necessary changes.

Table 8 describes the fields in the Edit Variable window.

Using Basic Built-in Variable Types

Table 9 describes the basic built-in variable types:

Table 7 Variable Pane Toolbar Functions

Tool Number Description

1 New Variable icon

2 Delete Variable icon

3 Modify Variable icon

Table 8 Edit Variable Properties

Property Description

Name Name of the variable you want to declare.

Type Type of variable you want to declare. See “Using Basic Built-in Variable Types” section on page 13 for the available variable types.

Java Type Fully qualified class name located using the CLASSPATH environment variable on your computer.

Note The field displays the actual Java type corresponding to the built-in data type chosen in the Type drop-down menu.

Value Data you initially assign to a variable. The type of data you enter must match the data type you declared in the Type field.

Parameter If checked, sets the value for this parameter in the auto attendant web interface when you provision applications that use this script.

13Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 12: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Using the Cisco Unity Express Script Editor Window

Table 9 Variable Types

Variable Name Description Java Class Name Variable Input Format

Boolean A Boolean variable is either true or false, and is used primarily by the If step in the General palette of the Cisco Unity Express Script Editor.

java.lang.Boolean • t, f

• true, false

Character A Character variable consists of alphanumeric characters.

java.lang.Character • Lowercase letters a to z

• Uppercase letters A to Z

• Digits 0 to 9

• Any escape sequence: “\t”, “\r”, “\0”, “\n”, “\f”, “\\”, “\”

• “\uXXXX” can be used to represent any character using the character hexadecimal Unicode number XXXX

Float A Float variable consists of decimal numbers.

java.lang.Float • 3.14159

• 2E-12

• -100

Integer An Integer variable consists of whole numbers, from -2147483648 to 2147483647, inclusive.

java.lang.Integer • 234556789

• 0

• -23

String A String variable consists of a set of Unicode characters, from “\u0000” to “\uffff” inclusive.

java.lang.String • “Hello”, “C:\WINNT\win.ini”—This format does not support any escape characters or Unicode characters.

• u“\”This is a quoted string\””, u“\tHello”, u“\u2222\u0065”, u“C:\\WINNT\\win.ini”, and so forth. This format supports the same escape sequences or Unicode characters described for the Character type.

14Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 13: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Using the Cisco Unity Express Script Editor Window

Date The Date variable contains date information.

java.util.Date • D[12/13/03]

• D[Dec 13, 2003]

• D[January 20, 2003]

• D[Tuesday, April 12, 2003]

• D[12/13/03]

• D[12/13/03 5:50 PM]

• D[April 1, 2003 12:00:00 AM PST]

The parameter specified in between D[] is parsed based on any combination of the following two formats:

• “<date>”

• “<date> <time>”

The Cisco Unity Express Script Editor supports four <date> specification formats:

• SHORT is completely numeric, such as “12/13/03”

• MEDIUM is somewhat longer, such as “Jan 12, 2003”

• LONG is longer, such as “January 12, 2003”

• FULL is completely specified, such as “Tuesday, April 12, 2003”

Time The Time variable contains time information.

java.sql.Time • T[3:39 AM]

• T[11:59:58 PM EST]

The parameter specified inside brackets of T[] is parsed based on the format “<time>”.

The Cisco Unity Express Script Editor supports three <time> specification formats:

• SHORT is short, such as “3:30 PM”

• MEDIUM is longer, such as “3:30:32 PM”

• LONG and FULL (which are identical) are more complete, such as “3:30:42 PM PST”

Table 9 Variable Types (continued)

Variable Name Description Java Class Name Variable Input Format

15Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 14: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Using the Cisco Unity Express Script Editor Window

Exporting Variables Using Parameters

You can declare variables as parameters by checking the Parameter check box in the Edit Variables dialog box.

This feature allows you to set the value for a parameter in the auto attendant web interface. Because the value is initialized at configuration time for the script that uses it, you can change the value without having to edit the script in the Cisco Unity Express Script Editor. Such a variable is called an exported variable.

For example, when you add a new automated attendant using the AA Wizard, the second window of the AA wizard (the Script Parameters window) provides a list of the parameters with their default or current values. You can modify the values in this list.

The variable types that Cisco Unity Express supports for parameters include Number, Character, String, Boolean, and Prompt.

Using Advanced Built-in Variable Types

The Cisco Unity Express Script Editor includes the following advanced built-in variable types:

Contact Variable

Java Class Name: com.cisco.contact.Contact

A Contact variable consists of a contact representing a telephone call.

You can pass a Contact variable as a parameter to a subflow.

Prompt Variable

Java Class Name: com.cisco.prompt.Playable

BigDecimal The BigDecimal variable consists of an arbitrary-precision integer along with a scale, where the scale is the number of digits to the right of the decimal point.

java.math.BigDecimal • 3.14159

• 2E-12

• -100

BigInteger The BigInteger variable represents arbitrary-precision integers.

java.lang.BigInteger • 234556789

• 0

• -23

Double The Double variable represents an expanded Float variable.

java.lang.Double • 3.14159

• 2E-12

• -100

Long The Long variable is an expanded Integer variable.

java.lang.Long • 234556789

• 0

• -23

Table 9 Variable Types (continued)

Variable Name Description Java Class Name Variable Input Format

16Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 15: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Using the Cisco Unity Express Script Editor Window

A Prompt variable contains the information that the script uses to create the prompt or prompts that it plays back to callers. A Prompt variable can be as simple as a single prompt or as complex as a concatenation of multiple prompts.

You can use the following input formats to define Prompt variables:

• P[] or SP[]—Represents an empty prompt. (No prompt gets played back.)

• P[AA\AAWelcome], P[AA\AAWelcome.wav], P[prompt2], and so forth— Represents user-defined prompts located in the User Prompts directory. (The User Prompt directory contains the .wav files on your PC or server.)

• SP[dialtone], SP[gen\char\e.wav], and so forth—Represents system-defined prompts located in the System Prompts directory.

• DP[250], DP[500], and so forth—Represents a delay prompt of the specified number of milliseconds.

• S[Cisco], and so forth—Represents a prompt in which the specified text will be spelled out according to the rules of the current language of the contact in which the prompt will be played back.

• N[22.33], N[-2E-23], N[-1], and so forth—Represents a prompt that will be the spoken representation of the specified number; for example, “twenty-two point three three”, according to the rules of the current language of the contact in which the prompt is played back.

• #[1], #[22], and so forth—Represents a prompt that will be the spoken representation of the specified ordinal number; for example, “first”, “twenty-second”, according to the rules of the current language of the contact in which the prompt will be played back.

• $[12], $[32.50]—Represents a prompt that the script will play back as the specified amount in the system-configured currency in a colloquial format; for example, “twelve dollars”, “thirty-two francs and fifty centime”, according to the rules of the current language of the contact in which the prompt will be played back.

As in the other advanced variables, the expression input format for the prompt variable is the same as the variable input format:

• The parameter specified inside the brackets of S[] can also be the result of any string expression; for example S[lastName + firstName].

• The parameter specified inside the brackets of DP[], N[], #[], and $[] can also be the result of any number expression; for example, DP[delay], N[counter + 3], #[position], $[amount + 10.00].

When you use operators with the Expression Editor, if at least one of the operands is a Prompt, then the result will be a Prompt concatenation of the two operands, where the other one is converted to a Prompt according to the following rules:

• The system converts a String of Character operand to a Prompt using the Spelling Generator (similar to the S[ ] format) or the Character Generator. (See “Spelling Generator” on page 139 and “Number Generator” on page 139 for information about the generator types.)

• The system converts a Number operand to a Prompt using the Number Generator (similar to the N[ ] format). (See “Number Generator” on page 139 for information about the generator type.)

• The system converts a Time operand to a Prompt using the Time Generator (see “Time Generator” on page 140).

• The system converts a Date operand to a Prompt using the Date Generator (see “Date Generator” on page 140).

17Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 16: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Using Prompts

User Variable

Java Class Name: com.cisco.user.User

A User variable contains information that is useful for user authentication.

You cannot manually enter a User variable as a value. User variables can be returned only from the Name To User step of the Media palette.

You can pass a User variable as a parameter to a subflow.

Using the Debug PaneUse the Debug pane to validate your script.

The Validation Error messages appear in this pane when a script is validated. Double-clicking the error message takes you to the script step for which the validation failed.

Using PromptsThe Cisco Unity Express Script Editor uses the following two types of prompts:

• System prompts—Used internally by Cisco modules and Cisco sample scripts.

Note System prompts are used internally by the system. We make no guarantees about the continued availability of any system prompt in future releases.

• User prompts—Defined by the user, and manageable by the administrator by means of the Voice Mail > Prompts web page of the Cisco Unity Express GUI administrator interface or by calling in to the Greeting Management System.

All Media and Prompt steps support prompts specified in the following ways:

• String expression—User-defined prompts located in the User Prompts directory.

• Prompt expression—Dynamically created at run time.

Note You must define all prompts played back and recorded with a RIFF header of type WAVE and G711 u-law format.

The script retrieves both user and system prompts from the Prompt Repository. You can manage these prompts from the Voice Mail > Prompts web page of the Cisco Unity Express GUI administrator interface or by calling in to the Greeting Management System. (For more information on managing the prompts, refer to the Cisco Unity Express GUI and CLI administration documents for your system that can be found at http://www.cisco.com/univercd/cc/td/doc/product/voice/unityexp/index.htm.)

18Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 17: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Using Expressions

Using ExpressionsExpressions are useful if you do not know the exact value at design time and instead enter a formula that can be evaluated at run time. The resulting type of the expression must match the expected input type or types (which you check at design time).

Many steps include an Expression Editor (...) button in the customizer window, which you can use to enter an expression. (See Figure 8.)

Figure 8 Expression Editor Button in a Customizer Window Example

You can type an expression directly in the input text field, or click the Expression Editor (...) button to open the Expression Editor. (See Figure 9.)

Figure 9 Expression Editor

You can enter the expression in the text field, or you can use the Variable drop-down menu to get quick access to variables you have previously defined in the script. When you choose a variable from the Variable drop-down menu, the variable name appears in the input text field.

After you enter the expression, click OK. The Expression Editor closes.

19Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 18: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Using Expressions

Using Expression Input FormatsThe following table describes the expression input formats for variable types.

Table 10 Expression Values

Expression Type Description Expression Input Format

Boolean A Boolean expression is either true or false. • true

• false

Character A Character expression consists of alphanumeric characters.

• Lowercase letters a to z

• Uppercase letters A to Z

• Digits 0 to 9

• Any escape sequence: “\t”, “\r”, “\0”, “\n”, “\f”, “\\”, “\”

• “\uXXXX” can be used to represent any character using the character hexadecimal Unicode number XXXX

Float A Float expression consists of decimal numbers.

The script keeps all Float values in Double representation and typecasts down only when it assigns the value to a Float variable. This feature prevents any loss in precision by how Java stores Float values.

If the script cannot hold the value by a Float, the script automatically stores the value as a BigDecimal and typecasts it to a Float when it assigns the value to a variable, with some loss in precision.

• 3.14159

• 2E-12

• -100

Integer An Integer expression consists of whole numbers, from -2147483648 to 2147483647, inclusive.

The script first parses the value as an Integer. If this attempt is unsuccessful, the script parses the value as a Long. If this attempt fails, the script parses the value as a BigInteger. The script may typecast the value to an Integer when the value is assigned to a variable. If the script cannot represent the value as an Integer, the result may be unknown.

• 234556789

• 0

• -23

20Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 19: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Using Expressions

String A Stringexpression consists of a set of Unicode characters, from “\u0000” to “\uffff” inclusive.

• “Hello”, “C:\WINNT\win.ini”—This format does not support any escape characters or Unicode characters.

• u“\”This is a quoted string\””, u“\tHello”, u“\u2222\u0065”, u“C:\\WINNT\\win.ini”, and so forth. This format supports the same escape sequences or Unicode characters described for the Character expression type.

Date The Date expression contains date information.

The parameter specified in between D[] is parsed based on any combination of the following two formats:

• “<date>”

• “<date> <time>”

The Cisco Unity Express Script Editor supports four <date> specification formats:

• SHORT is completely numeric, such as “12/13/03”

• MEDIUM is somewhat longer, such as “Jan 12, 2003”

• LONG is longer, such as “January 12, 2003”

• FULL is completely specified, such as “Tuesday, April 12, 2003”

• D[12/13/03]

• D[Dec 13, 2003]

• D[January 20, 2003]

• D[Tuesday, April 12, 2003]

• D[12/13/03]

• D[12/13/03 5:50 PM]

• D[April 1, 2003 12:00:00 AM PST]

Time The Time expression contains time information.

The parameter specified inside brackets of T[] is parsed based on the format “<time>”.

The Cisco Unity Express Script Editor supports three <time> specification formats:

• SHORT is short, such as “3:30 PM”

• MEDIUM is longer, such as “3:30:32 PM”

• LONG and FULL (which are identical) are more complete, such as “3:30:42 PM PST”

• T[3:39 AM]

• T[11:59:58 PM EST]

Table 10 Expression Values (continued)

Expression Type Description Expression Input Format

21Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 20: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Using Expressions

Using Operators with the Expression EditorThe Cisco Unity Express Script Editor accepts the following operators, which are listed in order of execution priority:

1. Parentheses (...)—Works with any expression; allows you to give priority to the expression contained in the parentheses.

2. Multiplication (*), Division (/)—Works with any number expression (integer, long, float, decimal, BigInteger, BigDecimal)

Number operands are properly promoted to a valid type before testing.

3. Addition (+), Subtraction (-)—Works with any number expression (integer, long, float, decimal, BigInteger, BigDecimal)

Number operands are properly promoted to a valid type before testing.

4. Less Than (<), Greater Than (>), Less Than or Equal (<=), Greater Than or Equal (>=)

Comparison operands work only on String, Character, and Number operands.

5. Equal to (==), Not Equal to (!=)

Testing for the <null> constant is supported by the two equality operators.

6. And (&&)— Works only with Boolean expressions.

7. Or (||)—Works only with Boolean expressions.

BigDecimal The BigDecimal expression consists of an arbitrary-precision integer along with a scale, where the scale is the number of digits to the right of the decimal point.

• 3.14159

• 2E-12

• -100

BigInteger The BigInteger expression represents arbitrary-precision integers.

• 234556789

• 0

• -23

Double The Double expression represents an expanded Float variable.

If the script cannot hold the value by a Double, the script automatically stores it as a BigDecimal and typecasts it down to a Double when the script assigns a value to a variable, with some loss in precision.

• 3.14159

• 2E-12

• -100

Long The Long expression is an expanded Integer variable.

The script first parses the value as a Long and if it fails, the script parses the value as a BigInteger. The script may typecast the value to a Long when the script assigns the value to a variable. If the script cannot represent the value as a Long, the result may be unknown.

• 234556789

• 0

• -23

Table 10 Expression Values (continued)

Expression Type Description Expression Input Format

22Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 21: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Configuring Error Handling

8. Concatenation (+)

If at least one of the operands is a String, and the other one is not a prompt, then the other one is converted to a String using the String.value( ) method and the result is a new String corresponding to the concatenation of the String representation of both operands. Typically the String.valueOf() method simply calls the toString() method of the object being concatenated or returns the string “null” if the object is null.

If the operands are Characters, then they are concatenated together, resulting in a new String.

Configuring Error HandlingThe Cisco Unity Express Script Editor allows you to create scripts with a variety of ways to handle errors.

Configuring Basic Error Handling

Continue on Prompt Errors

The Continue on Prompt Errors option allows the script to continue to execute when the script receives invalid input (for example, Invalid Audio Format or File Not Found).

The Cisco Unity Express Script Editor provides the Continue on Prompt Errors option in the customizer windows of steps in the Media palette. (See “Media Steps” on page 98.) For example, Figure 10 shows the Prompt tab of the Get Digit String customizer window.

Figure 10 Continue on Prompt Errors Option—Prompt Tab of the Get Digit String Customizer

Window

23Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 22: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Configuring Error Handling

When enabled, the step continues with the next prompt in the list of prompts to be played back, or, if it is the last step in the list, it waits for caller input.

When you enable Continue on Prompt Errors, you instruct the script to ignore prompt errors and continue as if the playback of a particular prompt was successful. For example, in a sequence of prompts “1 + 2 + 3”, if prompt #1 fails, the step will continue with prompt #2. If prompt #3 fails, the step will continue, waiting for caller input as if prompt #3 had been properly played back.

When you disable Continue on Prompt Errors, the media steps generate an exception, which can then be handled in the script.

Available prompt exceptions are:

• PromptException

• UndefinedPromptGenerator

• UndefinedPromptException

• InvalidPromptArgumentException

• UnsupportedPromptExpression

Error Output Branches

Error output branches contain logic that provides instructions on what to do when typical errors occur.

Figure 11 shows error output branches under a Call Redirect step in a script.

Figure 11 Error Output Branches—Call Redirect Step

In this figure, the Call Redirect step includes logic for both an invalid extension and an out-of-service extension.

Note The script provides error branches only for expected error conditions, not for system errors.

Configuring Advanced Error Handling

Using the On Exception Goto Step

The On Exception Goto step of the General palette (see “On Exception Goto” on page 82) sends the execution to a specified place in the script when an exception is generated.

By using the On Exception Goto step for a specific exception in a script, you can register a new handler for a specific exception or override a previously existing one.

24Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 23: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Configuring Error Handling

The registration process affects the complete script. The assigned handler activates the script no matter where the exception occurs (before, during, or after the given step). After the step executes, the handler is registered until either a new one is re-registered or the exception is cleared with the On Exception Clear step of the General palette.

If an exception results in a subflow, the script first consults the exception handlers of the subflows. If none are defined for the given exception, the exception aborts the subflow and the Cisco Unity Express application looks for exception handlers in the parent script. This process continues until the script finds an exception handler or the top level of the script is reached.

If no exception handlers are registered, the script aborts and error handling falls back to the last level of error handling, which is the default script.

Using Default Scripts

The default script is the last level of user-defined error handling before the Cisco Unity Express Script Editor applies a default system treatment to all active contacts.

The Cisco Unity Express Script Editor invokes this default script under the following conditions:

• The main script aborts, which happens for either of the following reasons:

– An uncaught exception occurs.

– The Cisco Unity Express application software is unable to invoke the primary script because it has not been properly validated.

• An incoming call must be aborted because the Cisco Unity Express application software has reached its limit for the number of simultaneous sessions for the application.

In each of these scenarios, the Cisco Unity Express Script Editor marks all active contacts as aborting before the default script is executed. The final state of these contacts is ABORTED even if they are transferred or redirected as a result of the execution of the default script.

Note Remember that the purpose of the default script is to gracefully terminate the call when the main script fails, not to have a fall back to provide the original services intended by the primary script. This distinction is important because using system resources to execute this default script may impair system performance. If the primary script fails too often, fix the primary script rather than provide another script to attempt the same task.

The default script does not execute if the primary script ends normally. If contacts are still active when the primary script ends, all active contacts not marked as handled will abort, and all active contacts marked as handled are simply terminated. In this case, check the primary script for any design problems.

Note Remember that the default script provides only a final feedback to the contact regarding the system problem and does not continue the service or restart the service.

The system applies the CallContact script if the contact is still active after the system executes the default script (if any). The CallContact script plays back the prompt, “We are currently experiencing system problems, please call back later” as an announcement, followed by a fast busy signal.

25Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1

Page 24: Overview of Cisco Unity Express Script Editor · script by entering a filename with an .aef extension. ... To change the order of a step in the script, drag the individual step icon

Overview of Cisco Unity Express Script Editor Configuring Script Interruption

Configuring Script InterruptionScript interruption is a feature that allows external events to interrupt the current processing of a script in order to return to another part of the script or stop the execution of the script.

Script interruption is typically used when the script needs to be notified that one of its contacts has been remotely terminated, such as when the caller hangs up.

Note In every case, any event that triggers the need to interrupt the script can occur at any time while the script executes other steps.

By default, scripts are automatically interruptible before any step is executed. Should any external event (such as that described above) interrupt the script, the script will continue processing based on the proper handling for the specific event before it begins to execute the next step.

If you want two consecutive steps to execute without the possibility of interruption, you must move these two steps to a subflow where you can disable interruptions completely while the script processes that subflow.

Cisco Unity Express Script Editor has an “interruptible” option for some steps that allows you to indicate whether or not the script can interrupt the step from within when an external event occurs.

When a contact terminates remotely, the script performs one of the following actions:

• When a caller hangs up, the script will be interrupted (if possible) and a ContactInactiveException will be generated. This exception can then be caught with the OnExceptionGoto step of the General palette and properly handled.

• If a caller hangs up and no exception handling logic is available, the script immediately aborts.

• When managing multiple contacts, the OnExceptionGoto step cannot differentiate which contact was remotely terminated. Instead, it must specify a Label to which it can loop through all known contact variables and use the Get Contact Info step of the General palette to search for an Active flag.

If an interrupting event happens when the script is not currently interruptible, the script is automatically interrupted whenever it becomes interruptible again. For example, although a script is not interruptible when it is running a subflow marked to disable interruptions, it will process the interruption as soon as the subflow terminates and control is returned to the parent (if that primary script is interruptible)

26Cisco Unity Express Script Editor Installation and Configuration Guide

Cisco Unity Express Release 2.1