Flylib.com

Books Software

 
 
 

TCL-Based Automated Attendant


TCL-Based Automated Attendant

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

  • The integrated AA application, which is part of Cisco UE, as discussed in this chapter

  • Leveraging the router's TCL scripting capabilities to provide an AA

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

Table 9-6. Considerations When Choosing a Cisco CME AA

Consideration

TCL-Based AA

Cisco UE AA

Where the scripts execute

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

Scripts execute on the dedicated Cisco UE module. Therefore, they use the dedicated module CPU and do not affect the router's performance.

Memory

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

Scripts are loaded into the dedicated Cisco UE module's 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 UE Editor has a validation function.

Script management

Requires an offline editor. Scripts are installed by copying the script to the router's 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 the router's Flash using TFTP.

Prompts can be recorded online using the Cisco UE 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 may require an increase in router Flash memory size .

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

Customization

Should be customized only by knowledgeable TCL developers.

Can be customized using the Cisco UE 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's CLI.

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

TFTP/FTP

Scripts are copied to the router from a TFTP server.

Cisco UE 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 DNS host name ), an Internet Explorer (IE) browser window, and a Cisco UE 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 UE 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

A TCL-based AA and Cisco UE should not be used at the same time on the same Cisco CME system. If Cisco UE is present, use its AA facilities. Use the TCL-based AA features only when a pure router-based solution is required and Cisco UE is not present.


Now that you understand the trade-offs, the next sections describe TCL-based AA in more detail.

TCL Scripts

TCL scripts reside on the router's 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 isn't 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.

Example 9-7 shows an extract from the Cisco CME 3.0 TCL AA script. (For the full script listing, download the script file from the Software Center for Cisco CME on Cisco.com.) It is 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 Example 9-7) 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.

Example 9-25. Cisco CME 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
   }

The Cisco CME TCL script refers to several prompts (two of which are shown in Example 9-7), 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 may 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 the router's Flash. The Cisco UE GMS cannot be used to record these prompt files. Example 9-8 shows the TCL AA files, including the prompts and the script itself, installed into a router's Flash.

Example 9-26. TCL AA Installed into 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. Great care should be taken 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 the router's Flash using TFTP or FTP. The copy commands in Cisco IOS allow you to transfer TCL scripts from a TFTP or FTP server to the router's Flash memory. The Cisco CME TCL AA script file its-CISCO.2.0.1.0.tcl, present in router Flash, was shown in Example 9-7.

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

After the scripts and prompts have been loaded into the router's 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.)

Example 9-9 shows the Cisco IOS router commands necessary to configure the TCL application.

Example 9-27. Commands to Configure the TCL AA
router>

show running-config

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/

Example 9-10 shows a PSTN (POTS) dial peer with the TCL AA application attached.

Example 9-28. TCL AA Application Attached to the PSTN Dial Peer
router>

show running-config

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.