Compartir a través de


CallState Property

  Microsoft Speech Technologies Homepage

Gets the state of the current active call. Read-only.

Usage

Get value: String = CallInfo.CallState;
Set value: Read-only
Data type: String

Remarks

The CallState property gets the read-only variable CallState that is maintained by RunSpeech and used by the AnswerCall control to monitor the current state of the phone call. The CallState is always set to a member of the CallState enumeration.

For more information on CSTA standards, see Standard ECMA-269 (Services for Computer Supported Telecommunications Applications Phase III) and Standard ECMA-323 (XML Protocol for Computer Supported Telecommunications Applications Phase III).

Example

The following example demonstrates an OnClientConnected routine that uses the CurrentCall object to get properties of the call that has just been connected. In the OnClientConnected routine, these values are available as parameters, but other client-side routines can use the CurrentCall object to access any property of the CallInfo class. See Additional Client Scripting Elements for more information.

<script>
  function myClientConnected(obj, CallID, networkCallingDevice, networkCalledDevice) {
    LogMessage("", "Call has been Connected: " + 
      RunSpeech.CurrentCall().Get("MonitorCrossRefID") + " - " + 
      RunSpeech.CurrentCall().Get("CallState") + " - " + 
      RunSpeech.CurrentCall().Get("CallID") + " - " +
      RunSpeech.CurrentCall().Get("CalledDevice") + " - " +
      RunSpeech.CurrentCall().Get("CallingDevice") );
    return true;
  }
</script>
<form id="Form1" method="post" runat="server">
  ...
  <speech:AnswerCall runat="server"
    ID="AnswerCall1" 
    autopostback="True"
    CallState="0"
    OnClientConnected="myClientConnected"/>
  ...
</form>

See Also

CallInfo Class | CallInfo Constructor | CallInfo Members | CallInfo Properties | CallInfo Methods | CallInfo Remarks | CallInfo Client Object