<HTML>
<HEAD>
<TITLE>CCEAActiveX演示页面</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css">
<!--
body {
margin-top: 0px;
}
-->
</style></HEAD>
<SCRIPT FOR=CCEA1 EVENT="OnCallerTriggering(tritype, calltype, ani, dnis, reqskill, resskill, ivrdata, sessionid)">
OnCallerTriggering(tritype, calltype, ani, dnis, reqskill, resskill, ivrdata, sessionid);
</SCRIPT>
<SCRIPT FOR=CCEA1 EVENT="OnCallBackEventFunc(inevent, wparam, lparam)">
OnCallBackEventFunc(inevent, wparam, lparam);
</SCRIPT>
<script language=javascript> var outConnectFlag=0;
var SecondType,CallType,Ani,Dnis,ReqSkill,ResSkill,IvrData,SessionID;
function OnCallerTriggering (tritype, calltype, ani, dnis, reqskill, resskill, ivrdata, sessionid)
{ //alert("c");
//因为当外拨通话的时候会2次调用此函数,为了只产生一次做了如下的修改.
alert("tritype: "+tritype+" calltype:"+calltype+" ani:"+ani+" dnis:"+dnis+" reqskill:"+reqskill+" resskill:"+resskill+" ivrdata:"+ivrdata+" sessionid: "+sessionid);
SecondType=tritype;
CallType=calltype;
Ani=ani;
Dnis=dnis;
ReqSkill=reqskill;
ResSkill=resskill;
IvrData=ivrdata;
SessionID=sessionid;
//alert(a +"atritype: "+SecondType+" calltype:"+CallType+" ani:"+Ani+" dnis:"+Dnis+" reqskill:"+ReqSkill+" resskill:"+ResSkill+" ivrdata:"+IvrData+" sessionid: "+SessionID);
// if(outConnectFlag==0)
// {
// outConnectFlag=1;
// outConnected(ani ,dnis,sessionid);
// }
// alert(ani+" "+dnis); } function OnCallBackEventFunc(inevent, wparam, lparam)
{
// if(inevent==2)
// alert(inevent+" "+wparam+" "+lparam);
if(inevent==2)
{
switch(wparam)
{ case 0:
inRing(Ani ,Dnis,ReqSkill,IvrData,SessionID);
break;
case 1:
inConnected(Ani ,Dnis,ReqSkill,IvrData,SessionID);
break; case 22:
outRing();
break;
case 23:
outConnected(Ani ,Dnis,SessionID);
break;
case 3:
if(CallType==0)
inHangOff();
if(CallType==1)
outHangOff();
break;
} }
}
function inRing(Ani ,Dnis,ReqSkill,IvrData,SessionID)
{ //alert("呼入响铃主叫是:"+Ani+" 被叫是:"+Dnis+" 技能组:"+ReqSkill+" 随路数据:"+IvrData+" 录音sessionid:"+SessionID);
//业务处理... } function inConnected(Ani ,Dnis,ReqSkill,IvrData,SessionID)
{ alert("呼入通话,主叫是:"+Ani+" 被叫是:"+Dnis+" 技能组:"+ReqSkill+" 随路数据:"+IvrData+" 录音sessionid:"+SessionID);
//业务处理...
}
function inHangOff()
{ SecondType="";
CallType="";
Ani="";
Dnis="";
ReqSkill="";
ResSkill="";
IvrData="";
SessionID="";
alert("呼入挂断."); //业务处理... }
function outRing()
{
alert("外拨对方响铃......");
//业务处理... } function outConnected(ani,dnis,sessionid)
{
alert("外拨通话,被叫是:"+dnis+" 分机是:"+ani+" 录音sessionid:"+sessionid);
//业务处理...
}
function outHangOff()
{
SecondType="";
CallType="";
Ani="";
Dnis="";
ReqSkill="";
ResSkill="";
IvrData="";
SessionID="";
alert("外拨挂断.");
//业务处理... }
function agentLogin()
{
var agentID = document.all.txtAgentID.value;
alert(agentID);
var agentPassword = document.all.txtPassword.value;
alert(agentPassword);
CCEA1.AgentLogin(agentID,agentPassword,0,0);
}
function setAgentInfo()
{
var agentid = document.all.text1.value;
// alert(agentid);
var passwd = document.all.text2.value;
// alert(passwd);
var agentDN = document.all.text3.value;
//alert(agentDN);
var agentName = document.all.text11.value;
var strANI = document.all.text111.value;
CCEA1.setAgentInfo(agentid,passwd,agentDN,agentName,strANI);
}
function setANIDNIS()
{
var txtANI = document.all.text4.value;
var txtDNIS = document.all.text5.value; CCEA1.SetDialNumber(txtANI,txtDNIS);
}
function logout()
{
CCEA1.Logout();
}
function setBusy()
{
CCEA1.SetBusy();
}
function setReady()
{
CCEA1.SetReady();
}
function makecall()
{
var txtANI = document.all.txtANI.value;
var txtDNIS = document.all.txtDNIS.value;
CCEA1.MakeCall(txtANI, txtDNIS);
}
function consult()
{
var txtType = "CTIConsultType_DestDN";
var txtTarget = document.all.txtTarget.value;
CCEA1.SetConsult(txtType, txtTarget);
}
function IVRAss()
{
var ivrContent = "cont=abcde";
CCEA1.conferenceIVR(ivrContent);
}
function addBlackLists()
{
//添加黑名单
var ret = CCEA1.addBlackLists('123477', '13764053401','2010-02-19 00:00:00','2010-02-19 00:00:00');
alert(ret);
}
function addContactResult()
{
var ret = CCEA1.addContactResult('1234567','12345678','1234342','12121212','123');
alert(ret);
}
function getrecord()
{
//获取名单
var rtn = CCEA1.getrecord();
alert(rtn);
}
function getcampaigntype()
{
//获取活动类型
var rtn = CCEA1.getcampaigntype();
alert(rtn);
}
</script>
<BODY BGCOLOR=#ffffff>
<p> <table width="100%" border="0" align="center">
<tr>
<td>
<object id="CCEA1" name="CCEA1" classid="CLSID:6F82C754-6C31-43EA-9818-E95AD4E872FC" width=1025 height=99 align="left">
<param name="_Version" value="65536">
<param name="_ExtentX" value="3634">
<param name="_ExtentY" value="2752">
<param name="_StockProps" value="0">
</object></td>
</tr>
<tr>
<td>
<table>
<tr>
<td>工号<input type="Text" name="txtAgentID" id="txtAgentID"></td>
<td>密码<input type="Text" name="txtPassword" id="txtPassword"></td>
<td><input onClick="agentLogin()" id="Button_login" type="button" value="登 陆" name="Button_login"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td><input onClick="setReady()" id="Button3" type="button" value="置闲" name="Button3"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td><input onClick="setBusy()" id="Button24" type="button" value="置忙" name="Button24"></td>
<td></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td><input onClick="CCEA1.SetHold()" id="Button27" type="button" value="保持" name="Button27"></td>
<td></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td><input onClick="CCEA1.SetRetrieve()" id="Button29" type="button" value="接回" name="Button29"></td>
<td></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td>主叫<input type="Text" name="txtANI" id="txtANI"></td>
<td>被叫<input type="Text" name="txtDNIS" id="txtDNIS"></td>
<td><input onClick="makecall()" id="Button1" type="button" value="外 呼" name="Button1"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td>被叫<input type="Text" name="txtTarget" id="txtTarget"></td>
<td><input onClick="consult()" id="Button1" type="button" value="咨询" name="Button1"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td><input onClick="CCEA1.SetTransfer()" id="Button_Transfer" type="button" value="转移" name="Button_Transfer"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td><input onClick="IVRAss()" id="Button_IVRAss" type="button" value="IVR协助" name="Button_IVRAss"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td><input onClick="logout()" id="Button14" type="button" value="登出" name="Button14"></td>
<td></td>
</tr>
</table>
</td>
</tr>
<!--
<tr>
<td><input onClick="addBlackLists()" id="Button3" type="button" value="添加黑名单" name="Button3"></td>
<td><input onClick="getrecord()" id="Button23" type="button" value="添加业务结果" name="Button23"></td>
</tr> <tr>
<td colspans="4">
<table>
<tr>
<td><input onClick="getcampaigntype()" id="Button24" type="button" value="获取活动类型" name="Button24"></td>
<td><input onClick="getrecord()" id="Button25" type="button" value="获取名单" name="Button25"></td>
</tr>
</table>
</td>
</td>
<tr> </tr> <tr>
<td>
<table>
<tr>
<td>工号<input type="Text" name="text1" id="text1"></td>
<td>密码<input type="Text" name="text2" id="text2"></td>
<td>分机号<input type="Text" name="text3" id="text3"></td>
<td>姓名<input type="Text" name="text11" id="text11"></td>
<td>主叫<input type="Text" name="text111" id="text111"></td>
<td><input onClick="setAgentInfo()" id="Button3" type="button" value="设置座席信息" name="Button3"></td>
</tr>
</table>
</td>
</tr> <tr>
<td>
<table>
<tr>
<td>主叫<input type="Text" name="text4" id="text4"></td>
<td>被叫<input type="Text" name="text5" id="text5"></td>
<td><input onClick="setANIDNIS()" id="Button4" type="button" value="设置主叫被叫" name="Button4"></td>
<td></td>
</tr>
</table>
</td>
</tr>
-->
</table>
<p> </BODY>
</HTML>