Cisco Unity Express 1.1.2/2.0 Script Editor Guide
Constructing a Simple Script
Downloads: This chapterpdf (PDF - 260.0KB) The complete bookPDF (PDF - 2.27MB) | Feedback

Constructing a Simple Script

Table Of Contents

Constructing a Simple Script

Creating an Alternate Greeting Script

Create the Scripts

Define Variables

Create the Prompt Files

Creating an Office Hours Menu Script

Create the Script Files

Create the Prompt Files

Main Script: S1_Main-OfficeHours.aef

Dial by Extension Subflow: S1_DialbyExtension.aef

Transfer to the Receptionist Subflow: S1_XfertoOper.aef

Creating an Office Directory Script

Create the Script File

Define Variables

Create the Prompt Files


Constructing a Simple Script


This chapter describes simple techniques you can use when designing custom auto attendant scripts with the Cisco Unity Express Script Editor. Sample scripts are included to illustrate the techniques. Each script contains the following activities or steps:

Start the script.

Accept a call.

Execute one or more subprocesses. Subprocesss can be nested within other subprocesses.

End the script.


Note The sample scripts in this chapter illustrate how to configure scripts for certain components of a complete auto attendant application. Use these scripts in conjunction with other scripts to configure fully your auto attendant application.


This chapter includes the following sections:

Creating an Alternate Greeting Script

Creating an Office Hours Menu Script

Creating an Office Directory Script

Creating an Alternate Greeting Script

Use these procedures to create a script that checks the system for an Emergency Alternate Greeting and plays one if it exists. The caller does not have to perform any actions that initiate this script. The system administrator creates an alternate greeting file, which is played when a caller reaches the auto attendant.

Use the following script files to create this script:

S5_Main-EmergAltGrt.aef: A user-defined script file. Be sure to use this name when referring to the entire script.

checkAltGreet.aef: system script file that searches for an alternate greeting script file.

Use the following prompt files:

S5_MainMenu.wav: A user-defined prompt file that contains an alternate main menu message that t you created prior to defining the S5_Main-EmergAltGrt.aef script. This main menu should include the alternate greeting option.

AltGreeting.wav: system prompt file that contains the alternate greeting message that comes with the Cisco Unity Express system.

Create the Scripts

Create the S5_Main-EmergAltGrt.aef script using the following steps, variables, and prompts. You must create the prompt .wav file before initiating this script.

Start
/* S5_Main-EmergAltGrt.aef */
Accept (contact: --Triggering Contact--)
Call Subflow -- checkAltGreet.aef
/* Main menu - replace this ... */
Main Menu:
Play Prompt (contact: --Triggering Contact--, prompt: S5_MainMenu)
Terminate (contact: --Triggering Contact--)
End

This script performs the following steps:

1. Starts the script.

2. Accepts an incoming call.

3. Checks if an alternate greeting file is recorded and installed in the Cisco Unity Express system.

4. Begins a subprocess to play the main menu for the caller. The Play Prompt step retrieves and plays the alternate main menu script (S5_MainMenu). Then the subprocess ends.

5. Ends the script.

Define Variables

Variables for this script are shown in the table below.

Name
Type
Value

S5_MainMenu

com.cisco.prompt.Playable

S5_MainMenu.wav


Create the Prompt Files

Prompt Filename
Audio Content

S5_MainMenu.wav

Thank you for calling Widget Systems. Please insert your main menu here. Goodbye.


Creating an Office Hours Menu Script

This office hours menu script provides call handling for calls that arrive after office hours. If a call arrives after hours, the office hours of the company are announced and, for the purposes of this simple example, the caller is requested to call back later.

The office hours menu script includes the following auto attendant functions:

Office hours decisions (Day of Week and Time of Day branching)

Dial by Extension

Transfer a call to the receptionist

Build a loop that repeats 3 times and then terminates in an error condition (S1_DialbyExtension.aef script)

The Dial-by-Extension and Transfer functions are isolated in individual scripts called by the main script, so that those elements can be reused in other scripts.

Create the Script Files

You must create the following script files:

Main Script: S1_Main-OfficeHours.aef

Dial by Extension Subflow: S1_DialbyExtension.aef

Transfer to the Receptionist Subflow: S1_XfertoOper.aef

Create the Prompt Files

The following prompt files are used by the scripts:

S1_AfterHours

S1_EnterExt

S1_ExtBusy

S1_Goodbye

S1_InvalidExt

S1_MainMenu

S1_OperBusy

S1_OperXfer

S1_SystemProblems

Main Script: S1_Main-OfficeHours.aef

Script Content

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

Variables

Name
Type
Value

S1_MainMenu

com.cisco.prompt.Playable

S1_MainMenu.wav

S1_SystemProblems

com.cisco.prompt.Playable

S1_SystemProblems.wav

S1_AfterHours

com.cisco.prompt.Playable

S1_AfterHours.wav

MainOperExt

java.lang.String

0


Prompt Content

Prompt Filename
Audio Content

S1_MainMenu.wav

Thank you for calling Widget Systems. Please press 1 if you know the extension of the person you wish to reach, or press 2 to speak to our receptionist.

S1_SystemProblems.wav

We're sorry, the system seems to be experiencing some problems right now. Please call back again at a later time.

S1_AfterHours.wav

Our office hours are from 8:30 am to 5 pm Monday to Friday. Please call back during that time.


Dial by Extension Subflow: S1_DialbyExtension.aef

Script Content


 Start
/* S1_DialbyExtension.aef */
 tryagain:
 Get Digit String(contact: --Triggering Contact--, result digit string: extension)
	Successful
		Create Generated Prompt( telephone.number type, store in spelledprompt )
		Implicit Confirmation (contact: --Triggering Contact--)
			No
				Goto tryagain
			Yes
				Call Redirect (contact: --Triggering Contact--, extension: extension)
					Successful
						End
					Busy
						Play Prompt (contact: --Triggering Contact--, prompt: S1_ExtBusy)
						Terminate (contact: --Triggering Contact--)
						End
					Invalid
						Play Prompt (contact: --Triggering Contact--, prompt: 
S1_InvalidExt)
						Decrement again
						If ( again == 0 ) Then
							True
								Play Prompt (contact: --Triggering Contact--, prompt: 
S1_SystemProblems)
								Terminate (contact: --Triggering Contact--)
								End
							False
								Goto tryagain
					Unsuccessful
						Play Prompt (contact: --Triggering Contact--, prompt: 
S1_InvalidExt)
						Play Prompt (contact: --Triggering Contact--, prompt: S1_Goodbye)
						Terminate (contact: --Triggering Contact--)
						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

Variables

Name
Type
Value

extension

java.lang.String

 

again

java.lang.Integer

3

spelledprompt

com.cisco.prompt.Playable

..

S1_ExtBusy

com.cisco.prompt.Playable

S1_ExtBusy.wav

S1_InvalidExt

com.cisco.prompt.Playable

S1_InvalidExt.wav

S1_SystemProblems

com.cisco.prompt.Playable

S1_SystemProblems.wav

S1_Goodbye

com.cisco.prompt.Playable

S1_Goodbye.wav

S1_EnterExt

com.cisco.prompt.Playable

S1_EnterExt.wav


Prompts

Prompt Filename
Audio Content

S1_EnterExt.wav

S1_EnterExt.wav

S1_ExtBusy.wav

Sorry, this extension is busy right now. Please call back again at a later time.

S1_InvalidExt.wav

You have entered an invalid extension.

S1_Goodbye.wav

Goodbye.


Transfer to the Receptionist Subflow: S1_XfertoOper.aef

Script Content

Start
/* S1_XfertoOper.aef */
Play Prompt (contact: --Triggering Contact--, prompt: S1_OperXfer)
Call Redirect (contact: --Triggering Contact--, extension: OperExt)
	Successful
		End
	Busy
		Set condition = true
	Invalid
		Play Prompt (contact: --Triggering Contact--, prompt: S1_SystemProblems)
		Terminate (contact: --Triggering Contact--)
		End
	Unsuccessful
		Set condition = false
Create Conditional Prompt (store in OperNotAvail)
Play Prompt (contact: --Triggering Contact--, prompt: OperNotAvail)
Terminate (contact: --Triggering Contact--)
End

Variables

Name
Type
Value

S1_OperXfer

com.cisco.prompt.Playable

S1_OperXfer.wav

OperExt

java.lang.String

0

S1_SystemProblems

com.cisco.prompt.Playable

S1_SystemProblems.wav

OperNotAvail

com.cisco.prompt.Playable

..

condition

java.lang.Boolean

true

S1_OperBusy

com.cisco.prompt.Playable

S1_OperBusy.wav


Prompts

Prompt Filename
Audio Content

S1_OperXfer.wav

Transferring to the receptionist.

S1_OperBusy.wav

The receptionist is busy on another call right now. Please call back again at a later time.

S1_SystemProblems.wav

We're sorry, the system seems to be experiencing some problems right now. Please call back again at a later time.


Creating an Office Directory Script

This script presents a menu of employee names, the location of the office, directions to the office, and fax contact information.

Create the Script File

You must create the S2_Main-Office-Dir.aef script file:

Start
/* S2_Main-Office-Dir.aef */
/* Basic Office Directory ... */
Accept (contact: --Triggering Contact--)
MainMenu:
Menu (contact: --Triggering Contact--, prompt: S2_MainMenu)
	Office Directory
		Menu (contact: --Triggering Contact--, prompt: S2_OfficeDir)										
			John
				Call Redirect (contact: --Triggering Contact--, extension: John)
					Successful
						End
					Busy
						End
					Invalid
						Goto Error
					Unsuccessful
						Goto Error
			Mary
				Call Redirect (contact: --Triggering Contact--, extension: Mary)
					Successful
						End
					Busy
						End
					Invalid
						Goto Error
					Unsuccessful
						Goto Error
			Janet
				Call Redirect (contact: --Triggering Contact--, extension: Janet)
					Successful
						End
					Busy
						End
					Invalid
						Goto Error
					Unsuccessful
						Goto Error
			Bruce
				Call Redirect (contact: --Triggering Contact--, extension: Bruce)
					Successful
						End
					Busy
						End
					Invalid
						Goto Error
					Unsuccessful
						Goto Error
			Candice
				Call Redirect (contact: --Triggering Contact--, extension: Candice)
					Successful
						End
					Busy
						End
					Invalid
						Goto Error
					Unsuccessful
						Goto Error
			Mike
				Call Redirect (contact: --Triggering Contact--, extension: Mike)
					Successful
						End
					Busy
						End
					Invalid
						Goto Error
					Unsuccessful
						Goto Error
			Anyone else
				Call Redirect (contact: --Triggering Contact--, extension: Janet)
					Successful
						End
					Busy
						End
					Invalid
						Goto Error
					Unsuccessful
						Goto Error
			Timeout
				Goto OfficeDir
			Unsuccessful
				Goto Error
	Location info
		Play Prompt (contact: --Triggering Contact--, prompt: S2_LocationInfo)
		Terminate (contact: --Triggering Contact--)
		End
	Fax Number Info
		Play Prompt (contact: --Triggering Contact--, prompt: S2_FaxInfo)
		Terminate (contact: --Triggering Contact--)
		End
	Timeout
		Goto MainMenu
	Unsuccessful
		Goto Error
Error:
Play Prompt (contact: --Triggering Contact--, prompt: S2_SystemProblems)
Terminate (contact: --Triggering Contact--)
End

Define Variables

Name
Type
Value

S2_MainMenu

com.cisco.prompt.Playable

S2_MainMenu.wav

S2_SystemProblems

com.cisco.prompt.Playable

S2_SystemProblems.wav

S2_OfficeDir

com.cisco.prompt.Playable

S2_OfficeDir

S2_LocationInfo

com.cisco.prompt.Playable

S2_LocationInfo

S2_FaxInfo

com.cisco.prompt.Playable

S2_FaxInfo

John

java.lang.String

6005

Mary

java.lang.String

6015

Janet

java.lang.String

6008

Bruce

java.lang.String

6020

Candice

java.lang.String

6007

Mike

java.lang.String

6012


Create the Prompt Files

Prompt File Name
Audio Content

S2_MainMenu.wav

Thank you for calling the Widget charity office. Please press 1 if you wish to speak to one of our associates, press 2 for the hours and location of our office, or press 3 to contact us by fax.

S2_OfficeDir.wav

Please press 1 for John, 2 for Mary, 3 for Janet, 4 for Bruce, 5 for Candice, 6 for Mike and 7 if you have not heard the name of the associate you want to speak to.

S2_LocationInfo.wav

Our office is open Mondays and Wednesdays from 10am until 3pm. We are located at the north-west corner of Custer Road and Legacy Avenue. The address is 2059 Custer Road, Wichita, Alaska. Thanks for calling, goodbye.

S2_FaxInfo.wav

You can reach us at one of the following fax numbers: 800.555.2001, 800.555.1445 or 956.555.2323. Thanks for calling, goodbye.

S2_SystemProblems.wav

We're sorry, the system seems to be experiencing some problems right now. Please call back again at a later time.