Partager via


LoggingInstrumentation (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 LoggingInstrumentation sample illustrates how to set the status of a workflow task to indicate success or failure. Speech Server Analytics and Tuning Studio can then be used to view task result reports. The sample application collects a digit from the caller and asks the caller to confirm the collected digit. If the caller confirms the digit, the application sets the workflow's task status to Success. If the caller rejects the confirmation or exceeds the maximum number of tries at either prompt, the application sets the workflow's task status to Failure. In each case, information about the task is sent to the trace log.

  • Use of dynamically created voice and dual tone multi-frequency (DTMF) grammars
  • Use of dynamically created prompts in the main prompt as well as in the silence and non-recognition prompts
  • Use of dialog activity event handlers to log task information
  • Use of a SetTaskStatusActivity
  • Use of an IfElseActivity
  • Explicit confirmation of a recognition
  • Use of a ConsecutiveNoInputsSpeechEventActivity

Running the Sample

To run the sample

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

  2. To start debugging, press F5.

  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.

Remarks

When a caller fails to provide valid input within three attempts, the ConsecutiveNoInputsSpeechEventActivity triggers an event.

By default, Speech Server produces event trace logs (ETL files), which can be found in the %ProgramFiles%\Office Communications Server 2007 Speech Server\Logs directory. The trace log data in the ETL files can be converted to text or imported into the tuning database.

To convert the trace log files to text, use the MssLogToText.exe command-line tool. For more information, see Log File Conversion to Text.

To import trace log data into the tuning database, use the MssLogToDatabase.exe command-line tool. For more information, see Import Log Files into the Tuning Database. The MssLogToText.exe and MssLogToDatabase.exe tools can be found in the SDK subdirectory of the Speech Server installation directory.

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.