F-9
Cisco Interactive Experience Client 4600 Series User Guide
Appendix F Video Conferencing Using the Session Initiation Protocol Client
SipPhone Widget
writeLog("sipphone.status = "+sipphone.status);
callInProgress = false;
sipbutton.disabled = false;
sipbutton.className="callButton";
sipbutton.innerHTML="Call";
sipStatus.innerHTML = "Ready";
sipTimer.className = "timerOff";
countDown(0);
writeLog('onDisconnected()');
}
var t1;
function onError(code, explanation){
writeLog("sipphone.status = "+sipphone.status);
callInProgress = false;
sipbutton.disabled = true;
sipbutton.className="callButton";
sipbutton.innerHTML="Call";
sipTimer.className = "timerOff";
countDown(0);
switch(code){
case 404:
sipStatus.innerHTML = "<span style='color:#ff0000;'>No answer</span>";
break;
case 401:
sipStatus.innerHTML = "<span style='color:#ff0000;'>Registration failed</span>";
break;
default:
sipStatus.innerHTML = "<span style='color:#ff6920;'>Error</span>";
break;
}
t1 = setTimeout(function(){
sipbutton.disabled = false;
sipStatus.innerHTML = "Ready";
}, 30000);
writeLog("onError() " + expla " (SIP code = " + code +")");
}
function makeCall(targetID){
writeLog("sipphone.status = "+sipphone.status);
sipbutton.disabled = true;
var uri = targetID ? targetID : sip_target;
uri = uri.indexOf("sip:")<0 ? "sip:" + uri : uri;
if(callInProgress){
callInProgress = false;
sipphone.hangup();
writeLog("hangup(); callInProgress = "+callInProgress);
} else {
callInProgress = true;
sipphone.call(uri);
writeLog("calling " + uri+" / callInProgress = "+callInProgress);
}
}
// For Timing to be shown
var sip_sec = 00; // set the seconds
var sip_min = 00; // set the minutes
var sip_hrs = 00; // set the Hours
var sip_OneSecond;
function countDown(flag){
var calltime;
if (flag) {
+;
if (sip_sec == 59) {
sip_sec = 00;
sip_min = s 1;
}