//notice
/*
* voiceui must implement following interface
* UpdateVoicePhoneState
*/
//VoiceUIClass constructor
function VoiceUIClass() {
}
//VoiceUIClass methods define
VoiceUIClass.prototype = {
UpdateVoicePhoneState: function () {
if (VoicePhoneState.GetVoiceTalkingState() === VOICE_PHONE_TALKING_STATE.VOICE_PHONE_TALKING) {
// document.getElementById("AgentAppDemo.PhoneStatus").innerHTML = "" + VoicePhoneState.GetRegisteredPhoneNumber() + ":" + "Talking-" + VoicePhoneState.GetCallingPhoneNumber() + "";
}
else if (VoicePhoneState.GetVoiceTalkingState() === VOICE_PHONE_TALKING_STATE.VOICE_PHONE_ALERTING) {
// document.getElementById("AgentAppDemo.PhoneStatus").innerHTML = "" + VoicePhoneState.GetRegisteredPhoneNumber() + ":" + "Alerting-" + VoicePhoneState.GetCallingPhoneNumber() + "";
// if (document.getElementById("AgentAppDemo.Voice.AutoPickup").checked){
// document.getElementById("AgentAppDemo.Voice.Answer").click();
// }
AgentAppDemoExcute('AnswerPhone');
}
else if (VoicePhoneState.GetVoiceTalkingState() === VOICE_PHONE_TALKING_STATE.VOICE_PHONE_RELEASED) {
if (VoicePhoneState.GetVoiceRegisterState() === VOICE_PHONE_REGISTER_STATE.VOICE_PHONE_UNREGISTERED) {
// document.getElementById("AgentAppDemo.PhoneStatus").innerHTML = "" + 'unregistered' + "";
}
else{
// document.getElementById("AgentAppDemo.PhoneStatus").innerHTML = "" + VoicePhoneState.GetRegisteredPhoneNumber() +":" + "registered" + "";
}
}
}
}