Partilhar via


DisconnectCall Remarks

  Microsoft Speech Technologies Homepage

Disconnects a call using the Computer Supported Telecommunications Applications (CSTA) ClearConnection service.

Inherits from SmexMessageBase.

When the DisconnectCall control completes its operation successfully, the Speech Platform terminates the dialog and by default, closes the SALT interpreter without posting back to the server. To force a postback before the SALT interpreter closes, application authors can either set the control's AutoPostback property to True, or call the SpeechCommon.Submit method in its OnClientDisconnected event handler.

In general, application authors should use the DisconnectCall control to end the phone call in a speech application, and should ensure that application post-processing is complete before disconnecting. If authors close an application without disconnecting the call, the SALT interpreter will automatically disconnect the call through the TIM.

Preserving Call Information

The DisconnectCall control will not function properly if the CurrentCall object has not been initialized with the correct call information, or if the call information has been lost in a page transfer. Whenever possible, application authors should transfer to a new page by using SpeechCommon.Navigate or the Redirect method of the DisconnectCall control, both of which automatically persist call information across a page transfer. If it is necessary to use the Response.Redirect or window.navigate methods, authors must explicitly pass the call information to the new page using a query string, as shown in the following example.

"DeviceID=" + encodeURIComponent(RunSpeech.CurrentCall().Get("DeviceID")) + 
"&CallID=" + encodeURIComponent(RunSpeech.CurrentCall().Get("CallID")) + 
"&CallingDevice=" + encodeURIComponent(RunSpeech.CurrentCall().Get("CallingDevice")) + 
"&CalledDevice=" +  encodeURIComponent(RunSpeech.CurrentCall().Get("CalledDevice")) + 
"&MonitorCrossRefID=" + encodeURIComponent(RunSpeech.CurrentCall().Get("MonitorCrossRefID")) +
"&CallState=" + "Established"

CSTA

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).

See Also

DisconnectCall Class | DisconnectCall Constructor | DisconnectCall Members | DisconnectCall Properties | DisconnectCall Methods | DisconnectCall Events