MakeCallActivity Class

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.

Makes an outbound telephone call.

Namespace: Microsoft.SpeechServer.Dialog
Assembly: Microsoft.SpeechServer (in microsoft.speechserver.dll)

Syntax

'Declaration
<GlobalizedCategoryAttribute("MSSCategory")> _
<DesignerAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.SpeechSimpleDesigner, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", GetType(IDesigner))> _
<GlobalizedDescriptionAttribute("MakeCallActivity")> _
<ToolboxBitmapAttribute(GetType(MakeCallActivity))> _
<ActivityValidatorAttribute(GetType(MakeCallActivityValidator))> _
Public NotInheritable Class MakeCallActivity
    Inherits Activity
[GlobalizedCategoryAttribute("MSSCategory")] 
[DesignerAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.SpeechSimpleDesigner, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", typeof(IDesigner))] 
[GlobalizedDescriptionAttribute("MakeCallActivity")] 
[ToolboxBitmapAttribute(typeof(MakeCallActivity))] 
[ActivityValidatorAttribute(typeof(MakeCallActivityValidator))] 
public sealed class MakeCallActivity : Activity

Remarks

MakeCallActivity makes a call to the number in CalledParty from the number in CallingParty. If the call is to a telephone number, ProxyName must be null or empty. If the call is to a SIP URI, ProxyName must be set with a valid value.

Inheritance Hierarchy

System.Object
???? System.Workflow.ComponentModel.DependencyObject
???????? System.Workflow.ComponentModel.Activity
????????????Microsoft.SpeechServer.Dialog.MakeCallActivity

Example

The following code example shows how you can determine the status (such as busy, ringing, and declined) of a call made by MakeCallActivity by using the response codes and associated response text that are written to the log file. The method presented here is the global fault-handling method that is contained in the template for speech workflow applications. This method catches any exception that is not caught by an author-written fault handler operating at a more local scope.

The following is a typical errorMessage string logged by this method:

"A Sip request has failed. The current operation is 'Opening'. The session state is 'Connecting'. The remote participant is 'sip:1234@taptest1:4923'. The response code was '603'. The response text was 'Decline'."

private void HandleGeneralFault(object sender, EventArgs e)
{
  // The fault property is read-only. When an exception is thrown the 
  // actual exception is stored in this property. Check this value for 
  // error information.
  string errorMessage = this.generalFaultHandler.Fault.Message;

  if(Debugger.IsAttached)
  {
  // If the debugger is attached, break here
  // so that you can see the error that occurred.
  // (Check the errorMessage variable above.)
    Debugger.Break();
  }
  // Write the error to both the NT Event Log and the .etl file,
  //so that some record is kept even if the debugger is not attached.
  TelephonySession.LoggingManager.LogApplicationError(
             50000,  // An event id, chosen arbitrarily.
                     // Speech Server uses various IDs below 50000, so you should 
                     // use IDs of 50000 or larger to avoid overlap.
             "An exception occurred in the Speech workflow with ID " +
             this.WorkflowInstanceId +
            ". The exception was:\n" +
            this.generalFaultHandler.Fault);

  // Dump a detailed version of the most recent Speech Server logs to the .etl file
  // The Administrator Console has the current Speech Server logging settings, 
  // including the location of this file.
  this.TelephonySession.LoggingManager.DumpTargetedLogs();
}

Thread Safety

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

Platforms

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

Windows Server 2003

See Also

Reference

MakeCallActivity Members
Microsoft.SpeechServer.Dialog Namespace