UNPKG

fcc-core

Version:

Fusion communication center.

302 lines (300 loc) 8.18 kB
export default { // 示闲成功 AgentState_Ready () { return 'OnSayFreeSuccess' }, // 静音事件 AgentState_Mute () { return 'OnBeginMuteUserSuccess' }, // 进入工作态 AgentState_SetWork_Success () {}, // 静音失败事件 AgentState_MuteUserFailure () {}, // 结束静音成功 AgentState_EndMute () { return 'OnEndMuteUserSuccess' }, // 结束静音失败 AgentState_EndMuteFailure () {}, // 签入成功 AgentOther_InService () { return 'OnSignInSuccess' }, // 签出成功 AgentOther_ShutdownService () { if (this.client) { // this.client.disconnect() this.client.close() } return 'OnSignOutSuccess' }, // 主备倒换 AgentGateway_WasSwaped () {}, // 保持成功 AgentEvent_Hold () { return 'OnHoldSuccess' }, // 座席物理话机振铃 AgentOther_PhoneAlerting () { return 'OnPhoneAlerting' }, // 座席来电呼叫信息通知事件 AgentEvent_Incoming_CallInfo () { return 'onCallInfo' }, // 签入失败 OnSignInFailure () {}, AgentEvent_ControlWindow_Notify () {}, // 物理话机摘机 AgentOther_PhoneOffhook () { return 'OnPhoneOffhook' }, /** * 座席来电提醒,提醒用户需要手工应答呼叫。 * 自动应答无该事件 * @returns {string} * @constructor */ AgentEvent_Ringing () { return 'OnAnswerRequest' }, // 对方振铃 AgentEvent_Customer_Alerting () { return 'OnCustomerAlerting' }, AgentEvent_ReleaseResponse () {}, /** * 物理话机挂断表示 坐席真的结束了会话 * @constructor */ AgentOther_PhoneRelease () { return 'OnReleaseSuccess' }, // 示闲失败 AgentState_Ready_Failure () {}, // 进入工作态 AgentState_Work () { return 'OnEnterWorkSuccess' }, /** * 触发场景 * 1.外呼 * 2.呼叫应答---手动应答 * 3.内部呼叫 * 4.话机联动应答 * 5.内部求助--两方求助 * 6.取消保持 * 7.取消转移 * 8.呼叫代答 * 9.内部呼叫技能队列 * @returns {string} * @constructor */ AgentEvent_Talking () { const type = this.ucc.transType // 保持中外呼 if (type === '16' || type === '1') { return 'OnCallOutSuccess' } if (this.ucc.isHold) { return 'OnGetHoldSuccess' } if (type && type * 1 <= 14) { return null } return 'OnAnswerSuccess' }, /** * 取保持成功 * @constructor */ AgentEvent_Un_Hold () { return 'OnGetHoldSuccess' }, /** * 坐席退出呼叫 *触发场景 * 1.呼叫转移接口,释放转方式调用成功 * 2.呼叫转移接口,成功转方式调用成功 * 3.呼叫转移接口,指定转方式调用成功 * 4.拆除指定callid呼叫 * 5.挂断呼叫 * @returns {string} * @constructor */ AgentEvent_Call_Release () { return 'onReceiveRelease' }, // 客户释放 AgentEvent_Customer_Release () { return 'OnCustomerRelease' }, AgentEvent_ConsultAgent_Failure () {}, /** * 坐席正在呼叫中 * @returns {string} * @constructor */ AgentState_Busy () { return 'OnAgentIsCalling' }, AgentMediaEvent_Play () {}, AgentMediaEvent_Record () { return 'OnRecordSuccess' }, // 示忙 AgentState_SetNotReady_Success () { return 'OnSayBusySuccess' }, // 示忙失败事件 AgentState_SetNotReady_Failure () {}, // 强制示忙成功 AgentState_Force_SetNotReady () { return 'OnAgentForceBusySuccess' }, // 久不应答 AgentEvent_No_Answer () {}, // 继续播放录音成功 AgentMediaEvent_ResumePlayDone () {}, // 暂停播放成功 AgentMediaEvent_PausePlayDone () {}, // 停止录音成功 AgentMediaEvent_PauseRecordDone () {}, // 停止播放成功 AgentMediaEvent_StopPlayDone () {}, // 停止录音 AgentMediaEvent_StopRecordDone () {}, // 转自动成功 AgentTransEvent_Success () {}, // 转自动失败 AgentTransEvent_Failure () {}, // 三方通话成功 AgentEvent_Conference () { return 'onThreeCallSuccess' }, // 外呼失败 AgentEvent_Call_Out_Fail () { return 'OnCallOutFailure' }, // 外呼失败时推送的事件,监测客户释放原因 OUTBOUND_DETECT_EVENT () {}, // 内部呼叫失败 AgentEvent_Inside_Call_Fail () {}, // 保持失败 AgentEvent_Hold_failure () {}, // 取保持失败 AgentEvent_GetHold_failure () {}, // 录音失败事件 AgentMediaEvent_Record_Fail () {}, // 停止录音失败事件 AgentMediaEvent_StopRecordDone_Failure () {}, // 录音播放失败 AgentMediaEvent_Play_Fail () {}, // 停止放音失败 AgentMediaEvent_StopPlayDone_Failure () {}, // 暂停录音失败 AgentMediaEvent_PausePlayDone_Failure () {}, // 继续播放录音失败 AgentMediaEvent_ResumePlayDone_Failure () {}, // 快进成功 AgentMediaEvent_JumpPlayDone () {}, // 快进失败 AgentMediaEvent_JumpPlayDone_Failure () {}, // 快退成功 AgentMediaEvent_BackFastPlay () {}, AgentMediaEvent_BackFastPlay_Failure () {}, // 监听成功 AgentEvent_Listen () {}, // 监听失败 AgentEvent_Listen_Failure () {}, // 监视成功 AgentEvent_Monitor () {}, AgentEvent_Monitor_Failure () {}, AgentEvent_Stop_Monitor () {}, AgentEvent_Stop_Monitor_Failure () {}, // 插入成功事件 AgentEvent_Insert () {}, // 插入失败 AgentEvent_Insert_Failure () {}, // 拦截成功 AgentEvent_Intercept () {}, // 拦截失败 AgentEvent_Intercept_Failure () {}, // 强制示闲 AgentState_AgentForceIdle () {}, // 强制示闲失败 AgentState_AgentForceIdle_Failure () {}, // 强制示忙成功 AgentState_Force_Success () {}, // 强制示忙失败 AgentState_Force_Failure () {}, // 强制签出 AgentState_AgentForceOut () {}, // 强制签出失败 AgentState_AgentForceOut_Failure () {}, // 被强制签出 AgentEvent_SignOff () {}, AgentState_AgentForceOut_Success () {}, // 便签 AgentOther_Note () { return 'OnReceiveNote' }, Release_Success () {}, Release_Failure () {}, // 坐席全忙 AgentOther_All_Agent_Busy () {}, // 取消示忙事件 AgentState_CancelNotReady_Success () { return 'OnSayFreeSuccess' }, // 坐席咨询失败 AgentEvent_Consult_Fail () {}, // 发送通知成功 AgentEvent_SendMessage () {}, // 发送通知失败 AgentEvent_SendMessage_Failure () {}, // 退出工作态 AgentState_CancelWork_Success () { return 'OnCancelWorkSuccess' }, // 签出失败 AgentOther_ShutdownService_Failure () {}, // 6.2.14 连接失败 AgentEvent_Connect_Fail () {}, // 释放失败 ReleaseFailure () {}, // 转坐席成功 TransToAgentTransEvent () {}, // 转坐席失败 TransToAgentTransEvent_Failure () {}, AgentOther_Answer_Failure () {}, // 文字交谈振铃 AgentChat_Ring () {}, // 文字交谈建立 AgentChat_Connected () {}, // 文字交谈结束 AgentChat_Disconnected () {}, // 文字消息到达 AgentChat_DataRecved () {}, // 文字交谈会话转移开始事件 AgentChat_TransferStart () {}, // 文字交谈会话转移失败事件 AgentChat_TransferFailed () {}, // 文字交谈内部呼叫会话创建事件 AgentChat_CallOutCreated () {}, // 文字交谈发起内部会话失败事件 AgentChat_CalloutFailed () {}, // 文字交谈失效通知(服务器切换) AgentChat_Swaped () {}, // 多媒体会议消息通知事件 AgentEvent_JoinConf () {}, // 多媒体会议结束事件 AgentEvent_OnStopMultimediaConf () {}, // 当前座席已被预占 AgentEvent_Agent_Occupyed () {}, // 座席接收到预览发起。附带信息 controlid:预览呼出控制块号。dialeddigits:预览呼出被叫号码。 AgentEvent_Preview () {}, // 预览呼叫释放 AgentEvent_Release_Preview () {} }