ElementById("textServerPORT").value;
//本坐席软件的客户端编号,每一台电脑不能重复
SoftPhone.ClientID = document.getElementById("textClientId").value;
//以下参数调用控件的SeatLogin方法前需要进行设置
SoftPhone.ChType = 18;
SoftPhone.ChIndex = document.getElementById("textChIndex").value;
SoftPhone.SeatIP = "127.0.0.1";
SoftPhone.SeatNo = document.getElementById("textSeatNo").value;
//以下参数在调用控件的WorkerLogin方法前需要进行设置
SoftPhone.SeatType = 1;
SoftPhone.GroupNo = document.getElementById("textGroupNo").value;
SoftPhone.Level = 1;
SoftPhone.WClass = 1;
//连接交换机
SoftPhone.ConnectIVR();
//alert("连接CTI交换机");
}
//话务员注销函数
function WorkerLogout()
{
if(window.confirm("你确定现在注销座席吗?"))
{
SoftPhone.WorkerLogout();
}
}
//关闭窗口时话务员注销即退出;必须以适当方式进行引用
function window.onbeforeunload()
{
//alert("关闭窗口");
if(window.confirm("你确定现在注销座席吗?"))
{
SoftPhone.WorkerLogout();
window.alert("系统将注销座席并关闭窗口!");
}
else
{
//不做操作
}
}
//放音函数
function ocxPlay()
{
//alert(textFileName.value);
//textFileName.value="D:/recordfiles/04/R_803_20120420184711.wav";
if (document.getElementById("textFileName").value=="")
{
window.alert("录音文件名不允许为空!");
return;
}
SoftPhone.Play(document.getElementById("textFileName").value, 0);
}
//呼叫应答函数
function ocxAnswer()
{
SoftPhone.Answer(1);
}
//保持呼叫函数
function ocxHold()
{
//SoftPhone.SendFlwEvent(0,0,2,1,"0,0");
SoftPhone.Sethold(1);
}
//取消保持函数
function ocxUnHold()
{
//SoftPhone.SendFlwEvent(0,0,2,0,"0,0");
SoftPhone.Sethold(0);
}
//挂机函数
function ocxRelease()
{
SoftPhone.Hangon(1);
}
//话务员示忙函数
function ocxSetBusy()
{
SoftPhone.SetDisturb(1);
}
//话务员示闲函数
function ocxSetIdel()
{
SoftPhone.SetDisturb(0);
}
//取所有坐席状态
function GetSeatState()
{
SoftPh
one.GetState("1");
}
//取来电排队信息
function GetSeatACD()
{
SoftPhone.GetWaitQueue(1);
}
//停止取来电排队信息
function StopGetSeatACD()
{
SoftPhone.GetWaitQueue(0);
}
//发送消息
function ocxSendMsg()
{
if (document.getElementById("textSendSeatNo").value=="")
{
window.alert("对方座席分机号不允许为空!");
return;
}
if (document.getElementById("textSendMsg").value=="")
{
window.alert("消息内容不允许为空!");
return;
}
SoftPhone.SendMSG(document.getElementById("textSendSeatNo").value, document.getElementById("textSendMsg").value);
}
//呼叫外线函数
function ocxCallOut()
{
//SoftPhone.Callout(SoftPhone.SeatNo,"9"+textDialOut.value+"#", 1, 0,0,"");
SoftPhone.Callout(SoftPhone.SeatNo,"9"+document.getElementById("textDialOut").value+"#", 1, 1,0,"");
}
//转外线函数
function ocxTranOut()
{
//SoftPhone.SendFlwEvent(0,0,0,1,textDialOut.value);
SoftPhone.Tranout(document.getElementById("textDialOut").value);
}
//以会议方式转外线函数
function ocxConfTranOut()
{
//SoftPhone.SendFlwEvent(0,0,0,1,textDialOut.value);
//SoftPhone.Tranout(textDialOut.value);
SoftPhone.SendFlwEvent(0,0,0,1,document.getElementById("textDialOut").value);
}
//呼叫坐席函数
function ocxCallSeat()
{
SoftPhone.Callout(SoftPhone.SeatNo,document.getElementById("textDialSeatNo").value, 1, 0,0,"");
}
//转坐席函数
function ocxTranSeat()
{
//SoftPhone.