<% /****************************************************************************** * Copyright (c) 2000-2008 e-Deal * * e-Deal S.A. * 55 rue Brillat Savarin * 75013 Paris * France * * T: +33 (0)1 53 80 80 30 * F: +33 (0)1 73 01 69 77 * http://www.e-deal.com * * La diffusion de ce code source sous quelque forme que ce soit sans * l'autorisation de E-DEAL est interdite. * * Vous êtes autorisés à modifier ce code source uniquement pour votre usage * propre et sous réserve que les mentions de copyright demeurent intactes. * * Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou * implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour * responsable des dommages pouvant résulter de l'utilisation de ce code * source. * * ******************************************************************************/ %><%@page session="true" import="com.edeal.frontline.*,java.util.*"%><%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %><% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); String contextPath = (String) session.getAttribute("contextPath"); FlContext context = null; if (contextPath != null) { context = Frontline.getContext(contextPath); } else { context = Frontline.getContext(request.getContextPath()); } String strActID = (String)session.getAttribute("actorID"); ActorBean actBean; String actCCAProcGroup_; String actCCAPassword_; String actCCANumAgent_; try { actBean = new ActorBean(strActID, context); } catch (Exception e) { logger.error("Could not load this actor", e); actBean = null; } try { actCCAProcGroup_ = (String)actBean.getCustomProperty("ActCCAProcGroup_"); } catch (Exception e) { actCCAProcGroup_ = ""; } try { actCCAPassword_ = (String)actBean.getCustomProperty("ActCCAPassword_"); } catch (Exception e) { actCCAPassword_ = ""; } try { actCCANumAgent_ = (String)actBean.getCustomProperty("ActCCANumAgent_"); } catch (Exception e) { actCCANumAgent_ = ""; } %> var isWithdrawn = false; function doOnLoadCTI() { alert("Entered in cti_cca_js.jsp#doOnLoadCTI()..."); window.blur(); setTimeout(timeoutDoLogin, 5000); } function timeoutDoLogin() { alert("Entered in cti_cca_js.jsp#timeoutDoLogin()..."); CCA.logon('<%= actCCANumAgent_ %>', '<%= actCCAProcGroup_ %>', '<%= actCCAPassword_ %>'); } // If, for whatever reason, the CCACTI is closed, try and close the CTI popup window function doOnUnLoadCTI() { alert("Entered in cti_cca_js.jsp#doOnUnLoadCTI()..."); CCA.logoff('<%= actCCANumAgent_ %>', '<%= actCCAProcGroup_ %>', '<%= actCCAPassword_ %>'); try { var modulesWin = window.opener; modulesWin.logoffCTI(true); } catch (error) { } } //function doCallCTI(phone){ function doCallCTI(pPhone, pObj, pID){ alert("Entered in cti_cca_js.jsp#doCallCTI(pPhone=" + pPhone + ", pObj=" + pObj + ", pID=" + pID + ")"); //var formattedPhone = getPurePhone(phone); var formattedPhone = getPurePhone(pPhone); // For non-internal calls, we have to add '01' to get out.... if (formattedPhone.length != 5) { formattedPhone = '01' + formattedPhone; } CCA.makeCall(formattedPhone, ''); } function doAnswerCTI(pRef){ alert("Entered in cti_cca_js.jsp#doAnswerCTI(pRef=" + pRef + ")"); CCA.answerCall(); } //function doTransferCTI() { function doTransferCTI(pRef, pPhone) { alert("Entered in cti_cca_js.jsp#doTransferCTI(pRef=" + pRef + ", pPhone=" + pPhone + ")"); CCA.transferCall(); } function doReleaseCTI(pRef) { alert("Entered in cti_cca_js.jsp#doReleaseCTI(pRef=" + pRef + ")"); CCA.retrieveCall(); CCA.releaseCall(); } function doHoldCallCTI() { alert("Entered in cti_cca_js.jsp#doHoldCallCTI()"); return CCA.holdCall(); } function doRetrieveCallCTI() { alert("Entered in cti_cca_js.jsp#doRetrieveCallCTI()"); return CCA.retrieveCall(); } function doAlternateCallCTI() { alert("Entered in cti_cca_js.jsp#doAlternateCallCTI()"); return CCA.alternateCall(); } function doWithdraw(cause) { alert("Entered in cti_cca_js.jsp#doWithdraw(cause=" + cause + ")"); isWithdrawn = true; CCA.withdraw(cause); return true; //CCA.withdraw(cause); } function doWithdrawEnd() { alert("Entered in cti_cca_js.jsp#doWithdrawEnd()"); isWithdrawn = false; CCA.withdrawEnd(); //CCA.withdrawEnd(); return true; } function isActorWithdrawn() { alert("Entered in cti_cca_js.jsp#isActorWithdrawn()"); return isWithdrawn; } function doWrapUp() { alert("Entered in cti_cca_js.jsp#doWrapUp()"); CCA.wrapUp(); } function doWrapUpEnd() { alert("Entered in cti_cca_js.jsp#doWrapUpEnd()"); CCA.wrapUpEnd(); }