Udostępnij za pośrednictwem


SupervisedTransfer (Managed Code Sample)

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 SupervisedTransfer sample application demonstrates how a voice response application can direct an inbound call to a different telephone number

Running the Sample

The SupervisedTransfer sample application uses a grammar that must be built before the application is built. It is essential that you build the grammar file before you attempt to build and run the sample application. Steps 1 through 4 of the following procedure describe how to build the grammar file.

To build the grammar and the application

  1. In the Samples\Workflow\SupervisedTransfer\ directory of the Speech Server installation directory, open the solution file, SupervisedTransfer.sln.

  2. In Solution Explorer, navigate to Grammars\SupervisedTransfer.gbuilder, and then double-click SupervisedTransfer.gbuilder.

  3. On the Conversational Grammar Builder toolbar, click Validate Grammar to validate the grammar.

  4. On the Conversational Grammar Builder toolbar, click Compile Language to compile the grammar.

    The resulting file is SupervisedTransfer_EN-US.cfg, located in the Grammars directory.

  5. In Solution Explorer, navigate to the top item in the list of files, right-click the solution file for the entire project, and then click Build Solution.

Before you run the sample application, make sure Speech Server is running. To do this, open the Speech Server Administrator Console. In the left pane, expand Speech Server (Local), expand Default, and then select Servers. The pane at the right shows the servers on which Speech Server is running.

To run the sample

  1. In the Samples\Workflow\SupervisedTransfer\ directory of the Speech Server installation directory, open the sample solution file.

  2. Press F5 to begin debugging.

  3. In the Voice Response Debugging Window dialog box, click the SIP Phone tab, enter any numbers in the Called Party and Calling Party boxes, and then click Call.

    The application gives a brief introduction and then asks for the name of the person you want to contact.

  4. Click Start Recording, and then say "Michelle."

    The names you can use are listed in the Extensions.xml data file, located in the Samples\Workflow\SupervisedTransfer\SupervisedTransfer\ directory of the Speech Server installation directory.

  5. When the recognized value appears in the Keyword Values box, click Submit.

    The application says "Please hold while I connect your call" and opens the Incoming Call Control dialog box.

  6. Click Answer.

    The application displays the Select active call dialog box.

  7. Click New session, and then click OK.

    The application says "Hello, this is Microsoft Office Communications Server Speech Server Auto Attendant. I have a call for you. Do you want to accept?"

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

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

    The application displays the Call transfer dialog box, with text that explains that the supervised call transfer is complete.

  10. Click OK to end the application.

Remarks

If the party to whom the call is directed refuses the call, the application plays a message to the original caller. In the debugging environment, only one telephony session can be active at a time. In this sample, the new telephony session overrides the original telephony session, so it is not possible to hear the speak request on the original telephony session.

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.