CallFailureReason Property
The CallFailureReason property indicates the last call failure reason error code.
Syntax
[long=] SiteKiosk.Plugins("SitePhone").CallFailureReason
|
Possible Values
Long value that retrieves the last call failure reason error code.
|
The property is read only.
Remarks
Possible status flags are:
CFR_UNKNOWN = -1;
CFR_MISC_ERROR = 0;
CFR_USER_DOES_NOT_EXIST = 1;
CFR_USER_IS_OFFLINE = 2;
CFR_NO_PROXY_FOUND = 3;
CFR_SESSION_TERMINATED = 4;
CFR_NO_COMMON_CODEC = 5;
CFR_SOUND_IO_ERROR = 6;
CFR_REMOTE_DEVICE_ERROR = 7;
CFR_BLOCKED_BY_RECIPIENT = 8;
CFR_RECIPIENT_NOT_FRIEND = 9;
CFR_NOT_AUTHORIZED_BY_RECIPIENT = 10;
CFR_SOUND_RECORDING_ERROR = 11;
Examples
The following example alerts the call failure reason.
<div id="CallState"></div>
<SCRIPT TYPE="text/javascript">
window.external.InitScriptInterface();
SitePhone = SiteKiosk.Plugins("SitePhone");
SitePhone.OnCallStateChanged = OnCallStateChanged;
var CS_FAILED = 3;
//...
var CFR_MISC_ERROR = 0;
var CFR_USER_DOES_NOT_EXIST = 1;
var CFR_USER_IS_OFFLINE = 2;
var CFR_NO_PROXY_FOUND = 3;
var CFR_SESSION_TERMINATED = 4;
var CFR_NO_COMMON_CODEC = 5;
var CFR_SOUND_IO_ERROR = 6;
var CFR_REMOTE_DEVICE_ERROR = 7;
var CFR_BLOCKED_BY_RECIPIENT = 8;
var CFR_RECIPIENT_NOT_FRIEND = 9;
var CFR_NOT_AUTHORIZED_BY_RECIPIENT = 10;
var CFR_SOUND_RECORDING_ERROR = 11;
function OnCallStateChanged()
{
switch (SitePhone.CallStatus)
{
case CS_FAILED:
switch (SitePhone.CallFailureReason)
{
case CFR_MISC_ERROR:
alert("Call failed: Misc error.");
break;
case CFR_USER_DOES_NOT_EXIST:
alert("Call failed: User does not exist.");
break;
case CFR_USER_IS_OFFLINE:
alert("Call failed: User is offline.");
break;
case CFR_NO_PROXY_FOUND:
alert("Call failed: No proxy found.");
break;
case CFR_SESSION_TERMINATED:
alert("Call failed: Session terminated.");
break;
case CFR_NO_COMMON_CODEC:
alert("Call failed: No common codec.");
break;
case CFR_SOUND_IO_ERROR:
alert("Call failed: Sound I/O error.");
break;
case CFR_REMOTE_DEVICE_ERROR:
alert("Call failed: Remote device error.");
break;
case CFR_BLOCKED_BY_RECIPIENT:
alert("Call failed: Blocked by recipient.");
break;
case CFR_RECIPIENT_NOT_FRIEND:
alert("Call failed: Recipient not friend.");
break;
case CFR_NOT_AUTHORIZED_BY_RECIPIENT:
alert("Call failed: Not authorized by recipient.");
break;
case CFR_SOUND_RECORDING_ERROR:
alert("Call failed: Sound recording error.");
break;
default:
alert("Call failed.");
}
break;
//...
}
}
</SCRIPT>
|
Applies to
SiteKiosk v7.0 (and later versions).
Back to top