Concerts Sans Frontieres Managed Code Reference 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.

The Concerts Sans Frontieres (Concerts) reference application is a multilingual, end-to-end, managed code voice response application that simulates a telephone service for ordering concert tickets. Concerts demonstrates typical voice response application tasks such as, but not limited to, the following:

  • Using a FormFillingDialogActivity object
  • Gathering input and stating results
  • Confirming user input
  • Responding to silence and unrecognized input
  • Dynamically setting the text-to-speech (TTS) language
  • Using global commands
  • Using dual tone multi-frequency (DTMF)
  • Call handling

Multilingual Operation

The default language of the Concerts reference application is English (United States), but it is also capable of operating in French (Canada) and German (Germany). To take full advantage of the multilingual capabilities of Concerts, you must install the French (Canada) and German (Germany) language packs in addition to the English (United States) language pack. If you install the English (United Kingdom) language pack, the English (United States) language pack must also be installed.

Getting Started

Before you run Concerts, you must set up a message queue and create a virtual directory for this application.

To set up a message queue for Concerts

  1. Open Computer Management:

    1. On Microsoft Windows Server 2003, click Start on the taskbar, point to Administrative Tools, and then click Computer Management.
    2. On Microsoft Windows XP, click Start on the taskbar, click Control Panel, click Administrative Tools, and then click Computer Management.
  2. In the left pane, expand Services and Applications, and then select Message Queuing.

  3. Right-click Private Queues, click New, and then click Private Queue.

  4. In the New Private Queue dialog box, enter a name for the queue (for example, MSMQTriggersNotifications) in the Queue name box, and then click OK.

  5. Under Private Queues, right-click the queue whose name you created in the previous step, and then click Properties.

  6. Click the Security tab, and then click Add.

  7. In the Select Users, Computers, or Groups dialog box:

    1. On Microsoft Windows Server 2003, enter NETWORK SERVICE, and then click OK.
    2. On Microsoft Windows XP, enter ASPNET, and then click OK.
  8. On the private queue property page in the lower pane, select the Allow permissions check boxes for Receive Message and Peek Message.

    The Send Message check box should already be selected.

  9. Click OK.

Next, you need to create a virtual directory for the application. This action entails the use of the Administrator console to create a virtual directory for Concerts and the use of Internet Information Systems (IIS) Manager to set directory security for the virtual directory.

To create a virtual directory for Concerts

  1. Click Start on the taskbar, point to All Programs, point to Microsoft Office Communications Server 2007 Speech Server, and then click Administrator Console.

  2. In the left pane, expand Default, and then select Applications.

  3. Right-click Applications, click New, and then click Application.

  4. In the Create new application dialog box, enter ConcertsSansFrontieres in the Application name box.

    The URL box is automatically filled as you type the application's name.

  5. In the Deployment Location box, enter the directory path to application's files.

    If you installed the application to the C: drive, the directory path is the Samples\Workflow\ConcertsSansFrontieres\ConcertsSansFrontieres\ directory of the Speech Server installation directory.

  6. In the Manifest (optional, specifies resources to preload) box, enter http://localhost/ConcertsSansFrontieres/manifest.xml, which is the path to the Concerts application's manifest file.

  7. In the Message queue box, enter .\private$\ followed by the name you created for your message queue in the previous procedure.

    For example, if you named your message queue MSMQTriggersNotifications, enter .\private$\MSMQTriggersNotifications.

  8. Click OK.

  9. In the Select Servers dialog box, select the server on which to create the application, and then click OK.

The next procedure provides details about setting directory security for the virtual directory for Concerts on Microsoft Windows Server 2003 and Windows XP.

To set directory security on the virtual directory for (Windows Server 2003 and Windows XP)

  1. Open Internet Information Services Manager:

    1. On Microsoft Windows Server 2003, click Start on the taskbar, point to Administrative Tools, point to Internet Information Services (IIS) Manager, and then click Administrator Console.
    2. On Microsoft Windows XP, click Start on the taskbar, click Control Panel, click Administrative Tools, and then click Internet Information Services.
  2. In the left pane, expand ServerName, expand Web Sites, and then select Default Web Site.

  3. Right-click Default Web Site, and then click Refresh.

    If you expand Default Web Site, you should see an entry for ConcertsSansFrontieres.

  4. Right-click ConcertsSansFrontieres, and then click Properties.

  5. On the ConcertsSansFrontieres property page, click the Directory Security tab.

  6. On the Authentication and access control pane, click Edit.

  7. In the Authentication Methods dialog box, select the Enable anonymous access check box, and then enter your user name (in the form domain\user_name) and your password.

  8. Click OK.

  9. Re-enter your password, and then click OK twice.

The steps for setting directory security for the virtual directory for Concerts on Windows Vista differ from those for Windows Server 2003 and Windows XP.

To set directory security on the virtual directory (Windows Vista)

  1. Open Internet Information Services Manager:

    1. On the Start menu, click Control Panel, and then double-click Administrative Tools.
    2. In Administrative Tools, double-click Internet Information Services (IIS) Manager.
    3. In User Account Control, click Continue.
  2. In the left pane, expand ServerName, expand Web Sites, and then select Default Web Site.

  3. Expand Default Web Site, and then select ConcertsSansFrontieres.

  4. In the right pane, click the Features View tab.

  5. In the right pane, double-click Authentication in the IIS group.

  6. Right-click Anonymous Authentication, and then click Edit.

  7. In the Edit Anonymous Authentication Credentials dialog box, click Specific user, and then click Set.

  8. In the Set Credentials dialog box, enter your user name (in the form domain\user_name) and your password, and then re-enter your password to confirm it.

  9. Click OK.

  10. In the Edit Anonymous Authentication Credentials dialog box, click OK.

Running and Debugging Concerts

The Concerts application consists of a number of files that comprise the workflow. The entire project must be compiled and built before you can view the workflow or run the application. Step 3 in the following procedure describes how to do this.

To run and debug Concerts using Microsoft Visual Studio 2005

  1. Follow the previous steps for installing the application.

  2. Verify that your speakers and microphone are properly adjusted for playback and recording.

  3. In the Samples\Workflow\ConcertsSansFrontieres\ directory of the Speech Server installation directory, open ConcertsSansFrontieres.sln.

  4. In Solution Explorer, right-click Solution 'ConcertsSansFrontieres' (4 projects), and then click Build Solution.

  5. Press F5.

  6. In the Voice Response Debugging Window dialog box, type any numbers in the Called Party and Calling Party boxes, and then click Call to start the application.

Note

The performing artist names and concert titles that Concerts uses are fictional.

Running an English Language Scenario in Concerts

As noted earlier, the English (United States) language pack must be installed for Concerts to run correctly. The English (United Kingdom) language pack can optionally be installed. Concerts uses a file named RegisteredUsers.xml to identify callers. This file consists of a list of users, each of whom is identified by name, phone number, secret question, personal identification number (PIN), and language.

If the phone number you enter in the Calling Party box (on the SIP Phone tab of the Voice Response Debugging Window dialog box) is listed in RegisteredUsers.xml, Concerts recognizes you. If you enter a phone number that is not listed in RegisteredUsers.xml, Concerts asks you for a PIN. Enter a PIN that appears in RegisteredUsers.xml.

Warning

Microsoft strongly recommends against storing personally identifiable information (PII) in clear text. The Concerts application does not attempt to show best practices for PII.

Run the following Concerts scenario using Visual Studio 2005.

To run Concerts using an English language scenario

  1. Follow the previous steps to start running the application.

  2. On the SIP Phone tab, enter the following six-digit PIN: 111111.

    The application plays a prompt that thanks you by name, and then asks which concert you want to attend.

  3. Click Start Recording, and then say "Ben Miller."

  4. When the recognized result appears in the Text Input text box, click Submit.

    Concerts plays a prompt announcing the concert information, and then asks whether you want to buy tickets.

  5. Respond to this prompt and to the next four prompts by clicking Start Recording, and then responding with appropriate answers (for example, "yes," "one," "two," "three," and "yes").

  6. For each of your responses, when the recognized value appears in the Text Input text box, click Submit.

  7. When Concerts asks "Which sport do you like?," click Start Recording, and then say "badminton."

  8. When the recognized value appears in the Text Input text box, click Submit.

    Concerts asks whether you want a reminder call on the day of the concert.

  9. Click Start Recording, and then say "yes."

  10. When the recognized result appears, click Submit.

    Concerts plays its closing prompt, and then displays the Incoming Call Control dialog box. Ordinarily, this dialog box appears immediately, but there can be up to a 10-minute delay when you set up and run Concerts for the first time.

  11. Click Answer.

    Concerts plays a prompt reminding you about the concert.

    Important

    Do not attempt to start another call while waiting for the inbound-call notification.

Remarks

  • After entering a PIN, you can switch to German (Germany) by clicking * 2 on the SIP Phone tab. To switch to French (Canada), click * 3 on the SIP Phone tab.

  • Concerts greets the caller using the name associated with the PIN you enter. For example, because the name Dave is associated with PIN 111111, the application uses the name Dave in the greeting prompt played after entering the PIN. User names and corresponding PINs are listed in the RegisteredUsers.xml file.

  • Concerts uses the user identification challenge question and answer associated with the caller in the RegisteredUsers.xml file.

  • You can add information to the RegisterdUsers.xml file for additional users by copying a User element and modifying the attribute values. The value of the userid attribute must be unique for each user.

  • Concert information including date, performing artist's name, and concert title are stored in the Concerts.xml file. You can add information for additional concerts by copying a Concert element and modifying the date, artist, and title attributes.

    Note

    The value of each date, artist, and title attribute must be unique within the Concerts.xml file. For example, you cannot add a concert for the date 10/14/2007 because a concert using that date value already exists in the file.

This code sample is intended to demonstrate specific Speech Server features. It does not necessarily reflect best practices with respect to security and privacy. You should carefully review any code that you deploy in production for potential security risks and privacy issues.