Cisco Unity Express 7.0 IVR CLI Administrator Guide
Deploying an IVR Web Application

Table Of Contents

Deploying an IVR Web Application

Before Deploying an IVR Web Application

Defining the Web Application

Setting a Trigger

Deploying the Web Application

Examples


Deploying an IVR Web Application


Last Updated: January 6, 2009

The Cisco Unity Express Interactive Voice Response (IVR) feature allows you to deploy your VoiceXML scripts, which represent the static content of the IVR application, and JSP and Java files, which generate the dynamic content of the IVR application. IVR applications are packaged using the Web Archive (WAR) file format, which contain VoiceXML and compiled versions of the JSP and Java files, including the property and configuration files.

Use the IVR CLI commands associated with your written Web applications to deploy and manage the Cisco Unity Express IVR Web application. The following sections describe how to deploy a Web application represented by a WAR file on to a Cisco Unity Express module:

Before Deploying an IVR Web Application

Defining the Web Application

Setting a Trigger

Deploying the Web Application

Before Deploying an IVR Web Application

Before deploying a Web application, prompts must be loaded on the Cisco Unity Express system using the following command (see "Copying a Document from a URL Location to the Cisco Unity Express IVR System" procedure on page -26):

ccn copy url xxx://xxx/xxx.wav prompt xxx.wav language xx_YY

Databases to be used by the Web application must be configured first (see "Configuring the IVR Enterprise Database Subsystem" section on page 15). Also, fax (see "Configuring the IVR Fax Subsystem" section on page 31) or e-mail (see "Configuring the IVR Outgoing E-Mail Subsystem Notifications" section on page 35) resources used by the application must be configured. The WAR file must be located in a directory that can be accessed using FTP, SFTP, or TFTP.

Defining the Web Application

After executing the webapp deploy command to deploy and start the Web application, and the show webapp command to verify that the application has started correctly, an application definition must be provided to define the Web application to the remainder of the Cisco Unity Express environment. The definition is made in Cisco Unity Express configuration mode, as shown in the following commands:

ccn application app-name ivr
  description "description"
  enabled
  script "webapp.aef"
  parameter "startPage" "relative/path/to/webapp/start/page.vxml"
  parameter "appName" "<webappname>"
  end application

Where:

app name is the name of the application as recognized by Cisco Unity Express. It is typically the same name given to the application during the webapp deploy command, and use of this name is not a requirement.

description is the text used to describe the Web application.

relative/path/to/webapp/start/page.vxml is the pathname (including file and extension) to the first page of the application relative to the remainding files in the WAR file. For example, if the WAR file contains the file vxml/start.vxml, and this is where the startup logic of the Web application is contained, then the string vxml/start.vxml is configured as the startPage parameter of this application.

webappname is the name given to the application during the webapp deploy command.


Note This is a standard ccn application definition, with the following:

ivr keyword is required to define an Interactive Voice Response application.

webapp.aef script is used to connect to the Web application.

webapp.aef script uses the startPage and webappname parameters to locate the desired Web application and use the desired starting page within that Web application.


Setting a Trigger

After defining the Web application, one or more triggers can be defined to trigger operation of the application. A trigger must have the following format:

ccn trigger protocol phonenumber number
  application appname
  enabled
  end trigger

Where:

protocol is the protocol used by the incoming event trigger, usually SIP or JTAPI (to define an HTTP trigger, see "Configuring IVR HTTP Triggers" section on page 21).

number is the phone number dialed to invoke this trigger.

appname is the name of the Cisco Unity Express Web application.

Deploying the Web Application

Use the webapp deploy command to upload and start the WAR file onto the Cisco Unity Express system.

The webapp command deploys and manages a specified Web application in the Cisco Unity Express IVR system. The following is the full syntax of the webapp command in Cisco Unity Express IVR EXEC mode:

webapp {delete webappname name | deploy url war-url webappname name [allow-network-connect 
| username userid [password password [allow-network-connect]]] | reload webappname name | 
start webappname name | stop webappname name}

SUMMARY STEPS

1. webapp deploy url war-url webappname name [allow-network-connect | username userid [password password [allow-network-connect]]]

2. webapp start webappname name

3. webapp stop webappname name

4. webapp reload webappname name

5. webapp delete webappname name

6. show webapp

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

webapp deploy url war-url webappname name [allow-network-connect | username userid [password password [allow-network-connect]]]

Example:

se-10-0-0-0# webapp deploy url ftp://10.0.0.1/hr.war webappname myapp username tbdonald password ******* allow-network-connect

Installs and starts the Web application using the following information:

Name of the application (for example, myapp).

This name must be less than 8 characters in length and is used to generate the:

Name of the Web application subdirectory that hosts the application files,

URL path matched against incoming URLs to access this Web application.

URL of the WAR file to be uploaded

Based on this information, the command uploads the WAR file and deploys it.

If one of the following errors is detected, the corresponding error message appears:

Webapp appname already exists

Web archive war-url does not exist

Webapp appname produced exception

Webapp appname is too large

Too many webapps already deployed

When the WAR file contains content that is not allowed, the following warning appears:

Web archive war-url contains unexpected file 
filename which will be ignored

Step 2 

webapp start webappname name

Example:

se-10-0-0-0# webapp start url ftp://10.0.0.1/hr.war webappname myapp

Starts the specified Web application after it was stopped using the webapp stop command.

If one of the following errors is detected, the corresponding error message appears:

Webapp appname is already started

Webapp appname does not exist

Webapp appname produced exception

Step 3 

webapp stop webappname name

Example:

se-10-0-0-0# webapp stop url ftp://10.0.0.1/hr.war webappname myapp

Stops the specified Web application.

If one of the following errors is detected, the corresponding error message appears:

Webapp appname is already stopped

Webapp appname does not exist

Webapp appname produced exception

Step 4 

webapp reload webappname name

Example:

se-10-0-0-0# webapp reload url ftp://10.0.0.1/hr.war webappname myapp

Reloads the specified Web application. The webapp reload command is equivalent to the webapp stop command immediately followed by webapp start and used to reload misbehaving Web applications.

If one of the following errors is detected, the corresponding error message appears:

Webapp appname does not exist

Webapp appname produced exception

Step 5 

webapp delete webappname name

Example:

se-10-0-0-0# webapp delete url ftp://10.0.0.1/hr.war webappname myapp

Deletes the specified Web application. The webapp delete command removes the Web application and deletes all the resources of the Web application from the module.

If one of the following errors is detected, the corresponding error message appears:

Webapp appname is not stopped

Webapp appname does not exist

Webapp appname produced exception

Step 6 

show webapp

Example:

se-10-0-0-0# show webapp

Displays the Web application name, status (running or stopped), and number of Web application sessions connected.

Examples

After executing the webapp deploy command to deploy and start the Web application, use the show webapp EXEC command to verify that the application starts correctly. The name of the Web application must be provided in the show command to display the status of a specific Web application. Use the show webapp command to monitor the applications. The following show webapp command is an example of the command output for all Web applications:

se-10-0-0-0# show webapp
Webapp      Status  #Sessions
Webapp1     running         2
Webapp2     stopped         0

The output displays the name, status (running or stopped), and number of connected sessions of the Web application.

Until the first call that matches an application trigger reference is received, the status of the Web application when it is initially deployed is shown as running and the number of sessions is 0. After the initial deployment, the session count increments by one for each triggered call received, and decrements by one for each triggered call terminated. Sessions persist for a short period of time after the call is terminated, so the session count lags the real-time call termination for a short period.


Note These triggered sessions are those recognized by the Web application server and not sessions recognized by the remainder of the Cisco Unity Express environment.


If you use the webapp stop command, the Web application stops, and its status is stopped. If the webapp stop command is followed immediately by a webapp start command, the web application is reinitialized, starts execution, and its status becomes running. The webapp reload command is equivalent to the webapp stop command immediately followed by webapp start and used to reload misbehaving Web applications. The webapp delete command removes the Web application from the show webapp output, and deletes all the resources of the Web application from the module.