Cisco IPC Express Automated Attendant Options


This application note describes the Cisco IP Communications (IPC) Express options for AA functionality, including an integrated automated-attendant (AA) application and a Toolkit Command Language (Tcl)-based AA. The integrated AA option is a Cisco CME application, Cisco Unity Express, which includes both an AA and a voice mail component. The AA component is covered in this application note, and the voice mail portion of the application is described in the application note entitled "Cisco IPC Express Integrated Voice Mail."

The Cisco Unity Express AA is a full-featured, customizable AA application offering an easy-to-use graphical user interface (GUI) drag-and-drop interface to change the system AA menu flow. Cisco Unity Express is cost-effective for small and medium standalone or networked offices, or as a distributed AA (and voice mail system) in branch offices of an enterprise network. Cisco Unity Express offers up to five distinct AAs, each associated with an individual pilot number and one or more scripts that can be fully customized.

The second alternative is a Tcl-based AA that leverages Cisco IOS built-in Tcl capability. Although it can be customized by someone proficient in the Tcl language, it is not typically an end-user interface. Instead, it is a tool used by Cisco and Cisco developers to provide ready-made scripts for your system.

Key topics presented in this application note are presented in the following sections:

Using an Automated Attendant or a Receptionist in Your Office

Understanding the Cisco IPC Express Integrated Automated Attendant

Cisco Unity Express System AA

Customizing the Cisco Unity Express AA

The Cisco Unity Express Greeting Management System

Setting Up a Cisco Unity Express Automated Attendant

Tcl-Based Automated Attendant

Using an Automated Attendant or a Receptionist in Your Office

With its AA options, Cisco CME can provide a fully automated front end to calls coming into a small office. All IP phone extensions, the voice-mail pilot number (the number called to access the voice mail application), and general information such as location, business hours, and driving directions can all be accessed via the AA menu choices. However, many small businesses choose to enhance their customer relationships with a receptionist instead of presenting an AA menu to their callers. For maximum flexibility, both modes of operation can be used. A receptionist can answer calls during normal business hours, and an AA can direct after-hours calls or can be used as a backup if the receptionist is unable to answer the phone.

When deploying an AA in an office, you must first decide how to handle calls into the office, both during business hours and after hours. Next, craft the Cisco CME call routing features, the AA menus, and the digit manipulation done by the Cisco CME system to achieve the desired call routing. Cisco CME call routing capabilities depend in part on how the PSTN trunks are configured and what digit information the PSTN delivers.

Key considerations addressed in this section are as follows:

Calls to the Main Office Number

Call Routing Considerations for AA Versus a Receptionist

Calls to the Main Office Number

For a business with direct inward dial (DID) service, the only calls typically answered by an AA or receptionist are the general calls to the main office number. DID calls are switched automatically to the extension number that the caller dials. For example, the extension 3001 PSTN DID number is 22x-55y-3001, so whenever this number is called, the IP phone for extension 3001 rings automatically without AA or human assistance. DID call routing makes sense for a business such as an law office, where each lawyer must be individually reached by clients and the DID PSTN phone number appears on the law-office business card.

Cisco CME default operation is to switch calls automatically to the dialed extension (via dial peer matching), provided that dialed digits (DNIS) are available from the PSTN for the call. However, even with DID service, it is still possible to redirect all or certain calls to an AA or receptionist by doing digit manipulation on the dialed digits if you prefer this call routing.

Many small businesses might not desire the cost of DID PSTN service because of either size (the business is too small) or the type of business they conduct. For example, a small charity or restaurant incoming phone business is of a general nature and can be handled equally well by any employee answering the phone. For these types of businesses, multiple general PSTN lines make more sense.

Calls to multiple general PSTN lines can also be directed to either an AA or receptionist. Or all calls can simply ring on the multiple line appearances (Line 1, Line 2, and so on) on the phones and be answered by any employee at any phone. It is also possible that these PSTN lines appear on one phone only—the receptionist phone—and that the receptionist then transfers the call to the appropriate extension. All calls not answered directly by employees via these methods must be answered by either a receptionist or an AA.

If you decide that only an AA is required in an office, simply configure all main office PSTN calls to terminate on the AA pilot number. As soon as the AA answers the call, callers can use the dial-by-number or dial-by-name features to reach the extension or service of their choice.

If you decide that a receptionist is required, configure all main office PSTN calls to terminate on the receptionist extension. The receptionist can then transfer the call to the extension of the employee or group the caller wants to contact. If you want to use the AA to handle calls as a backup to the receptionist, or as an after-hours mechanism, it is possible to call-forward-no-answer (CFNA) the receptionist extension to the AA.

If the receptionist phone CFNAs to the AA, unanswered calls cannot be directed to a personal voice mailbox, with the result that the receptionist cannot have voice mail. This situation can be circumvented in one of two ways:

Define a separate private extension for the receptionist that forwards to personal voice mail when not answered. Then define a different public extension for the main office calls that forwards to the AA if not answered. Both extensions appear on the receptionist phone, but different types of calls are directed to each extension, and they have different CFNA destinations.

CFNA the receptionist phone to the AA and then define an AA menu branch where a caller can choose to leave a message for the business. Define a Cisco Unity Express general delivery mailbox (GDM) for this purpose, and configure it to provide a message waiting indicator (MWI) on the receptionist phone. The definition and use of GDMs are described in the application note entitled "Cisco IPC Express Integrated Voice Mail."

Call Routing Considerations for AA Versus a Receptionist

In addition to the business decisions for call routing covered in the preceding section, you also must consider Cisco Unity Express and Cisco CME feature operation when deciding whether to route calls to an AA or a receptionist. These feature considerations are described briefly in the following sections. The description draws on concepts such as user and group definitions, which are covered in greater detail in the application note entitled "Cisco IPC Express Integrated Voice Mail," and AA concepts such as dial-by-number and dial-by-name, which are covered later in this application note.

Using Dial-by-Name to Reach Group Names

Group and personal extensions can be reached via the Cisco Unity Express AA dial-by-number feature or via a receptionist. Group names, however, cannot be reached via the Cisco Unity Express AA dial-by-name feature—only personal names can. Personal names are those associated with the employees in the office. Group names are associated with functions in your office, such as the help desk or the sales or shipping departments.

Reaching a group by name requires one of the following call routing alternatives:

A receptionist

The caller must know the extension associated with the group

A customized AA menu that leads the caller through the available group choices (such as "Press 1 for sales; press 2 for support") and transfers the call to the appropriate extension

Transferred Calls That Forward to Voice Mail

A call arriving at the AA that is subsequently redirected to the chosen extension (by dial-by-number or dial-by-name) might be forwarded to voice mail if the extension is not answered or is busy. In this call scenario, the Cisco Unity Express AA sets the redirected number field appropriately for the call to enter the called user mailbox.

Consider an example: A PSTN caller dials 44x-55y-3000, the main office number. This call terminates on the Cisco Unity Express AA (for example, 6801 as the AA pilot number), and the caller chooses extension 3001 from the menu. Extension 3001 rings. When it is not answered, the call is forwarded to voice mail (for example, 6800 as the voice mail pilot number) and enters the voice mailbox associated to User2 U2 at extension 3001. At this point, 3001 is the number contained in the redirected number field when entering voice mail. Therefore, the caller hears the User2 U2 mailbox greeting (for example, "You have reached the desk of User2 U2. Please leave a message after the tone.").

Now consider the same call scenario, but with the receptionist answering the call instead of the AA. The PSTN caller dials the main office number, 44x-55y-3000. The receptionist answers the call and learns that the caller wants to speak to User2 U2 at extension 3001. The receptionist has two choices when redirecting the call:

Transfer the call to the User2 U2 extension, 3001

Transfer the call directly to voice mail (using the voice mail pilot number, 6800)

The first case works exactly like the AA call flow described earlier, and the call enters the User2 U2 voice mailbox. The second case, though, has the redirected number field set to the receptionist extension, not to extension 3001; therefore, the call does not enter the User2 U2 mailbox, but the receptionist mailbox instead.

If a receptionist is used to front calls, it is recommended that calls are transferred to the desired extension and not directly to the voice mail pilot number. If the direct transfer method must be implemented, each employee must have an associated phantom directory number (DN) in addition to his or her normal extension. Also, the phantom DN must be associated with the mailbox in the Primary E.164 field of the Cisco Unity Express user definition (you will read more about this in the application note entitled "Cisco IPC Express Automated Attendant Options"). In this configuration, the receptionist must transfer calls to the phantom DN for the employee, instead of to his or her normal extension. This phantom DN is then call-forward-all (CFA) to voice mail. This configuration is shown in Figure 1.

Figure 1 Transferring a Call Directly to Voice Mail

Following the lower set of arrows in Figure 1, the receptionist receives a call and chooses to transfer it to the User2 U2 phone (extension 3001). It rings and then forwards to voice mail (pilot number 6800) if it is not answered.

The upper set of arrows shows the call flow for transferring the call directly to voice mail without first ringing the User2 U2 phone. A phantom DN 8001 is defined for User2 U2. This secondary extension is configured into the User Profile in the Primary E.164 Number field as shown. In this scenario, the receptionist answers the call, determines that it must be redirected to the User2 U2 voice mail, and transfers the call to extension 8001 (the User2 U2 phantom DN) instead of 3001 (the User2 U2 desk IP phone extension).

The following example configuration illustrates the phantom DN configuration required on Cisco CME to support this operation.

ephone-dn 100
  number 8001
  !choose a number that is easy for the receptionist to remember and that fits
  !well into the dial plan
  call-forward all 6800
  !call forward all calls unconditionally into voice mail pilot number

The only configuration to be added to Cisco Unity Express is to enter the phantom DN (8001) into the User Profile Primary E.164 Number field, as shown in Figure 1. The option of adding a second DN (8001 in this example) is available only if the Primary E.164 Number field is not already used for the employee DID number (for example, 22x-55y-3001). This field and its use for voice mail configuration are further described in in the application note entitled "Cisco IPC Express Automated Attendant Options."

Directory Information

The user or extension directory information available to the Cisco Unity Express AA versus the receptionist might be different. The Cisco Unity Express AA allows any digits to be dialed via the dial-by-number feature. The AA blindly transfers the call to whatever digits the caller entered into the dial-by-number feature without any cross-checks. In other words, the AA does not use a directory to determine whether or where the call can be transferred.

The Cisco Unity Express AA dial-by-name feature, however, uses its built-in Lightweight Directory Access Protocol (LDAP) directory, so only extensions associated with users (not with groups) and with names appropriately configured into the system are accessible via the Cisco Unity Express AA dial-by-name feature.

A receptionist is likely to use either a printed list of extensions (employees and groups) or the directory that Cisco CME provides on the IP phone display. The phone-based Cisco CME directory feature uses the name field under the ephone-dn command configuration as its database. This information is not synchronized with the Cisco Unity Express LDAP name information, so the entries can potentially be different (depending on how the system was configured and which field values have been manually coordinated by the system administrator).

Understanding the Cisco IPC Express Integrated Automated Attendant

The preceding section described general considerations with call routing to a receptionist or an AA. Provided that your business requires at least some of its calls to be routed via an AA, the following several sections describe Cisco Unity Express AA capabilities in more detail. The features described here assume a minimum of Cisco Unity Express 1.1 software. Some features require later releases.

When callers call into the AA number, based on the time of day and the day of the week, the AA might play a different greeting to callers, followed by a menu of options. After the caller selects the desired option, the call is routed to the requested destination, which can be an employee extension or a service such as recorded driving directions or business hours.

One of the many benefits of an AA is that after-hours callers can still receive the information they need to contact your business. It also lowers business expenses and lessens the burden on a receptionist. An AA is especially useful for larger sites where the number of calls to the main office number might overwhelm a receptionist. Use care when designing an AA menu, because it is the public face of your business to clients. Badly designed menus, menu choices that are ambiguous, or loops within the AA script will frustrate callers.

Cisco Unity Express provides the capability to define up to five different AAs. Each individual AA is a menu script associated with a phone number called a pilot or call-in number. Calls arriving at the pilot number, either internal or PSTN calls, are then handled by the script associated with the pilot number.

Cisco Unity Express ships with a system AA (using system-provided scripts) that requires minimal configuration to set up for your business. You can also use one or more custom scripts that tailor the AA menu options to your business needs. Each pilot number that you associate with an AA script counts as a distinct AA application. Up to five of these AA applications can be active in the Cisco Unity Express system at once.

Which AA is executed depends on which pilot number you direct your calls to; this is entirely flexible. For example, you can have the system AA active, one custom AA that you have written, and one or more test scripts that are not actively taking calls but that are present on Cisco Unity Express as the third or fourth AAs. Or you can have different departments, each with its own direct PSTN number, and each wanting to manage its own AA greeting and menu separate from the other departments. This configuration can be accommodated with two or more separate AAs in the system. Most businesses, however, in addition to an optional receptionist use one of the following:

The system AA

A single custom AA (with a dormant system AA, meaning that the system AA is present but no calls are directed to it)

Cisco Unity Express System AA

The system AA is shipped to ensure that you can set up a working system in a minimal amount of time. You simply configure a small number of parameters, and record a few greetings (called prompts on the Cisco Unity Express system). You need not worry about the script itself, because it is fixed and cannot be changed.

The system AA offers the canned menu shown in the following menu flow summary. The highlighted lines are new features added to the system AA in Cisco Unity Express 2.1.

Default Cisco Unity Express System AA Menu summary is as follows:

1. If emergency alternate greeting active

Play "alternate greeting"

2. Play "welcome greeting"

3. If holiday

Play "holiday greeting"

4. Else if business open

Play "business open greeting"

5. Else

Play "business closed greeting"

6. To enter the phone number of the person you are trying to reach, press 1

7. To enter the name of the person you are trying to reach, press 2

8. To transfer to the operator, press 0

You can change the welcome greeting to your own greeting, such as "Welcome to XYZ Company...." Similarly, you can rerecord the alternate, holiday, business open, and business closed greetings to suit your needs even though the Cisco Unity Express system supplies system default greetings.

The system AA menu structure cannot be changed. The parameters of the system AA script, such as the welcome greeting and the operator extension, can be configured as shown in Figure 2. The list of available prompts (or greetings) present on the system is shown in the drop-down box. The operator extension is set to 3010 in Figure 2. The concepts of scripts, variables, and parameters are described in more detail in the "Customizing the Cisco Unity Express AA" section.

Figure 2 Setting the System AA Parameters

The system AA script contains several general AA features, such as dial-by-number and dial-by-name, that you also can reuse in your customized AA scripts. Before you look at the script editor and the mechanics of writing a script for your AA, the following sections cover some of these general AA features in more detail:

The Dial-by-Number Feature

The Dial-by-Name Feature

The Transfer to the Operator Feature

Business Hours Call Routing

Holiday Schedule

Emergency Alternate Greeting

The AA Operator

The Dial-by-Number Feature

If the caller selects the dial-by-number option (the "To enter the phone number of the person you are trying to reach, press 1" line from the system AA uses this feature), the caller is prompted to enter the extension followed by the pound (or hash) key. After the caller presses this key (#), a blind transfer attempt is made to the digits the caller enters.

If the transfer is successful, the destination phone rings, and the caller hears ringback. If the destination party does not answer, after the CFNA timeout, the call is redirected to voice mail.

If the transfer is unsuccessful because of a system error or because the caller enters a nonexistent extension, the caller hears an overflow (also called reorder or fast-busy) tone.

The call is transferred (blind transfer) regardless of whether the extension exists or whether the caller entered an extension or a longer number that can translate to a PSTN destination. Cisco Unity Express AA does not check the digits entered and does not consult any directories for the dial-by-number feature. By default, any number that is part of the Cisco CME dial plan can be dialed from the Cisco Unity Express AA.

If you want to restrict the destination numbers that can be reached via the AA dial-by-number feature, use the Class of Restriction (COR) Cisco CME feature to stop calls to undesired destinations.

The Dial-by-Name Feature

If the caller selects the dial-by-name option (the "To enter the name of the person you are trying to reach, press 2" line from the system AA uses this feature), the caller is prompted to spell a name (the last name followed by the first name) using the phone's touch-tone keypad. Based on the digits the caller enters, the local directory on Cisco Unity Express is searched to find a match. If multiple matches are found, Cisco Unity Express plays the names for all the matches and prompts, and the caller chooses the correct entry from the list.

When the destination party has been identified, a blind transfer attempt is made to the extension. Before attempting the transfer, a prompt in the format of calling: <spoken name of destination party> is played. If the destination party does not have a spoken name recorded in the directory, the prompt calling <extension> is played instead.

When the transfer is successful, the destination phone rings, and the caller hears ringback. If the destination party does not answer, after the CFNA timeout, the call is redirected to voice mail.

Unlike the dial-by-number feature, the dial-by-name feature can transfer a call only to a valid user configured on the system. Figure 3 shows the fields (First Name and Last Name) to configure in the user profile that underpin the directory used by the dial-by-name feature.

Figure 3 Configuring User Names for the Dial-by-Name Feature

Groups configured on Cisco Unity Express do not have associated name fields and, therefore, do not exist in the directory used for dial-by-name. This means groups cannot be dialed via the dial-by-name feature. Instead, explicit AA menu branches can be built to direct calls to groups. For example, a menu branch such as "For sales, press 2. For support, press 3" might be used to direct calls to groups of people in your organization that support a particular function. This type of AA menu requires a custom AA to be used on your system.

The Transfer to the Operator Feature

The caller is given the option of being transferred to an operator or receptionist by pressing 0 in the system AA via the line "To transfer to the operator, press 0." The operator extension can be any extension in your organization. Upon pressing 0, the caller is transferred to the extension configured in the operExtn parameter (see Figure 2).

Although the system AA uses this feature specifically for a transfer to the operator operation, it uses a generic script component to transfer a call. In a custom script, this element can be used to transfer the call to any destination of your choice, including PSTN locations.

Business Hours Call Routing

A business hours schedule is a popular use of an AA. Callers during business hours get different treatment (greetings and menu options) than after-hours callers.

The system AA (as of Cisco Unity Express 2.1) checks for business hours (as shown in the menu flow diagram shown in the "Cisco Unity Express System AA" section). You set this up in the GUI by indicating which days of the week and which hour ranges (in 30-minute increments) within each day represent your business hours.

There is also a business hours script step that you can use in a custom AA to achieve the same functionality.

Holiday Schedule

Cisco Unity Express 2.1 introduces a holiday schedule within the system AA. You can use this to provide a different greeting (or menu) on January 1 than on any other day of the year. You can configure up to 26 different dates (over three years) that are considered holidays. When the system date matches any of these dates, callers hear the holiday greeting and menus.

On Cisco Unity Express releases before 2.1 that do not have this built-in holiday schedule capability, you can build similar functionality by using the day-of-week step in a custom script. The system AA in releases up to 2.0 contains no way to provide special holiday treatment.

With a custom script, if, for example, January 1 is a holiday for your business and it falls on Thursday of this week, you can change the AA script on Monday to provide a special menu on Thursday using the day-of-week element. After Thursday, January 1 has passed, you have to change the AA script again (removing the special Thursday menu). Otherwise, the special holiday menu will occur on every Thursday of every week.

Emergency Alternate Greeting

Another popular AA function is an emergency greeting that can be activated remotely in case something unexpected happens, and the AA menu must be changed immediately to inform callers of the situation—for example, that the office will not be open today. Examples of common emergencies include a snowstorm or a natural disaster such as an earthquake, or an illness in a very small business where there might not be other employees to cover for the absent person.

The Cisco Unity Express emergency alternate greeting (EAG) is a system function that is used in the system AA. It also can be included at any place in the menu flow in any custom script.

The system AA is set up such that when the EAG exists (if this feature has been activated), it is played out right at the top of the script before the normal welcome greeting. The modified system AA flow was shown in the menu flow diagram shown in the "Cisco Unity Express System AA" section. The EAG might say something like "Due to the heavy snowstorm in New York, the office will be closed until Monday, April 4." After the EAG recording has been played, the normal AA menu is presented to the caller.

The EAG feature is controlled by the existence or absence of an EAG greeting (a .wav file) in the system with the appropriate filename (AltGreeting.wav). If this file exists on the system, the EAG feature is automatically active, and the special greeting is played wherever the AA menu directs it to be played. If the .wav file is deleted, the EAG feature is automatically deactivated (the If test in the menu flow diagram shown in the "Cisco Unity Express System AA" section is false), and the AA menu reverts to its normal flow. The EAG is a very convenient feature to use. You only need to call the system and record the EAG or delete it. When you do that, the EAG feature is automatically turned on or off.

The number to call to record the greeting (to turn on the EAG feature) or to delete it (to turn off the EAG feature) is the Cisco Unity Express pilot number associated with the greeting management system (GMS). It can be accessed from any PSTN location. The GMS aspect of the Cisco Unity Express AA system is described in more detail in the "The Cisco Unity Express Greeting Management System" section Briefly, it allows you to record and manage all the prompts used in your AA via any telephone (a local IP phone or a PSTN phone).

The AA Operator

A call must always be handled to logical completion by an automated system such as an AA. During the AA menu flow, various errors can occur, such as timeouts. Another error can occur when the caller is told to press some keys and he or she either does not have a touch-tone phone, chooses not to respond, or is unable to understand the language spoken by the AA prompt. These calls cannot be left hanging. When the error occurs, the call must be redirected to a default treatment, because it cannot proceed through the AA script.

A typical way to handle these types of errors in an AA menu is to transfer such calls to a person (an operator) who can then speak to the caller. This person can be the receptionist or any of the employees in the business. The system AA script has an operator extension parameter. It is recommended that your custom AA scripts include the same functionality. That way, an extension can be filled into this parameter for the person (extension) who acts as the operator for all calls that cannot proceed to completion through the AA.

Customizing the Cisco Unity Express AA

The system AA is fairly simple, and the menu flow cannot be customized. (The only customization possible is rerecording the greetings, setting the business hours and holiday dates, and setting the operator extension.) If a different AA menu flow is needed, a custom AA script must be placed on the system. Up to five AAs (including the system AA) can be loaded into the Cisco Unity Express system to provide a wide range of flexible AA menus to cover very specific business needs.

This section of the application note covers how to prepare a custom AA script using the Cisco Unity Express AA Script Editor. You will explore script elements such as steps, parameters, and variables. You will learn about operations such as viewing, uploading, downloading, and executing scripts. System limits governing scripts and prompts on your system are also described.

The following considerations are addressed in this section:

Preparing a Script Using the Cisco Unity Express AA Editor

Viewing Scripts and Prompts in the System

Uploading and Downloading Scripts

Executing a Script

System Limits on Scripts and Prompts

AA Scripts, Prompts, Variables, and Parameters

To understand how to build a custom AA script, some programming knowledge is helpful. However, even if you do not have any programming background, customizing an AA script is not a complex task. The Cisco Unity Express Script Editor provides a graphical drag-and-drop interface for easily rearranging the steps in a script. An AA script is essentially a computer program, which means that it is a list of steps executed for every call that arrives at the system. The sequence of these steps is specified at a very high level with an easy-to-use icon-based GUI interface.

An AA script is an ordered, logical sequence of actions called steps. Each step signifies a task or operation to be performed on the call, such as playing a prompt, collecting DTMF digits, or redirecting a call to another destination. Each script step has one or more attributes associated with it, such as the Menu step in which the attributes describe what is be done when the caller presses 1 or 2 or any other DTMF digit on the phone keypad.

The following elements make up an AA script:

Steps—Programming steps in the script perform actions such as answering the call, playing prompts, receiving DTMF digits from the caller, making conditional choices based on time-of-day or any other internal value, transferring a call, looking up a username in a directory, and many more.

Prompts—Scripts use short sections of recorded voice to interact with the caller, such as "Please enter the extension of the person you want to reach," "Press 1 for sales," or "Our business hours are 8 a.m. to 5 p.m. Monday through Friday." Each of these recorded voice segments is called a prompt and is referenced by the script as a variable. A prompt is physically stored in a .wav file on the system.

Variables—A variable is a label or tag representing a value that can change during the life of the script. For example, retry_limit might be a variable referenced in a script. This tag has a value of three or five, indicating how many times you want to retry a prompt after a timeout.

Parameters—A parameter is a variable whose value can be changed while the script is running on the Cisco Unity Express system. In other words, you can change the value without editing the script and reuploading it to the system. For example, operExtn is a parameter that can be populated with extension 3001 on Monday and 3002 on Tuesday and so on without the need to edit the script. Not all script variables must be parameters. Only those that you want to change without editing the script are assigned the property of parameter.

Preparing a Script Using the Cisco Unity Express AA Editor

Custom AA scripts are executed on the Cisco Unity Express system, but they are prepared offline on a Windows PC platform by using the Cisco Unity Express AA Editor. Follow these steps, which are shown in Figure 4, to prepare and install a custom Cisco Unity Express AA script:


Step 1 Install the Cisco Unity Express AA Editor software (from CD or by downloading it from Cisco.com) onto a Windows 2000/XP PC or server.

Step 2 Open the Cisco Unity Express Editor to create or edit an AA script. After all the editing changes have been made, validate the script to ensure that no logic errors exist in it.

Step 3 Record the prompts used by the script either offline in a recording studio, with standard PC .wav file recording equipment, or via any telephone connected to the Cisco Unity Express system.

Step 4 Upload the script to the Cisco Unity Express system. If prompts were recorded offline, these too must be uploaded to the Cisco Unity Express system.

Step 5 Assign values to all script parameters. Associate the script with a phone number (pilot number) so that callers can reach the script.


Figure 4 Preparing a Custom Cisco Unity Express AA Script

The Cisco Unity Express AA Editor has several window panes that allow you to construct different aspects of the script, such as the steps, variables, and parameters. Instead of opening an empty file and creating a script from scratch, you might find it easier to reuse several sample scripts available on Cisco.com. The sample scripts can expedite your construction of a custom script. You can open the sample scripts in the Editor, and then copy and paste script segments that you want in your AA menu flow rather than creating a completely new script.

The Cisco Unity Express AA Editor Panes

After you have downloaded and installed the Cisco Unity Express AA Editor onto your PC and have downloaded the sample scripts from Cisco.com, you can open the script files in the Editor application. As with any other Windows application, you can launch the Editor, and then choose files to open. Or you can simply double-click an existing .aef (script) file to launch the Editor automatically (provided that your PC is set up to associate the Editor application with .aef files). Figure 5 shows what the Cisco Unity Express Editor window looks like with an open script.

Figure 5 Cisco Unity Express Editor Screen

The Cisco Unity Express Editor window consists of the following four panes:

Palette pane—This is the top-left pane shown in Figure 5. It includes the palette of icons (representing the steps) that can be used in a script.

Design pane—The top-right pane shows the script content. This is where the steps are sequenced to form the design or flow of the script under construction.

Variable pane—The bottom-left pane shows the variables defined in the script. Columns show the type, current value, and attributes of each variable. The last variable shown in Figure 5, MainOperExt, has an attribute of Parameter. The variable pane is where variables are marked as parameters such that as soon as the script is installed on a Cisco Unity Express system, the value of a parameter variable can be viewed and controlled without editing the script.

Debug pane—When a script is validated, any error or warning messages are shown in this window pane.

The Cisco Unity Express Editor uses a simple and intuitive GUI. Expert users can create sophisticated AA scripts using multilevel nesting and conditional statements. Novice users might find it easiest to start with an existing script, such as one of the sample scripts covered in the "Using Sample Scripts" section, and merely adjust it slightly to suit their needs rather than writing a script from scratch.

After it has been edited and validated, a script is saved to the local hard disk on the PC as an .aef file. It can then be uploaded to Cisco Unity Express (using the GUI or command-line interface [CLI]) to be installed and executed as the system AA.

Constructing a Script

The Cisco Unity Express AA Editor allows you to have multiple script files open at one time, or you can have multiple Editor windows open on your PC, each viewing a single script file.

A script is constructed by using a series of steps to control a call flow. You can start by opening an existing script and rearranging the sequence of steps, copying and pasting steps from another file to new positions in the Design Pane, or dragging steps from the Palette Pane to the Design Pane to build a new sequence of steps. Many steps have attributes that must be checked or filled in on a dialog box. You can access these attributes by right-clicking the step in the Design Pane and selecting Properties from the resulting Windows menu.

A typical script is constructed from the following components:

Start step—This starts execution of the call in the script.

Accept step—This step answers the call and opens a speech path between the caller and the application.

Menu and Play Prompt steps—Usually a series of these steps form the main body of the AA script. A menu (with multiple choices) or a single prompt is played to the caller. After that, the script waits for input on the caller's selection from the menu.

Call Redirect step—This step transfers the call to a selected destination, of which the value is usually kept in a variable in the script that was filled in during an earlier step.

Call Subflow step—An optional step to pass control of the call to another script. When it finishes executing that script, the phone call returns to executing in the calling script.

Goto and If steps—Unconditional or conditional branching within the script steps to control the flow of execution based on variable values or input from the caller.

End—This terminates the script and ends processing of this call.

A full explanation of every step and step attribute that you can use in a script is beyond the scope of this application note. The Cisco Unity Express Editor is based on the Cisco Customer Response Solutions (CRS) Editor. Therefore, you can use the Cisco Customer Response Applications Developer's Guide (available at Cisco.com) as reference material for a detailed explanation of each step and its attributes. The Cisco Unity Express Editor supports fewer steps than the full Cisco CRS Editor used with some other Cisco products.

The Cisco Unity Express Editor uses several categories of steps to perform AA tasks. These categories are shown in the Palette Pane of the Cisco Unity Express Editor window and include the following:

General steps

Contact steps

Call Contact steps

Media steps

User steps

Prompt steps

The following tables list the exact steps in each category available in the Cisco Unity Express Editor.


Note The term step is used here to denote the individual actions you are building into a script. No sequence is implied in the steps listed in the following tables; instead, they are listed alphabetically. You can use these steps in almost any sequence you like in a script. (Obviously steps such as Start and End will occupy a certain logical position within the script, but steps such as Menu and Redirect can be used anywhere.) When you build the content of the script in the design pane of the Editor is when you apply your preferred sequencing to the steps.


Table 2 lists the steps in the general category.

Table 2 General Steps

Step Name
Description

Annotate

Comments in the script (similar to the C language /* */ comments).

Business Hours

Configures the business hours schedule for each of the seven days in a week.

Call Subflow

Invokes a subflow (one script passing control to another script).

Step Name

Description

Day of Week

Used to branch, depending on the current day of the week.

Decrement

Decreases the value of an integer variable by one.

Delay

Pauses the script execution for a specified number of seconds.

End

Ends the script and frees all the allocated resources.

Goto

Causes script execution to branch to the specified Label step.

Holiday

Specifies a list of dates to be treated by the system as holidays. A maximum number of 26 holidays can be entered into the list.

If

A branch based on the evaluation of a Boolean expression.

Increment

Increases the value of an integer variable by one.

Label

Inserts a label into a script as a target for the Goto step.

On Exception Clear

Removes an exception set by the previous On Exception Goto step.

On Exception Goto

Catches an exception or problem during script execution and handles it.

Set

Changes the value of a variable (assignment operator).

Start

Start of the script.

Switch

Causes script execution to branch to one of a number of cases.

Time of Day

Used to branch, depending on the current time of day.


Table 3 lists the steps in the contact and call contact categories.

Table 3 Contact and Call Contact Steps

Step Name
Description

Contact

Accept

Answers a call.

Get Contact Info

Extracts information from a contact and stores it in script variables.

Set Contact Info

Modifies the context information associated with a contact.

Terminate

Disconnects a call.

Call Contact

Call Redirect

Redirects a call to another extension.

Get Call Contact Info

Accesses call-specific information and stores it in script variables.


Table 4 lists the steps for the media category.

Table 4 Media Steps

Step Name
Description

Explicit Confirmation

Confirms an explicit response to a prompt—DTMF 1 for yes and 2 for no.

Get Digit String

Collects DTMF digits in response to a prompt.

Implicit Confirmation

Confirms an action without asking a question.

Menu

Provides a menu from which the caller can choose from a series of options.

Name To User

Collects DTMF and tries to match it to a name.

Play Prompt

Plays a specified prompt to the caller.


Table 5 lists the steps for the user and prompt categories.

Table 5 User and Prompt Steps

Step Name
Description

User

Get User Info

Accesses user attributes.

Prompt

Create Conditional Prompt

Creates one of two prompts based on the evaluation of a Boolean expression.

Create Container Prompt

Combines multiple prompts into a larger prompt.

Create Generated Prompt

Creates prompt phrases from intermediate variables—for example, number, currency, and so on.


The sample scrpt the follows shows the logic of one of the sample AA scripts you can download from Cisco.com. It illustrates how the steps are sequenced in a script to determine the flow of the

AA menu for a caller. This simple script illustrates how to build a basic office hours-based AA menu. During office hours, a menu (dial-by-number or transfer to the operator) is given to the caller. After hours a recorded prompt is given, telling the caller when the office is open.

This sample is not meant to be an example of a complete AA script. It is merely a script fragment illustrating the use of the time-of-day and day-of-week steps to build a branch into a script based on office hours. In a complete AA script, the office hours menu choices, the after-hours caller options, and the error-handling script instructions are much more comprehensive.

The following is a sample AA script:

Start
/* S1_Main-OfficeHours.aef */
/* Basic Day-Of-Week and ... */
Accept (contact: --Triggering
/* Office Hours check */
Day of Week
       Weekdays
               Time of Day
                      Work hours
                              Goto Main Menu
                      After hours
                              Goto After-hours
       Weekend
               Goto After-hours
/* Main menu: Press 1 if ... */
Main Menu:
Menu (contact: --Triggering Contact--, prompt: S1_MainMenu)
       Dial by Number
               Call Subflow -- S1_DialbyExtension.aef
               End
       Operator
               Call Subflow -- S1_XfertoOper.aef
               End
       Timeout
               Play Prompt (contact: --Triggering Contact--, prompt: S1
                           _SystemProblems)
               Terminate (contact: --Triggering Contact--)
               End
       Unsuccessful
               Play Prompt (contact: --Triggering Contact--, prompt: S1
                           _SystemProblems)
               Terminate (contact: --Triggering Contact--)
               End
/* Present after hours msg ... */
After-hours:
Play Prompt (contact: --Triggering Contact--, prompt: S1_AfterHours)
Terminate (contact: --Triggering Contact--)
End

Figure 6 shows the same script open in the Cisco Unity Express Editor, where the graphical representation of the steps can be seen.

Figure 6 Sample AA Script

Using Sample Scripts

The Cisco Unity Express Editor and scripting design offers maximum flexibility to customize the system to your individual business needs. However, it can be somewhat daunting to write your first script, especially if you are unfamiliar with programming.

For this reason, a number of sample scripts, or script fragments, have been developed to help you cut and paste to build an AA script from known elements, rather than requiring you to develop it from scratch. These sample scripts are posted on Cisco.com and can be accessed from the Software Center, where Cisco Unity Express software is downloaded.

The contents of these sample scripts can change over time, but in general they offer script fragments or examples of the following functions:

A dial-by-number component

A dial-by-name component

Call transfer to an operator or a given extension

An office hours menu using time-of-day and day-of-week branching

A loop that repeats a menu three times, in case no input is received from the caller

An office directory (a menu that has a branch for each individual in the office)

A branch that gives the caller the office location and directions

A branch that gives the caller the option of leaving a message (not for an individual employee, but for the business in general)

The EAG

Using the EAG in a Custom Script

As explained in the("Emergency Alternate Greeting" section, the EAG is a system function that is executed automatically by the system AA script. It is not automatic, however, in your custom AA scripts. Any script can call on this system function, but a Call Subflow step to the EAG script must be inserted into your custom script at the location in the sequence where you want to call out the EAG.

The EAG is implemented on Cisco Unity Express as a system script called checkaltgreet.aef. To activate the EAG feature within your script, insert a Call Subflow checkaltgreet.aef step into your script at the appropriate spot, as shown in Figure 7.

Figure 7 Including the EAG in a Custom Script

The general EAG feature operation has not changed; it is still activated by the existence or absence of the actual greeting. It is stored in a .wav file called AltGreeting.wav, just as it operates with the system AA. But now you have incorporated the EAG feature into your own custom script.

Validating a Script

Before a script is uploaded to Cisco Unity Express for execution, be sure to validate it in the Editor. This function is found on the Tools menu on the Editor's Windows toolbar.

Validating a script is a necessary but insufficient step to ensure correct operation of your custom AA script. It is a necessary step because any syntax or flow errors caught by the validation step will prevent the script from executing properly. All validation errors must therefore be fixed before the script is uploaded to Cisco Unity Express. However, it is an insufficient step, because the Cisco Unity Express Editor cannot check runtime error conditions that can occur when the script executes. It also cannot check for missing prompts (missing .wav files) referenced by the script, because the Editor has no access to the script `s runtime environment. These types of errors can be found only during script execution.

Viewing Scripts and Prompts in the System

You can use the Cisco Unity Express GUI or CLI to manage AA scripts and prompts. Scripts cannot be edited on the Cisco Unity Express system; they are edited offline on a PC with the Cisco Unity Express Editor. You can manage the AA scripts on the Cisco Unity Express system, including operations such as

Listing the scripts present in the system

Deleting a script

Uploading or downloading a script

Associating a script with a phone (pilot) number

Setting a script parameter values

Figure 8 shows an example of a Cisco Unity Express system with a number of scripts installed. You can access this window by selecting Voice Mail > Scripts from the GUI menu.

Figure 8 Listing the AA Scripts in a Cisco Unity Express System

Scripts that have a checkbox to the left and grayed out are system scripts. The others are custom scripts. A script can call another script (using the Call Subflow step), so not each of these scripts is an AA. Some of the scripts are associated with a phone (pilot) number and therefore constitute an AA. The other scripts are merely subflows (subroutines) called by the main AA script(s) to make the logic easier to understand and to allow you to craft reusable functions, such as the EAG, which you can use in many AA scripts. This relationship between the scripts cannot be seen in Figure 8. You must open a script in the Cisco Unity Express Editor to see which other scripts (subflows) are called from the script you are viewing.

You can see a list of prompts present on a Cisco Unity Express system by selecting Voice Mail > Prompts from the GUI menu, as shown in Figure 9.

Figure 9 AA Prompts in a Cisco Unity Express System

The scripts and prompts present on the system can also be seen from the CLI of the Cisco Unity Express system. The following example illustrates the CLI command and output to show all the scripts available on the system. Each script is shown (the name of the script file is highlighted), followed by its parameters. The CLI does not indicate whether a script is a system or custom script.

Cue> show ccn application
Name:                                   autoattendant
Description:                            autoattendant
Script:                                 aa.aef
ID number:                              2
Enabled:                                yes
Maximum number of sessions:             8
MaxRetry:                               3
operExtn:                               0
welcomePrompt:                          AAWelcome.wav

Name:                                   promptmgmt
Description:                            promptmgmt
Script:                                 promptmgmt.aef
ID number:                              3
Enabled:                                yes
Maximum number of sessions:             1

Name:                                   main-dow-tod
Description:                            main-dow-tod
Script:                                 s1_main-dow-tod.aef
ID number:                              4
Enabled:                                yes
Maximum number of sessions:             8
MainOperExt:                            6001

Name:                                   s2-office-dir
Description:                            s2-office-dir
Script:                                 s2_main-office-dir.aef
ID number:                              5
Enabled:                                yes
Maximum number of sessions:             8
Mary:                                   6001
Mike:                                   6012
Bruce:                                  6020
S2_OfficeDir:                           S2_OfficeDir.wav
S2_FaxInfo:                             S2_FaxInfo.wav
Candice:                                6007
S2_LocationInfo:                        S2_LocationInfo.wav
John:                                   6005
Janet:                                  6008
S2_MainMenu:                            S2_MainMenu.wav

Name:                                   s4-dial-by-name
Description:                            s4-dial-by-name
Script:                                 s4_main-dialbyname.aef
ID number:                              7
Enabled:                                yes
Maximum number of sessions:             8

Name:                                   s5-emerg-alt-grt
Description:                            s5-emerg-alt-grt
Script:                                 s5_main-emergaltgrt.aef
ID number:                              6
Enabled:                                yes
Maximum number of sessions:             8

Uploading and Downloading Scripts

After a script is edited and validated on an offline PC, it is uploaded to the Cisco Unity Express system to be associated with a pilot phone number and, thus, to run as an active AA. Also, if you need to change a script, download it from Cisco Unity Express to your PC, where you can view its content, edit it, and revalidate the new script. Upload the new version to Cisco Unity Express to make the change active.

You can upload a script by clicking the Upload button on the Voice Mail > Scripts GUI window. The resulting window is shown in Figure 10. There is a Download button on the same Voice Mail > Scripts window to start a download operation.

Figure 10 Uploading an AA Script to the Cisco Unity Express System


Note The Cisco Unity Express system scripts cannot be uploaded, downloaded, viewed, or deleted. Custom scripts can be fully controlled.


Executing a Script

The AA in Cisco Unity Express runs as a Workflow script. It interacts with the Workflow engine and various subsystems to perform the operations specified in the AA script. A Workflow is a Cisco-developed scripting format that can be executed by an engine. This Workflow format is used in a variety of Cisco products. Cisco Unity Express is also used to run the system GMS and voice mail components. Understanding the script execution environment is necessary only for troubleshooting purposes.

When a call is placed to the AA pilot number, the Workflow engine is notified of the incoming call by the underlying call control subsystem. Based on the configuration, the engine recognizes that this particular phone number is associated with the AA (as opposed to the GMS or voice mail scripts), so it starts (triggers) the appropriate AA Workflow script and starts executing it. The engine starts from the first step in the script. Based on the output of each individual step, the execution either moves on to the next step or branches to some other location in the script to continue execution there.

For the execution of each step, the engine communicates with either a library or an underlying subsystem to perform the actual operation. For example, the engine communicates with the media termination library to play a specific prompt to the caller, and the prompt is streamed out by the media termination library. Similarly, the engine communicates with the call control subsystem to redirect the call. Based on the results reported by the subsystem, it carries on with the execution of the next step in the script.

System Limits on Scripts and Prompts

Many more scripts and prompts can exist on the Cisco Unity Express system than are actively executed as part of the AA. As explained in the"Viewing Scripts and Prompts in the System" section, not every script is an AA. An AA is a phone number associated with a script that is the main entry point for that AA. This script can call on other scripts with the Call Subflow step to handle sections of the AA menus.

The Cisco Unity Express hardware platform has limited storage space for scripts and prompts. Table 6 lists the system limits on custom scripts and prompts for Cisco Unity Express 1.1, 2.0, and 2.1 software. Consult Cisco.com for changes in these limits that might become effective in later software releases.

Table 6 System Limits for Scripts and Prompts

Hardware Platform
Maximum Number of Stored Scripts
Maximum Number of Stored Prompts

NM-CUE

8

50

AIM-CUE

4

25


The limits shown in Table 5 do not apply to or include system scripts or prompts. There is no limit on the size of an individual script, the number of steps per script, or the number of nesting levels within a script. Script complexity and readability become limiting factors before the software limits these attributes.

A prompt can have a maximum file size of 1 Mb, which represents about 2 minutes of recording time.

The Cisco Unity Express Greeting Management System

Cisco Unity Express is a low-end entry-level system that does not assume that you have sophisticated offline recording facilities or a studio available to create your AA prompts. You can certainly use such facilities if you have them and upload the resulting professionally created prompts to the system. Cisco Unity Express also offers a built-in facility to record and manage prompts via any telephone that can call into the system (a local IP phone or PSTN phone). This feature is called the GMS.

Like the AA and voice mail pilot numbers, the GMS also has a pilot number assigned. When calls arrive at the GMS pilot number, the caller is put into an interactive session where you can listen to existing prompts and record new ones.

Calling into the GMS requires an extension and personal identification number (PIN) for security authorization. The extension/PIN combination is the same one used for your mailbox access authorization. Any user defined on the Cisco Unity Express system with a mailbox can, therefore, theoretically access the GMS. However, actual access is restricted to users who also have administrative privileges on the Cisco Unity Express system (those who belong to the administrators group). This is much more likely to be just one or two of the users defined on the system.

The GMS itself runs a Workflow script within the Cisco Unity Express system and can, therefore, be seen when a listing of all the system scripts is given (the script is called promptmgmt.aef).

Prompts on the Cisco Unity Express system must be a specific .wav file format to be played correctly. You can record prompts with the GMS or offline with a PC or studio sound equipment and then upload them to Cisco Unity Express. You can download prompts already resident on Cisco Unity Express to your PC as .wav files. Uploading and downloading prompts works just like uploading and downloading scripts, as described in the "Uploading and Downloading Scripts" section.

Key greeting management considerations are addressed in the following sections:

Recording or Deleting the EAG

Recording and Listening to Custom Prompts

Prompt File Format

Recording or Deleting the EAG

You can record the EAG via the GMS. Calling into the GMS guides the administrator through the process of recording or deleting the alternate greeting:

The script prompts the caller (administrator) to enter his or her extension and PIN to determine if the caller has administrative rights on the system.


Step 1 After the caller is authenticated, the script checks to see if an EAG exists on the system. If it does not, the script prompts the administrator to record one.

Step 2 As soon as the EAG is recorded and saved, it becomes active, and new callers to the AA start hearing the EAG before the regular welcome prompt.

Step 3 If the EAG already exists on the system, the script prompts the administrator to delete the existing greeting. If the administrator deletes it, the EAG is deleted from the system, and new callers into the AA hear only the regular welcome greeting as their first prompt.


The system has no default EAG. If the EAG exists, it must have the filename AltGreeting.wav. If you record the EAG via the GMS, it automatically has this filename. If you record it on an offline system and upload it to the Cisco Unity Express system, you must ensure manually that the .wav file has this name so that it will be recognized by the Cisco Unity Express system as the EAG.

The following partial menu example illustrates the GMS conversation for managing the EAG:

1. Please enter your Extension

2. Please enter your PIN Number

3. Welcome to the Greeting Management System

4. Press 1 to administer Automated Attendant Alternate Greeting

a. If (Alternate Greeting exists)

The Alternate Greeting is currently active

Press 1 to hear the Alternate Greeting

Press 2 to re-record the Alternate Greeting

Record the Alternate Greeting at the beep. To finish recording, press the # key

Press 1 to save and activate the Alternate Greeting

Press 2 to hear the Alternate Greeting

Press 3 to re-record the Alternate Greeting

Press 3 to deactivate the Alternate Greeting. Deactivating the Alternate

Greeting will delete it from the system

b. Else

Press 1 to record the Alternate Greeting

Record the Alternate Greeting at the beep. To finish recording, press the # key

Press 1 to save and activate the Alternate Greeting

Press 2 to hear the Alternate Greeting

Press 3 to re-record the Alternate Greeting

5. Press 2 to administer custom prompts

Recording and Listening to Custom Prompts

Similar to the EAG, all other prompts used by the AA scripts can be managed via the GMS. From the GMS, an administrator can listen to, record, and delete any prompt used by the system. After a prompt is recorded, it is given a filename in the format UserPrompt_mmddyyyyhhmmss.wav, where mmddyyyyhhmmss shows the system date and time that the prompt was recorded. The file shows up in the prompt list when viewed via the GUI or CLI.

To assign more meaningful names to the prompt files, you can download the prompt to a PC, change the filename, and then upload the file back to Cisco Unity Express.


Note If you change the name of a prompt file while an AA script already refers to the prompt filename, be sure to change the script parameter (the one referring to the prompt file) to the new prompt filename before you delete the old prompt file. Otherwise, you will introduce a script runtime error.


The following example menu the GMS conversation for managing the prompts:

1. Please enter your Extension

2. Please enter your PIN Number

3. Welcome to the Prompt Management System

4. Press 1 to administer Automated Attendant Alternate Greeting

...

5. Press 2 to administer custom prompts

a. Press 1 to record a new prompt

If limit reached

Sorry you have already recorded <<x>> prompts

Else

b. Record a new prompt at the beep. To finish recording, press the # key.

...

You have recorded the new prompt as follows

Play recorded prompt

Press 2 to save the prompt, Press 3 to delete it

c. Press 2 to play previously recorded custom prompts

There are <<x>> recorded prompts

— In a loop {

— Prompt <<i>

— Play prompt <<i>>

—To delete it, press 3, to skip it, press #

—If 3 pressed, delete the prompt

}

Prompt File Format

All prompts on the Cisco Unity Express system must meet the following .wav file format requirements to be able to play correctly:

G.711 u-law

8 kHz

8-bit

Mono

Prompts recorded via the GMS are automatically of this type. Prompts recorded offline and uploaded to the Cisco Unity Express system must be manually checked to ensure they are of this type, or they will not play properly. No system format checking occurs when prompts are uploaded into the system. If they are of the wrong format, they simply do not play correctly.

Setting Up a Cisco Unity Express Automated Attendant

In the preceding sections, you learned the reasons to use an AA; general features of the Cisco Unity Express AA, such as dial-by-number; and how to customize an AA script.

This section walks you through building the actual AA. Just having written the script is not enough. It is the biggest step, but now the script, the prompts, and the AA pilot number must be linked to form a working AA application on your Cisco Unity Express system. This is not a difficult task, but it takes a few steps to accomplish:


Step 1 Determining Whether the System AA Is Sufficient

Step 2 Preparing a Custom Script

Step 3 Uploading the Script

Step 4 Recording the Prompts

Step 5 Selecting a Script

Step 6 Setting the Script Parameters

Step 7 Assigning a Pilot Number


Determining Whether the System AA Is Sufficient

The first question to consider is whether you must write a custom AA at all. Have a good look at the Cisco Unity Express system AA, shown earlier in the menu flow diagram shown in the "Cisco Unity Express System AA" section. Even though it is simple, it might be sufficient for your AA needs. If so, you only need to associate an AA pilot number with this script, customize the greeting, and insert your business hours and holidays, and you are done.

If the Cisco Unity Express system AA is insufficient, continue using the sample AA functions illustrated in the various sample scripts in this application note to put together a script that is tailor-made for your business.

Preparing a Custom Script

Follow these steps to prepare a custom script:


Step 1 Ensure that the Cisco Unity Express Editor is installed on your PC. If it is not, download it from Cisco.com and install it.

Step 2 Download the sample AA scripts from Cisco.com, and load them onto your PC.

Step 3 Draw a rough diagram of the flow of menus and prompts you want for your AA.

Step 4 Copy the sample script that is closest to your needs to a new file, and open it using the Cisco Unity Express Editor.

Step 5 Adjust (edit) the script to match your drawing from Step 3 by copying and pasting steps from other sample scripts, rearranging the existing steps, or dragging new steps from the Editor's Palette Pane.

Step 6 Ensure that all the variables you defined and that you want to control via the Cisco Unity Express GUI while the script is running are tagged with the parameter attribute. Also ensure that all the variables you want to control are defined in the top-level script and not in any subflows. Subflow parameters are inaccessible via the Cisco Unity Express GUI to change their values.

Step 7 Validate the script, resolve all warning and errors until it validates clean, and manually ensure that the steps will execute the call flow you want


Uploading the Script

There are two places from where you can initiate a script upload:

If you want to upload the script before you enter the AA Setup Wizard, select the Voice Mail > Scripts menu in the Cisco Unity Express GUI, and click the Upload button. Follow the dialog box instructions to upload the script to the Cisco Unity Express system.

The second place where the upload function appears is in the AA Setup Wizard itself. To navigate to the wizard, select the Voice Mail > Auto Attendant menu, and then click the Add button. This step is described further in the "Selecting a Script" section.

Recording the Prompts

Dial into the Cisco Unity Express GMS, and record all the prompts needed by the script(s), or record them offline. If they were recorded via the GMS, download the prompts to your PC, rename them to have filenames that make it easy for you to recognize the content of each prompt, upload the new files to the Cisco Unity Express system, and delete the old prompts.

If you are using prompts recorded offline, upload the prompt files to the Cisco Unity Express system. Uploading of prompt files can be initiated from the Upload button on the Voice Mail > Prompts GUI menu.

Selecting a Script

Enter the AA Setup Wizard by selecting the Voice Mail > Auto Attendant GUI menu and then clicking the Add button. The window that results from this, the first window of the AA Setup Wizard, is shown in Figure 11.

In the drop-down box corresponding to the Select Automated Attendant Script, choose the name of the script you previously uploaded. If you have not yet done so, you can upload it now by clicking the Upload button.

Figure 11 Selecting the AA Script

Setting the Script Parameters

Click Next and proceed to Step 2 of the AA Setup Wizard. In this window, shown in Figure 12, all variables tagged as parameters during the script preparation show up, and you can set their values. The prompt variables indicate whether the system has found the corresponding .wav files on the storage medium. If it has not, you can upload them now, or choose a different filename from the drop-down box next to each prompt variable.

Figure 12 Setting the Script Parameters

Figure 12 shows a sample window to set script parameters, but this window is dynamically formatted for each script based on the variable parameters present in that script. This window, therefore, looks different for every script you view.

Assigning a Pilot Number

Click Next and proceed to Step 3 of the AA Setup Wizard, where the call handling parameters are set up. Here you associate the AA pilot number with the script you chose in Step 1 of the AA Setup Wizard, as shown in Figure 13.

Figure 13 Setting the AA Pilot Number

As soon as you have completed this step, click Finish. You now have a working Cisco Unity Express AA application on your system.

Tcl-Based Automated Attendant

As described at the beginning of this application note, Cisco CME offers two options for an AA application:

The integrated AA application, which is part of Cisco Unity Express, as described in this application note

Leveraging the router Tcl scripting capabilities to provide an AA

Both schemes are adequate to provide AA functionality for your Cisco CME. However, when you are deciding which of these two mechanisms to use for your business, keep in mind several considerations, as listed in Table 7.

Table 7 Considerations When Choosing a Cisco CME AA

Consideration
Tcl-Based AA
Cisco Unity Express AA

Where the scripts execute

Scripts run on the router processor and, therefore, have a small impact on router performance.

Scripts execute on the dedicated Cisco Unity Express module. Therefore, they use the dedicated module CPU and do not affect router performance.

Memory

Scripts are loaded into router DRAM, so memory is allocated regardless of whether the script is being used.

Scripts are loaded into the dedicated Cisco Unity Express module storage and, therefore, do not use any router memory.

Scripting expertise

Requires a working knowledge of Tcl programming and uses a text-based editor.

Uses an easy-to-use web-based graphical editor. Knowledge of logic and call processing steps is still helpful.

Error checking

The editor has no script validation or error checking.

The Cisco Unity Express Editor has a validation function.

Script management

Requires an offline editor. Scripts are installed by copying the script to router Flash via Trivial File Transfer Protocol (TFTP).

Requires an offline editor. Scripts are installed by using a GUI Upload function that browses your PC file system.

Prompt management

Prompts are recorded offline as .au files and are copied to router Flash using TFTP.

Prompts can be recorded online using the Cisco Unity Express GMS (from any phone). Prompts also can be recorded offline as .wav files and Uploaded via the GUI.

Hardware required

Router-based capability that does not require any extra hardware in addition to your Cisco CME router, although it can require an increase in router Flash memory size.

Cisco Unity Express AA runs on the Cisco Unity Express network module (NM) or advanced integration module (AIM) hardware blade that you slide into a slot on your Cisco CME router chassis.

Customization

Recommended to be customized only by knowledgeable Tcl developers.

Can be customized using the Cisco Unity Express Editor and GUI.

Sample scripts

No sample scripts are available to use as a starting point.

Sample scripts are posted on Cisco.com. You can use them as is or copy from them to customize your own scripts.

Script activation

You activate a script by attaching it to a router dial peer using the router CLI.

You activate a script by associating it with a pilot number using the Cisco Unity Express GUI.

Consideration

Tcl-Based AA

Cisco Unity Express AA

TFTP/FTP

Scripts are copied to the router from a TFTP server.

Cisco Unity Express script upload requires only IP connectivity between your PC browser and the Cisco CME router.

Router knowledge and access

Scripts reside in router Flash. Therefore, they require router login access and some knowledge of router CLI commands (for example, the Cisco IOS CLI commands used to get, view, or show a file in router Flash).

Requires only IP connectivity—an IP address or domain name service (DNS) host name—an Internet Explorer (IE) browser window, and a Cisco Unity Express GUI login. No router knowledge is required.


In summary, the Cisco CME Tcl AA is an option if you are comfortable with router CLI and the Tcl language or if you have easy access to someone with these skills. The Cisco Unity Express AA is much easier for the general person to use, requires no router internal knowledge, and is much easier to customize. However, you must add extra hardware to your Cisco CME router system.


Note Do not use Tcl-based AA and Cisco Unity Express at the same time on the same Cisco CME system. If Cisco Unity Express is present, use its AA facilities. Use the Tcl-based AA features only when a pure router-based solution is required and Cisco Unity Express is not present.


The following sections describe Tcl-based AA in more detail:

Tcl Scripts

Recording the Prompts

Developing Tcl Scripts

Implementing Tcl Scripts

Setting Up the Cisco CME Tcl AA

Tcl Developer Support

Tcl Scripts

Tcl scripts reside in router Flash. When activated, the Tcl script responds according to the predetermined steps included in the script. Tcl is a general call processing scripting technology that is not particular to an AA. Building an AA is only one of many different types of call processing functions that can be carried out with Tcl.

The Tcl script that follows shows an extract from the Cisco CME 3.0 Tcl AA script:

# Script Version: 2.0.1.0
# Copyright  2001 by cisco Systems, Inc.
# All rights reserved.
#------------------------------------------------------------------
#
# Description:
#       This is a Tcl IVR script for the IOS Telephony Service and
#       Call Manager (CM) offload scenario. The IVR script plays a
#       welcome prompt to the user and prompts the user to enter a
#       destination number when the user dials the auto-attendant number
#       (aa-pilot configured in the CLI). The script collects the digits that
#       the user has entered and hands the call to the enhanced session
#       application (named Default).  The session application
#       returns once there is a disconnect (if the call is established)
#       or if a call setup problem occurs.
#       The operator support is also included. If the user does not dial
#       any number or enters "0" the user will be transferred to an operator
#       (if operator number is configured in the CLI). If the user enters
#       an invalid number, the user will be prompted again to re-enter
#       the number for up to 3 times before disconnecting the call.
#-------------------------------------------------------------------
proc init { } {
    global param1
    global selectCnt
    global callInfo
    global legConnected

    set param1(interruptPrompt) true
    set param1(abortKey) *
    set param1(terminationKey) #

    set selectCnt 0
    set legConnected false
}

proc init_ConfigVars { } {
    global destination
    global aaPilot
    global oprtr

# aa-pilot is the IVR number configured on the gateway to be used by the customer
# operator is the operator number for assisted calling
    if [infotag get cfg_avpair_exists aa-pilot] {
        set aaPilot [string trim [infotag get cfg_avpair aa-pilot]]
    } else {
        set aaPilot "NONE"
    }
    if [infotag get cfg_avpair_exists operator] {
        set oprtr [string trim [infotag get cfg_avpair operator]]
    } else {
        set oprtr "NONE"
    }
}
...
proc act_Setup { } {
...
   if { ($dnis == "") || ($dnis == $aaPilot) } {
...
      media play leg_incoming _welcome.au %s1000 _enter_dest.au
      } else {
         set fcnt 6
        leg setupack leg_incoming
         handoff callappl leg_incoming default "DESTINATION=$dnis"
         fsm setstate HANDOFF
    }

Note For the full script listing, download the script file from the Software Center for Cisco CME on Cisco.com.


The preceding script presents a simple dial-by-number AA that plays a welcome greeting and then allows the caller to enter the digits of the extension to reach. It also has an operator transfer function if the caller enters 0 or if an error condition occurs. The flow of the Cisco CME Tcl AA script (partly shown in the preceding example) is as follows:


Step 1 Set up the global parameters.

Step 2 Check whether the AA pilot number and operator number have been configured.

Step 3 Check whether caller ID and DNIS information is available for the call.

Step 4 Play the welcome prompt (en_welcome.au).

Step 5 Prompt (en_enter_dest.au) the caller to enter the desired extension.

Step 6 If the caller does not dial any number or dials 0, transfer the call to the operator.

Step 7 If the caller dials an invalid extension number, prompt (en_reenter_dest.au) the caller to re-enter the extension number (this loop is repeated up to three times).

Step 8 If the caller dials a valid extension number, connect the call to that extension.

Step 9 If the caller dials a valid extension number, but that number is busy or unreachable, play the appropriate prompt (en_dest_busy.au or en_dest_unreachable.au), and ask the caller to re-enter an extension number.


The Cisco CME Tcl script refers to several prompts (two of which are shown in the example), including the following:

en_welcome.au—Welcome greeting

en_dest_busy.au—Played if the chosen extension is busy

en_reenter_dest.au—Played to ask the caller to re-enter the destination if an invalid destination was detected

en_disconnect.au—Informs the user that the call will be disconnected under an error condition

en_dest_unreachable.au—Played to inform the user that the chosen extension is unreachable

Recording the Prompts

The prompts referenced by the script must be recorded and made available for use by the script. Prompts are recorded offline with computer-based recording tools and then are uploaded to the Cisco CME router. The router's Flash stores the prompts for a Tcl script with the script. This might require additional Flash in the router if many Tcl scripts and prompts are needed.

Prompts used by the Tcl script are audio files stored as .wav or .au files in router Flash. The Cisco Unity Express GMS cannot be used to record these prompt files. The following show output example lists the Tcl AA files, including the prompts and the script itself, installed into a router Flash.

Router> show flash
-#- --length-- -----date/time------ path
...
36           0 Oct 20 2003 17:33:18 aa
37       42484 Oct 20 2003 17:47:08 aa/en_dest_busy.au
38       26376 Oct 20 2003 17:47:10 aa/en_dest_unreachable.au
39       14352 Oct 20 2003 17:47:10 aa/en_disconnect.au
40       19512 Oct 20 2003 17:47:10 aa/en_enter_dest.au
41       17167 Oct 20 2003 17:47:10 aa/en_reenter_dest.au
42       17486 Oct 20 2003 17:47:10 aa/en_welcome.au
43        6627 Oct 20 2003 17:47:10 aa/its-CISCO.2.0.1.0.Tcl
  < Readme file is not required

Developing Tcl Scripts

Tcl scripting is a mature technology that is widely used to provide automated response and other types of call processing applications. Carefully plan the script logic by mapping out the steps required for the call flow, and then translate that into script steps. Depending on the features needed in the AA, the scripts can be lengthy, and script development can be a long process.

Tcl is very powerful and can perform many functions, but at the same time, it requires skill and programming experience to develop well structured and fully functional scripts. Take care with AA menus and call flows, because the AA is a caller's first introduction to a business. An ill-structured AA can frustrate potential customers just as easily as a well-structured AA can improve customer service and increase satisfaction.

Implementing Tcl Scripts

The Tcl scripts are composed external to the router. The number of features used in the scripts adds to the development and maintenance complexity.

After the script is composed and debugged, it is uploaded to router Flash using TFTP or FTP. The copy commands in Cisco IOS allow you to transfer Tcl scripts from a TFTP or FTP server to router Flash memory. The Cisco CME Tcl AA script file its-CISCO.2.0.1.0.Tcl, present in router Flash, was shown in the example presented in the "Tcl Scripts" section.

If changes or new features are required, the Tcl scripts must be modified, recomposed, and then uploaded again to router Flash memory to replace the outdated scripts.

After the scripts and prompts have been loaded into router Flash memory, you can use a phone to dial the AA, step through the preprogrammed features, and verify that the scripts and prompts have been created correctly.

Setting Up the Cisco CME Tcl AA

A Tcl script is activated by attaching it to a dial peer. The Cisco CME Tcl AA is supported only for incoming PSTN calls, so it must be attached to the plain old telephone service (POTS) dial peer handling your PSTN calls. (It cannot be attached to an ephone-dn, which represents an IP phone.)

The following partial show running-config output presents the Cisco IOS router commands necessary to configure the Tcl application:

call application voice cmeaa flash:/aa/its-CISCO.2.0.1.0.Tcl
call application voice cmeaa operator 3001
call application voice cmeaa aa-pilot 6801
call application voice cmeaa language 1 en
call application voice cmeaa set-location en 0 flash:/aa/

The following partial show running-config output presents a PSTN (POTS) dial peer with the Tcl AA application attached:

dial-peer voice 2 pots
 application cmeaa
 incoming called-number 6801
 direct-inward-dial
 port 2/0:23

Tcl Developer Support

Tcl enjoys wide industry support. If you want to use Tcl scripts, you can either develop your own scripts or obtain help from seasoned Tcl developers to tailor scripts for your requirements. Cisco has a developer support group that designs and implements customized Tcl scripts. You can also select Tcl-independent script developers to develop your scripts. You can find more information about Tcl developer support on Cisco.com.