更新时间:2024-08-22 GMT+08:00
结束呼叫
应用场景
座席侧登陆成功后,在来电,去电或者通话过程中,主动调用结束呼叫接口,实现音视频呼叫的挂断。
前提条件
- 座席已经签入CTI平台。
- 话机账号登陆注册成功。
- 处于呼叫或者通话状态中。
流程说明
调用OpenEyeCall的endCall接口进行挂断。
/**
* 结束呼叫
*/
function endCall() {
if (tupCurrentCallStatus != OPENEYE_CALL_STATUS.HANGUP) {
this.global_openEye_SDK.openEyeCall.endCall(tupCurrentCallId, { response: onEndCallReponse });
} else {
console.error("Phone status is invalid. Now it's " + tupCurrentCallStatus);
}
}
function onEndCallReponse(data) {
if (data.result == 0) {
console.error("EndCall success. ");
} else {
console.error("EndCall failed. The ErrorCode is " + data.result);
console.info(data);
}
}
父主题: 座席侧集成H5软电话开发指导