OnClientDelivered Property
Gets or sets the name of a client-side function that is called when the CSTA DELIVERED event is detected. Read/write.
Usage
ASP.NET markup: | <speech:AnswerCall OnClientDelivered="..." /> |
Get value: | String = AnswerCall.OnClientDelivered; |
Set value: | AnswerCall.OnClientDelivered = String; |
Data type: | String |
Required: | No |
Remarks
The value of the OnClientDelivered property is the name of this custom client-side script function, without parameters or parentheses. The client-side dialog manager calls this function, using the following syntax, when the call is connected.
The script block that contains this function should be placed before the control that calls the function. For more information, see "Placement of Script Blocks" in Authoring Notes.
Syntax
function FunctionName ( object sender , object cstaMessageDomObject )
{
// Client-side code referenced by AnswerCall.OnClientDelivered
}
Parameters
- sender
The client-side AnswerCall object. - cstaMessageDomObject
The Microsoft.SpeechServer.Dom.Results.Element object that contains the Smex message.
Return Value
None.
Example
The following example demonstrates an OnClientDelivered routine that uses the CurrentCall object to get CallID, CalledDevice and CallingDevice properties of the call that has just been connected. In the OnClientDelivered 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 myClientDelivered(obj, cstaMessageDomObject) {
LogMessage("", "Call has been Connected: " +
RunSpeech.CurrentCall().Get("MonitorCrossRefID") + " - " +
RunSpeech.CurrentCall().Get("DeviceID") + " - " +
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"
DeviceID="0"
OnClientDelivered="myClientDelivered"/>
...
</form>
See Also
AnswerCall Class | AnswerCall Constructor | AnswerCall Members | AnswerCall Properties | AnswerCall Methods | AnswerCall Events | AnswerCall Remarks