java-cti

fanyuanwaifdl 2012-05-21 02:18:35
RT
这方面的一般都是c来操作~在java中一般的callcenter都会给个html页面来操作
不知道有没有用java来操作cti服务~请大家畅所欲言

。。。。期待大家的赐教~ 我也会不惜+分
...全文
223 19 打赏 收藏 转发到动态 举报
写回复
用AI写文章
19 条回复
切换为时间正序
请发表友善的回复…
发表回复
zh2nn 2013-04-22
  • 打赏
  • 举报
回复
楼主你好我也遇到你这样的问题能否请教你一下这是我的QQ号1124220602
MiceRice 2012-05-30
  • 打赏
  • 举报
回复
你要先看看电话的种类,比如有不少地方用的是数字电话,直接就可以连接上CTI系统(注册);如果简易处理的话,仅就这个电话,就已经能完成整个话务功能了(摘机、转呼、示忙、示闲等)。

而用了座席系统后,主要是需要设法把座席端也注册到CTI系统上,并将电话跟座席端配对绑定;具体做法有多种,直接绑IP或MAC的都有。

整个话务的中央控实际上都是CTI在负责的。
fanyuanwaifdl 2012-05-29
  • 打赏
  • 举报
回复
[Quote=引用 16 楼 的回复:]

刷新所导致的主要问题不是信息丢失的问题,而是长连接断掉引发的其它问题。

OCX其实相当于是个CTI的客户端,会跟CTI保持长连接。相当于该客服“在线”,CTI就可以随时向OCX发出各种指令,比如:振铃、弹屏啥的。OCX也可以随时向CTI汇报状态,或通过CTI控制话机等,比如:摘机、转呼、示忙、示闲啥的。
[/Quote]客户以前使用的貌似也是用的页面控制~ 奇怪就没什么问题;我怀疑他们是不需要登录就可以电话过来!可不明白怎么知道分发到那个坐席上的~电话号码又怎么到程序中的~
qybao 2012-05-22
  • 打赏
  • 举报
回复
看LZ基本上都是用javascrip脚本,可以试试用ajax跟后台服务通信
TommyWu01 2012-05-22
  • 打赏
  • 举报
回复
看晕了
brightyq 2012-05-22
  • 打赏
  • 举报
回复
cti好像就在国内做一些,国外不怎么做这东西?
国外不做的,也就不太能有多少支持它的技术了。
桃园闲人 2012-05-22
  • 打赏
  • 举报
回复
饿的神也!。这么多代码,看晕了!你还是截个图说明一下,然后说说你要实现什么效果吧。
fanyuanwaifdl 2012-05-22
  • 打赏
  • 举报
回复
    switch (EventCode) {
case 0: //显示信息
//strDisp = "EventCode=" + EventCode + ",EventData=" + EventData;
//document.frmDemo.txtOcxInfo.value=strDisp;
break;
case 1: //1:表示座席员状态发生变化

document.ut_atocx.UidSelected=myUid;
myStatus=document.ut_atocx.UidCall_Status;
mySeatStatus=document.ut_atocx.UidStatus;//UidStatus=05座席被选中

if(mySeatStatus=="05")
{
if(myStatus=="01" && EventData==myUid)
{
intrvl=0;
for(nTimes=0;nTimes<2;nTimes++)
{
intrvl += 1000;
setTimeout("document.getElementById('AgentCk').style.backgroundColor=('red');",intrvl);
intrvl += 1000;
setTimeout("document.getElementById('AgentCk').style.backgroundColor=('ButtonFace');",intrvl);
}

}
}

switch (myStatus) {
case "01":
strStatus = " 空闲 ";
caller = "";
called = "";
document.frmDemo.txtOcxInfo.value="";
break;
case "02":
strStatus = " 摘机 ";
caller = document.ut_atocx.UidCall_Caller;
called = document.ut_atocx.UidCall_Called;
callid = document.ut_atocx.UidCall_CallId;
document.frmDemo.txtOcxInfo.value="状态="+strStatus+";主叫="+caller+";被叫="+called+";呼叫编号="+callid;
break;
case "03":
strStatus = " 振铃 ";
caller = document.ut_atocx.UidCall_Caller;
called = document.ut_atocx.UidCall_Called;
callid = document.ut_atocx.UidCall_CallId;
document.frmDemo.txtOcxInfo.value="状态="+strStatus+";主叫="+caller+";被叫="+called+";呼叫编号="+callid;
break;
case "04":
strStatus = " 回铃 ";
caller = document.ut_atocx.UidCall_Caller;
called = document.ut_atocx.UidCall_Called;
callid = document.ut_atocx.UidCall_CallId;
document.frmDemo.txtOcxInfo.value="状态="+strStatus+";主叫="+caller+";被叫="+called+";呼叫编号="+callid;
break;
case "05":
strStatus = " 连接 ";
var dir_value = document.ut_atocx.ExtDirection();
caller = document.ut_atocx.UidCall_Caller;
called = document.ut_atocx.UidCall_Called;
callid = document.ut_atocx.UidCall_CallId;
document.frmDemo.txtOcxInfo.value="状态="+strStatus+";主叫="+caller+";被叫="+called+";呼叫编号="+callid+";呼叫方向="+dir_value;
break;
case "06":
strStatus = " 断开 ";
pSeat=0;
document.frmDemo.txtOcxInfo.value="";
break;
case "07":
strStatus = " 其他 ";
break;
case "08":
strStatus = " 转移 ";
break;
default:
strStatus = " 未知 ";
break;
}
break;
case 2: //表示座席员呼叫状态发生变化,EventData 表示座席员工号
break;
case 3: //3:表示外线状态发生变化,EventData 表示外线号码

break;
case 5: //5:表示其它座席传来消息,EventData 表示消息内容

break;
case 6: //6:表示有用户呼入信息:应用程序依靠此消息弹出用户资料,EventData 表示分机号
caller = document.ut_atocx.UidCall_Caller;
window.open("Popup.htm?caller="+caller,"_blank","left = 0,top=0,width = 200,height =

200,scrollbars=yes,toolbar=yes,menubar=yes,location=yes,resizable=no,status=yes");
break;
}
}


//-->
</script>

<script language="javascript" event="onReceiveCTIEventChanged(sender,EventCode,EventData)" for="ut_atocx">
<!--
ut_atocx_ATMsgEvent(sender,EventCode,EventData);
//-->
</script>


<style type="text/css">
#Text1
{
height: 433px;
width: 770px;
}
#txtOcxInfo
{
height: 437px;
width: 772px;
}
.style1
{
width: 107px;
font-size: x-small;
}
.style2
{
width: 156px;
}
.style3
{
width: 171px;
}
.style4
{
width: 79px;
font-size: x-small;
}
.style5
{
font-size: x-small;
}
.style6
{
font-size: x-small;
font-weight: bold;
}
.style7
{
font-size: large;
}
</style>


</head>
<body>
<form name="frmDemo" id="frmDemo" action="">
<table width="764" height="653">
<tr>
<td height="30" valign="top"> <div align="center" class="style7">呼叫中心v400版ATClient.OCX控件演示 </div></td>
</tr>
<tr>
<td height="19" valign="top"> <span class="style6">设置CTI服务器</span> </td>
</tr>
<tr>
<td height="28"><table style="width: 563px">
<tr>
<td class="style2"> <span class="style5">CTI服务器地址:</span> </td>
<td class="style3"><input type="text" name="txtIP" value="168.168.1.56" size="20" /></td>
<td width="102"><input name="btnConnect" onclick="Connect_CTI()" type="button" value="连接CTI服务器" /></td>
<td width="141"><input name="btnDisConnect" onclick ="DisConnect_CTI()" type="button" value="断开CTI服务器" /></td>
</tr>
</table> </td>
</tr>
<tr>
<td height="21"> <span class="style6">坐席登录</span> </td>

</tr>
<tr>
<td height="32" valign="top"><table style="width: 776px">
<tr>
<td class="style1">坐席员工号:</td>
<td width="143"><input type="text" name="txtOPID" value="8005" size="20" /></td>
<td width="53" class="style5">密 码:</td>
<td width="91"><input type="text" name="txtPassword" value='1' size='12' /></td>
<td class="style4">分机号:</td>
<td width="97"><input type="text" name="txtExt" value='8005' size='12' /></td>
<td width="81"><input name="btnLogin" onclick="client_login()" type="button" value="座席登入" /></td>
<td width="107"><input name="btnLogout" onclick="client_logout()" type="button" value="座席登出" /></td>
</tr>
</table></td>
</tr>
<tr>
<td height="23" valign="top"><table width="284">
<tr>
<td><input type="text" name="txtTel" value='' size='12' /></td>
<td><input name="btnPlaceCall" onclick="Tel_PlaceCall()" type="button" value="呼叫电话"/></td>
<td><input name="btnHoldCall" onclick="Tel_HoldCall()" type="button" value="保持呼叫"/></td>
<td><input name="btnRetrCall" onclick="Tel_RetrCall()" type="button" value="恢复呼叫"/></td>
<td><input name="btnSetBusy" onclick="Tel_SetBusy()" type="button" value="座席置忙"/></td>
<td><input name="btnSetNoBusy" onclick="Tel_SetNoBusy()" type="button" value="取消置忙"/></td>
<td><input name="btnAfterWorking" onclick="Tel_AfterWorking()" type="button" value="事后处理"/></td>
<td><input name="btnNoAfterWorking" onclick="Tel_NoAfterWorking()" type="button" value="取消事后处理"/></td>
<td><input name="btnPickup" onclick="Tel_Pickup()" type="button" value="摘机"/></td>
<td><input name="btnHangup" onclick="Tel_Hangup()" type="button" value="挂机"/></td>
</tr>
</table></td>
</tr>
<tr>
<td height="23" valign="top"><table width="284">
<tr>
<td> <input name="AgentCk" id="AgentCk"
type="button" value="坐席被选中提示" /></td>
<td><input name="btnSetLeave" onclick="Tel_SetLeave()" type="button" value="座席离席"/></td>
<td><input name="btnSetNoLeavel" onclick="Tel_SetNoLeave()" type="button" value="取消离席"/></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="31" valign="top"><table width="614">
<tr>
<td width="81"><input name="btnTransCall" onClick="Tel_TransCall()" type="button" value="转接电话到"/></td>
<td width="84"><input type="text" name="txtTranTel" value='' size='12' /></td>
<td width="81"><input name="btnConference" onClick="Tel_Con()" type="button" value="建立内线会议"/></td>
<td width="84"><input type="text" name="txtConfTel" value='' size='12' /></td>
<td width="89"><input name="btnTranIvr" onClick="Tel_TransIVR()" type="button" value="转入IVR流程"/></td>
<td width="167"><input type="text" name="txtIvrFlow" value='' size='20' /></td>
<td width="167"><input type="text" name="txtIvrNode" value='' size='5' /></td>
</tr>
</table></td>
</tr>
<tr>
<td width="244" height="438" valign="top">
<input name="txtOcxInfo" value='' type="text" size='20'
style="height: 432px; width: 774px"/></td>
</tr>
</table>

</form>

</body>
</html>
fanyuanwaifdl 2012-05-22
  • 打赏
  • 举报
回复
先将html操作ocx插件的方式贴上~

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta content="text/html; charset=gb2312" http-equiv="Content-Type"/>
<title>ATOCX 通用控件演示</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<OBJECT id="ut_atocx" style="VISIBILITY: hidden" height="1" width="1" classid="clsid:990B8AEB-48C9-4099-A43F-EEC361843F18">
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="26">
<PARAM NAME="_ExtentY" VALUE="26">
<PARAM NAME="_StockProps" VALUE="0">
</OBJECT>

<script type="text/javascript" language="JavaScript">
<!--

var isConnect_CTI = 0;
var myUid,myPwd,myExt,myGroup="0",myStatus=0,mySeatStatus=0;
var callid;
var pSeat=0;//标识座席是否已经被选中
var htm_str = new Array();

var i=0;


// 控件处理函数
//连接CTI服务器
function Connect_CTI()
{
var strIP;
strIP=document.frmDemo.txtIP.value;
document.ut_atocx.ATConnect(strIP,1589);
alert('连接成功!');
return true;
}
//断开与CTI服务器的连接
function DisConnect_CTI()
{
document.ut_atocx.ATDisconnect();
return false;
}
//坐席靠工号登录
function client_login()
{
myUid=document.frmDemo.txtOPID.value;
myPwd = document.frmDemo.txtPassword.value;
if (myPwd == "") myPwd = "";
myExt=document.frmDemo.txtExt.value;
document.ut_atocx.ATLogin(myUid,myPwd,myExt,"0"); //工号,密码,分机号
var Result = document.ut_atocx.ATCommandResult(); //获取登录结果
if(Result == "OK")
{
isConnect_CTI=1;
alert("连接成功!");

}
else if (Result == "ERROR_UID")
{
alert("Local:登录失败,请检查工号是否正确!");
}
else if (Result == "ERROR_PWD")
{
alert("Local:登录失败,请检查密码是否正确!");
}
else if (Result == "ERROR_REP")
{
alert("Local:对不起,该帐号正在使用!");
}
else if (Result == "FAIL")
{
alert("Local:登录失败,请检查工号或密码是否正确!");
}
else if (Result == "ERROR_EXT_USED")
{
alert("Local:登录失败,分机已被使用!");
}
else
{
alert("Local:登录失败,请检查 CTI Server 是否运行正常!");
}
document.frmDemo.txtOcxInfo.value = Result;
//return false;
}
//坐席退出登录
function client_logout()
{
document.ut_atocx.ATLogout(myUid);
document.ut_atocx.ATDisconnect();
alert("坐席成功退出");
return false;
}


//电话操作部分
//发起呼叫
function Tel_PlaceCall()
{
var strTelnum;
if (document.frmDemo.txtTel.value=="")
{
alert("被叫号码不能为空!");
return false;
}
if (isConnect_CTI==0)
{
alert("请先连接CTI服务器!");
return false;
}
strTelnum=document.frmDemo.txtTel.value
document.ut_atocx.ATPlaceCall(myUid,strTelnum);//工号,要呼叫的电话号码
return true;
}
//保持呼叫,让对方听音乐
function Tel_HoldCall()
{
if (isConnect_CTI==0)
{
alert("请先连接CTI服务器!");
return false;
}
document.ut_atocx.ATHoldCall(myUid);
return true;
}
//恢复呼叫
function Tel_RetrCall()
{
if (isConnect_CTI==0)
{
alert("请先连接CTI服务器!");
return false;
}
document.ut_atocx.ATRetriveCall(myUid,"");
return true;
}
//座席置忙,因暂时离开座位或处理别的事情而不想接电话
function Tel_SetBusy()
{
if (isConnect_CTI==0)
{
alert("请先连接CTI服务器!");
return false;
}
document.ut_atocx.ATSetBusy(myUid,1,"");
return true;
}
//取消置忙
function Tel_SetNoBusy()
{
if (isConnect_CTI==0)
{
alert("请先连接CTI服务器!");
return false;
}
document.ut_atocx.ATSetBusy(myUid,0,"");
return true;

}

//座席离席
function Tel_SetLeave()
{
if (isConnect_CTI==0)
{
alert("请先连接CTI服务器!");
return false;
}
document.ut_atocx.ATSetLeaveSeat(myUid,1,"");
return true;
}
//取消离席
function Tel_SetNoLeave()
{
if (isConnect_CTI==0)
{
alert("请先连接CTI服务器!");
return false;
}
document.ut_atocx.ATSetLeaveSeat(myUid,0,"");
return true;

}

//事后处理,同坐席置忙
function Tel_AfterWorking()
{
if (isConnect_CTI==0)
{
alert("请先连接CTI服务器!");
return false;
}
document.ut_atocx.ATSetAfterWorking(myUid,1,"");
}
//取消事后处理
function Tel_NoAfterWorking()
{
if (isConnect_CTI==0)
{
alert("请先连接CTI服务器!");
return false;
}
document.ut_atocx.ATSetAfterWorking(myUid,0,"");
}
//转接电话,将电话转到别的坐席
function Tel_TransCall()
{
if (isConnect_CTI==0)
{
alert("请先连接CTI服务器!");
return false;
}
if (document.frmDemo.txtTranTel.value=="")
{
alert("请输入要转接的座席号码!");
return false;
}
strDestSeatid=document.frmDemo.txtTranTel.value;
document.ut_atocx.ATTranCall(myExt, strDestSeatid);//myExt本坐席的分机号,strDestSeatid要转的目的分机号
return true;
}
//建立内线会议,正在通话的时候,要把其他某一个坐席邀请入通话中
function Tel_Con()
{
if (isConnect_CTI==0)
{
alert("请先连接CTI服务器!");
return false;
}
if(document.frmDemo.txtConfTel.value != "")
{
strDestSeatid=document.frmDemo.txtConfTel.value;
document.ut_atocx.ATConf_est(myExt ,strDestSeatid);//myExt本坐席的分机号 ,strDestSeatid邀请的目的分机号
return true;
}
alert("请输入要开会的座席序号!");
return false;
}
//转ivr,满意度调查的时候用
function Tel_TransIVR()
{
var caller, called, callid;
var strNowStatus;
if (isConnect_CTI==0)
{
alert("请先连接CTI服务器!");
return false;
}
if (document.frmDemo.txtIvrFlow.value=="")
{
alert("请输入流程文件名!");
return false;
}
var strFlowFile=document.frmDemo.txtIvrFlow.value;
if (document.frmDemo.txtIvrNode.value=="")
{
alert("请输入流程文件节点!");
return false;
}
var strIVRNode=document.frmDemo.txtIvrNode.value
document.ut_atocx.UidSelected=myUid;
strNowStatus=document.ut_atocx.UidCall_Status;
if(strNowStatus=="05") //这里先判断座席电话是否处于连接中,否则不进入
{
caller = document.ut_atocx.UidCall_Caller;
called = document.ut_atocx.UidCall_Called;
callid = document.ut_atocx.UidCall_CallId;
var strIVRInfo = caller + "|" + called + "|" + callid;
tranivr = "AC_SWITCHIVR;EXT=" + myExt + ";IVRFILE=" + strFlowFile + ";NODE=" + strIVRNode + ";IVRMSG="+strIVRInfo+";";
ret=document.ut_atocx.ATTranCall_toIVR(myUid,0,"",tranivr);
if(ret==1)//1:转接IVR成功 其他:失败
{
return;
}
else
{
MessageBox.Show("IVR端口全忙,转接失败!");
}
return;
}
else
alert("座席必须在通话状态才能转IVR!");
}
//软摘机
function Tel_Pickup()
{
if (isConnect_CTI==0)
{
alert("请先连接CTI服务器!");
return false;
}
document.ut_atocx.ATAnswer(myUid,callid);
return true;
}
//软挂机
function Tel_Hangup()
{
if (isConnect_CTI==0)
{
alert("请先连接CTI服务器!");
return false;
}
document.ut_atocx.ATHangup(myUid,callid);
return true;
}
//控件消息
function ut_atocx_ATMsgEvent(sender, EventCode, EventData)
{
var caller, called, call_trunk;
var monitor_form_is_on = true;
caller = "";
called = "";
call_trunk = "";
var seat_status;

var strDisp, strPrompt;
var caller_code, ext_code, in_out_call;
var strStatus, lbl_name;
var rc;

fanyuanwaifdl 2012-05-22
  • 打赏
  • 举报
回复
好冷门啊
MiceRice 2012-05-22
  • 打赏
  • 举报
回复
刷新所导致的主要问题不是信息丢失的问题,而是长连接断掉引发的其它问题。

OCX其实相当于是个CTI的客户端,会跟CTI保持长连接。相当于该客服“在线”,CTI就可以随时向OCX发出各种指令,比如:振铃、弹屏啥的。OCX也可以随时向CTI汇报状态,或通过CTI控制话机等,比如:摘机、转呼、示忙、示闲啥的。
dracularking 2012-05-22
  • 打赏
  • 举报
回复
关注一下,我觉得刷不刷新应该属于可控的用户自担责任范围内的问题,就像打电话时不会把用户是否会按到挂机键当成一个问题一样。当然尽可能多地提供避免这种可能的措施也未尝不可。

如果只是采用内嵌控件于浏览器页面的方式,刷新后控件重新加载就会初始化,后加载的信息就会丢失,刷新就相当于重新访问URL,如果要让其免于初始化,我觉得可能会和浏览器的整体运作机制相矛盾。
qybao 2012-05-22
  • 打赏
  • 举报
回复
[Quote=引用 12 楼 的回复:]
引用 11 楼 的回复:

搞过J2EE和CTI集成。

很好奇你的需求场景,一般来说,用HTML跟CTI的OCX软电话控件进行集成,是比较流行的做法。振铃、摘机、弹屏这系列过程对于座席系统来说都比较容易实现,你为什么需要直接用Java来跟CTI集成呢?

这样用的时候存在登录问题~ 等页面一跳转或者刷新后~ 连接就断了~ 不知道这里怎么处理的
[/Quote]
ocx在前台,刷新页面肯定就重新load ocx了(除非是部分刷新页面而不是整体刷新)
一种做法,可以让通话状态下不允许用户迁移页面,
一种做法,把ocx做在其他浮动页面
MiceRice 2012-05-22
  • 打赏
  • 举报
回复
我们的做法是:CTI插件放在外框架中,内页(IFrame)才会发生页面跳转之类的操作。当然也会有担心,主要用户如果按了F5,就比较SB了,所以禁用了F5刷新。

之前也考虑过用Java进行集成,而且某些大品牌的CTI系统也提供Java远程接口,但也碰到了些问题,主要是浏览器与中间件之间不保持常连接的话,那么有些功能就存在限制:
◎ 振铃,只能在话机上振;没法振屏或直接弹屏;
◎ 摘机,这个要点屏幕的按钮;如果是直接摘机(接听),那电话接通后CTI没法通知浏览器弹屏;

如果浏览器跟中间件保持长连接,那么开发起来也比较复杂;而且中间件还要跟CTI继续保持长连接。


总的来说,厂商(接触过阿尔卡特和华为)基本都是建议直接页面嵌控件来搞。
fanyuanwaifdl 2012-05-22
  • 打赏
  • 举报
回复
[Quote=引用 11 楼 的回复:]

搞过J2EE和CTI集成。

很好奇你的需求场景,一般来说,用HTML跟CTI的OCX软电话控件进行集成,是比较流行的做法。振铃、摘机、弹屏这系列过程对于座席系统来说都比较容易实现,你为什么需要直接用Java来跟CTI集成呢?
[/Quote]
这样用的时候存在登录问题~ 等页面一跳转或者刷新后~ 连接就断了~ 不知道这里怎么处理的
MiceRice 2012-05-22
  • 打赏
  • 举报
回复
搞过J2EE和CTI集成。

很好奇你的需求场景,一般来说,用HTML跟CTI的OCX软电话控件进行集成,是比较流行的做法。振铃、摘机、弹屏这系列过程对于座席系统来说都比较容易实现,你为什么需要直接用Java来跟CTI集成呢?

  • 打赏
  • 举报
回复
楼主牛啊,我都没听过 顶楼主

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧