CallStatus Property
The CallStatus property indicates the status of the current call.
Syntax
[long=] SiteKiosk.Plugins("SitePhone").CallStatus
|
Possible Values
Long value that retrieves the call status.
|
The property is read only.
Remarks
Possible status flags are:
CS_UNKNOWN = -1;
CS_UNPLACED = 0;
CS_ROUTING = 1;
CS_EARLY_MEDIA = 2;
CS_FAILED = 3;
CS_RINGING = 4;
CS_IN_PROGRESS = 5;
CS_ON_HOLD = 6;
CS_FINISHED = 7;
CS_MISSED = 8;
CS_REFUSED = 9;
CS_BUSY = 10;
CS_CANCELLED = 11;
CS_LOCAL_HOLD = 12;
CS_REMOTE_HOLD = 13;
CS_VOICEMAIL_BUFFERING_GREETING = 14;
CS_VOICEMAIL_PLAYING_GREETING = 15;
CS_VOICEMAIL_RECORDING = 16;
CS_VOICEMAIL_UPLOADING = 17;
CS_VOICEMAIL_SENT = 18;
CS_VOICEMAIL_CANCELLED = 19;
CS_VOICEMAIL_FAILED = 20;
CS_TRANSFERRING = 21;
CS_TRANSFERRED = 22;
CS_INCOMING = 24;
If you want to react when this property changed, you can use the OnCallStateChanged Event.
Examples
The following example keeps a HTML element containing the call state up to date.
<div id="CallState"></div>
<SCRIPT TYPE="text/javascript">
window.external.InitScriptInterface();
SitePhone = SiteKiosk.Plugins("SitePhone");
SitePhone.OnCallStateChanged = OnCallStateChanged;
var CS_UNPLACED = 0;
var CS_ROUTING = 1;
var CS_EARLY_MEDIA = 2;
var CS_FAILED = 3;
var CS_RINGING = 4;
var CS_IN_PROGRESS = 5;
var CS_ON_HOLD = 6;
var CS_FINISHED = 7;
var CS_MISSED = 8;
var CS_REFUSED = 9;
var CS_BUSY = 10;
var CS_CANCELLED = 11;
var CS_LOCAL_HOLD = 12;
var CS_REMOTE_HOLD = 13;
var CS_VOICEMAIL_BUFFERING_GREETING = 14;
var CS_VOICEMAIL_PLAYING_GREETING = 15;
var CS_VOICEMAIL_RECORDING = 16;
var CS_VOICEMAIL_UPLOADING = 17;
var CS_VOICEMAIL_SENT = 18;
var CS_VOICEMAIL_CANCELLED = 19;
var CS_VOICEMAIL_FAILED = 20;
var CS_TRANSFERRING = 21;
var CS_TRANSFERRED = 22;
var CS_INCOMING = 24;
function OnCallStateChanged()
{
switch (SitePhone.CallStatus)
{
case CS_ON_HOLD:
case CS_LOCAL_HOLD:
case CS_REMOTE_HOLD:
CallState.innerHTML = "Call on hold";
break;
case CS_ROUTING:
CallState.innerHTML = "Connecting...";
break;
case CS_RINGING:
CallState.innerHTML = "Ringing...";
break;
case CS_IN_PROGRESS:
CallState.innerHTML = "Call in progress";
case CS_FINISHED:
CallState.innerHTML = "Call finished";
break;
case CS_FAILED:
case CS_REFUSED:
case CS_MISSED:
CallState.innerHTML = "Connection problem";
break;
//...
}
}
</SCRIPT>
|
Applies to
SiteKiosk v7.5 (and later versions).
Back to top