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
Open Computer Management:
- On Microsoft Windows Server 2003, click Start on the taskbar, point to Administrative Tools, and then click Computer Management.
- On Microsoft Windows XP, click Start on the taskbar, click Control Panel, click Administrative Tools, and then click Computer Management.
In the left pane, expand Services and Applications, and then select Message Queuing.
Right-click Private Queues, click New, and then click Private Queue.
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.
Under Private Queues, right-click the queue whose name you created in the previous step, and then click Properties.
Click the Security tab, and then click Add.
In the Select Users, Computers, or Groups dialog box:
- On Microsoft Windows Server 2003, enter NETWORK SERVICE, and then click OK.
- On Microsoft Windows XP, enter ASPNET, and then click OK.
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.
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
Click Start on the taskbar, point to All Programs, point to Microsoft Office Communications Server 2007 Speech Server, and then click Administrator Console.
In the left pane, expand Default, and then select Applications.
Right-click Applications, click New, and then click Application.
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.
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.
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.
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.
Click OK.
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)
Open Internet Information Services Manager:
- 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.
- On Microsoft Windows XP, click Start on the taskbar, click Control Panel, click Administrative Tools, and then click Internet Information Services.
In the left pane, expand ServerName, expand Web Sites, and then select Default Web Site.
Right-click Default Web Site, and then click Refresh.
If you expand Default Web Site, you should see an entry for ConcertsSansFrontieres.
Right-click ConcertsSansFrontieres, and then click Properties.
On the ConcertsSansFrontieres property page, click the Directory Security tab.
On the Authentication and access control pane, click Edit.
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.
Click OK.
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)
Open Internet Information Services Manager:
- On the Start menu, click Control Panel, and then double-click Administrative Tools.
- In Administrative Tools, double-click Internet Information Services (IIS) Manager.
- In User Account Control, click Continue.
In the left pane, expand ServerName, expand Web Sites, and then select Default Web Site.
Expand Default Web Site, and then select ConcertsSansFrontieres.
In the right pane, click the Features View tab.
In the right pane, double-click Authentication in the IIS group.
Right-click Anonymous Authentication, and then click Edit.
In the Edit Anonymous Authentication Credentials dialog box, click Specific user, and then click Set.
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.
Click OK.
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
Follow the previous steps for installing the application.
Verify that your speakers and microphone are properly adjusted for playback and recording.
In the Samples\Workflow\ConcertsSansFrontieres\ directory of the Speech Server installation directory, open ConcertsSansFrontieres.sln.
In Solution Explorer, right-click Solution 'ConcertsSansFrontieres' (4 projects), and then click Build Solution.
Press F5.
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
Follow the previous steps to start running the application.
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.
Click Start Recording, and then say "Ben Miller."
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.
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").
For each of your responses, when the recognized value appears in the Text Input text box, click Submit.
When Concerts asks "Which sport do you like?," click Start Recording, and then say "badminton."
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.
Click Start Recording, and then say "yes."
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.
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.