Partager via


Walkthrough: Create a Simple Outbound Application

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

This walkthrough illustrates using Workflow Designer to create a simple outbound application.

Prerequisites

To complete this walkthrough, you need:

  • Speech Server.
  • Sufficient permissions to create and debug ASP.NET Web application projects on the computer where Speech Server is installed.

Create a Simple Outbound Application

To create a voice response application

Modify Outbound.aspx

An easy way to insert data into an outbound speech application is to modify the default Outbound.aspx file.

To modify Outbound.aspx

  1. In Solution Explorer, right-click Outbound.aspx, and then click View Code.

  2. In the TriggerButton event handler, modify the String outboundUri to place the outbound phone number in the query string variable for the application's .speax file.

    String outboundUri = "http://localhost/OutboundApplication/OutboundApplication.speax?phoneNumber=5550187";
    

Add Code to Set the CalledParty Property

To read the data passed in by the POST method, use the QueryString property in a Code activity.

To add a MakeCall and a Statement

  1. On the design surface, delete answerCallActivity1.

  2. On the Microsoft Visual Studio 2005 toolbar, click Toolbox.

  3. In the Toolbox, click Speech Dialog Components to display speech activities.

  4. Drag and drop a MakeCall speech dialog component onto the design surface above disconnectCallActivity1.

  5. Drag and drop a Statement speech dialog component onto the design surface between makeCallActivity1 and disconnectCallAtivity1.

  6. On the design surface in statementActivity1, click Edit Prompts.

  7. In the Statement Property Builder dialog box, type You have an appointment today at the Doctor's in the Main box, and then click OK.

To set the CalledParty property

  1. In the Toolbox, click Windows Workflow.

  2. Drag and drop a Code activity onto the design surface above makeCallActivity1.

  3. Right-click codeActivity1, and then click Generate Handlers.

  4. Insert the following statement in the ExecuteCode event handler.

    this.makeCallActivity1.CalledParty = QueryString["phoneNumber"];
    
  5. Save the solution.

Run the Application

To build and debug the application

  1. In Microsoft Visual Studio 2005, click Build Solution on the Build menu.

  2. Press F5 to debug the solution.

  3. In the Debugging Not Enabled dialog box, click OK.

  4. In the Voice Response Debugging Window dialog box, click Outbound Trigger.

  5. In the trigger window, click Send Trigger.

  6. In the Incoming Call Control dialog box, click Answer.

    Listen to the prompt or view the prompt text displayed in the Voice Response Debugging Window dialog box.

See Also

Other Resources

Speech Application Development Guide