Deploying an application

Once you’ve created all the components of your application, you must deploy it. Deploying an application involves publishing it on the application server, configuring Voice Platform to run it, and calling it to make sure it works properly.

Voice Platform applications can be deployed on several different types of application server. Voice Platform provides an Application Container service as part of the installation: this service uses the Tomcat application server by default. You can also use supported third-party application servers: JBoss, WebLogic, or WebSphere.

The application server you use determines what steps you must take to publish the application and validate its location. The deployment process is otherwise the same for each server.

Prerequisites

These instructions assume that:

  • The Management Station is running with hosts connected to it.
  • These hosts are configured with the appropriate roles.
  • The services on the hosts are configured properly and have been started.
  • An Application Container service is available on a separate host.

Web archive files

No matter what application container you use, you must package your application as a web archive file in WAR format (*.war) in order to deploy it.

There are many different methods of creating a WAR file. For example, you can use the jar utility (jar.exe) component of a standard Sun Java Development Kit. For example, to package an application called myapp located in c:\tmp:

  1. Open a DOS prompt.
  2. Enter the command:
cd c:\tmp\myapp 
  1. Enter the command:
"%JAVA_HOME%\bin\jar.exe" cf ..\myapp.war *

Deploying using the Application Container service

To deploy an application using the Application Container service, you must create a web archive file, deploy it, and restart the Application Container service.

Publish the application

Follow these steps to publish your application:

  1. Go to the application root directory and create a WEB-INF subdirectory if it doesn’t already exist (Tomcat requirement). This subdirectory can be empty.
  2. Create a web archive file (*.war) for the application.
  3. Copy the *.war file to % NVP_HOME%\appservice\applications\webapps on the host running the Application Container service.
  4. Restart the Application Container service in Management Station to load the new application.

Validating the application URL

Before configuring Voice Platform to run this application, confirm that the URL is valid. Open the application URL in a web browser like Internet Explorer or Firefox using the format: http://hostname:8090/MyApp/dialogs/main.vxml

Where:

  • The hostname is the name or IP address of the Application Container service host (8090 is the port number reserved for the Application Container service).
  • MyApp/dialogs/main.vxml is the path to the initial page of your application.

Deploying a web application using WebSphere

These instructions are specific to WebSphere V6.1. Please see the Release Notes for the list of supported versions. To deploy an application using WebSphere:

  1. Start the WebSphere Administration Console from the main Start menu:

Start→Programs→IBM WebSphere→Application Server V6.1→Profiles→AppSrv01→Administration Console

  1. Expand the application node on left hand side.
  2. Click Install New Application.
  3. Select Local File System, and click Browse to select the *.war file.
  4. Enter a name in the Context root field.

    The name you provide here will be used as the path in the URL.

  5. Accept all default settings (click Next to reach the end), and then click Finish.

    You will see a message saying that the application was successfully installed.

  6. Save to master configuration by clicking the link.
  7. Click Enterprise Applications on the left-hand side to start the application.

    You will see a list of already installed applications that comes with WebSphere, plus the new application that you just installed.

  8. Click the checkbox beside the newly installed application, and click Start.
  9. Configure Voice Platform to run the application.

The path to your application is:

http://host_IP:9080/Context_root/myapp

Where host_IP is your hostname or IP address, Context_root is the same Context root field you entered above, and myapp is the pathname to the initial VoiceXML document for your application (for example, dialogs/Welcome.vxml).

Deploying a web application using WebLogic

These instructions are specific to WebLogic 9.1. Please see the Release Notes for the list of supported versions.

To deploy your application using a WebLogic application server, you must create a domain and add your application to it.

Preparation

If you haven’t already done so, download and install the WebLogic Server. You can accept all the installation defaults, including the directory where the WebLogic products will be installed.

You will also need a valid user name and password for the installation, as these are needed when creating the WebLogic domain.

Creating a WebLogic domain

To create a WebLogic domain:

  1. Select Start→Programs→BEA Products→Tools→Configuration Wizard
  2. Click the Create a new WebLogic domain option, and click Next.
  3. Select "Generate a domain configured automatically to support the following BEA products".

    By default WebLogic is selected and greyed out.

  4. Click Next.
  5. Specify user account information.
  6. Enter a valid user name and password.

    You will need this username and password later on to start the WebLogic Server and publish your application, so take note of them.

  7. Click Next until you reach the screen to specify the domain name.
  8. Enter a meaningful domain name and location. The default location is:

C:\bea\user_projects\domains\domain_name

For example, if you enter MyApp as the domain name, WebLogic creates this structure: C:\bea\user_projects\domains\MyApp

  1. Click Create.

    A message appears saying the domain was successfully created.

  2. Click Done.

Adding an application to the domain

To add the application to the new domain:

  1. Select Start→Programs→BEA Products→User Projects→domain_name→Start Admin Server for WebLogic Server domain.

    This opens a DOS prompt. The Administration Server will be running.

  2. Select Start→Programs→BEA Products→User Projects→domain_name→Admin Server Console.

    If the web page is not accessible, it means that the Administration Server was not properly started.

  3. Enter the username and password to log onto this domain and click Log In.
  4. Click the Deployments node on the left hand side.
  5. Click Lock & Edit to add an application.

    The Install button is now enabled.

  6. Click Install.
  7. Browse through the directories to locate the *.war file.
  8. Select the *.war file and click Next.
  9. Select the "Install this deployment as an application” option and click Next.
  10. Browse through the pages keeping the default settings, until you click Finish.

    This will bring you to the Overview (and configuration page for the web application).

  11. Click Activate Changes in upper left hand corner of window.
  12. Start the application by selecting the application and clicking Start (servicing all requests).
  13. To find out the URL of the application, click the web application, go to the Testing tab, and note the corresponding URL string. You need to enter this URL in the Applications tab of the Voice Browser service, as described under Configuring Voice Platform to run the application.

Deploying a web application using JBoss

These instructions are specific to JBoss 4.2.1_GA. Please see the Release Notes for the list of supported versions.

Ensure that a supported version of Java is installed on the machine running JBoss, and that the environment variable %JAVA_HOME% has been set to reference the Java root location. Note:

If you install JBoss on the same host as Voice Platform, this is already handled by the Voice Platform installation. Voice Platform bundles the correct Java version and sets %JAVA_HOME% to this location.

If you install JBoss on a different host, you must install Java and explicitly set %JAVA_HOME% to the root of the install directory. See the Release Notes for the correct version.

To deploy a voice application using JBoss:

  1. Copy the application *.war file (example: PizzaTalk.war) and store it in jboss-4.2.1.GA\default\deploy.
  2. Open a command-prompt window and navigate to the bin directory:

C:\jboss-4.2.1.GA\bin

  1. Run the following command:

run.bat -b host_IP_address

  1. Configure Voice Platform to run the application, described next.

The URL to configure the Voice Browser service is:

http://host_IP_address:8080/MyApp/dialogs/myapp.vxml

Where host_IP_address is the IP of the host, and MyApp/dialogs/myapp.vxml is the pathname to your entry VoiceXML document.

Configuring Voice Platform to run the application

Follow these steps to configure Voice Platform to run your application. Also see Configuring the Voice Browser service.

  1. From the Management Station, display the Voice Browser service property tabs at the desired scope: network, host, or service instance.
  2. In the Application tab, select the default application and edit the Document URL to point to your application (this URL depends on the application server you are using, as explained in each of the previous sections).

    You can also add this application without replacing the default.

  3. Optionally, specify a Company and Application (choose Other and enter the appropriate information).
  4. In the Advanced tab, change the browser.mrcp.serverAddress property as needed to point to the Speech Server host (select the property, click Override, and type in the correct server host). The default port is 5066.
  5. If your applications uses a primary language other than US English, change the browser.primaryLocale property to the appropriate language.
  6. Click OK when finished.
  7. Restart the Voice Browser service.

    When the service is ready, you can call the application.

Calling the application

Call your application to make sure it is working properly. How you do this depends on the audio provider you are using.

SIP

If you’re using the SIP audio provider, you can call the application using a SIP softphone, for example SJPhone. When the softphone is up and running, dial the URI of the application using this format:

sip:nvp@hostname:port 

The hostname is the name or IP address of the host running the Voice Browser service, and port is the port number. For example:

sip:nvp@10.1.6.79:5060 

By default, Voice Platform reserves port 5060 for incoming SIP calls. This is the standard default port number for SIP, so you don’t need to specify the port to make a call. However, your SIP phone must be installed on a different host from Voice Platform in order to avoid a port conflict.

When the connection is made, you can interact with the application, testing that it’s working properly.

NMS

If you’re using the NMS audio provider, call the application by dialing the telephone number that you configured on your PBX. When the connection is made, you can interact with the application.