/// 置闲完成后触发事件 /// <summary> /// 置闲完成后触发事件 /// </summary> /// <param name="callback"></param> private void AfterToReadyCallBack(Action <object> callback, string name) { //当前状态 PhoneStatus cur = HollyContactHelper.ConvertPhoneStatus(HollyContactHelper.Instance.GetCurStatus()); //判断是异步触发还是同步触发 if (cur != PhoneStatus.PS03_置闲) { HollyContactHelper.Instance.ToReady(); //注册事件,当状态有cur变成【PS03_置闲】时触发 AfterActionEventManage.RegisterOnceAfterActionEvent1(cur, PhoneStatus.PS03_置闲, callback, null, "置闲完成后触发事件-" + name); } else { callback(null); } }
/// 取消转接成功后触发事件 /// <summary> /// 取消转接成功后触发事件 /// </summary> /// <param name="callback"></param> private void EndConsultCallBack(Action <object> callback) { //从咨询发起状态->普通通话状态 AfterActionEventManage.RegisterOnceAfterActionEvent1(PhoneStatus.PS09_咨询通话_发起方, PhoneStatus.PS08_普通通话, callback, null, "取消转接成功后触发"); }
/// 到达话后时触发 /// <summary> /// 到达话后时触发 /// </summary> /// <param name="callback"></param> private void ToAfterCallCallBack(Action <object> callback) { //从任意状态->话后 AfterActionEventManage.RegisterOnceAfterActionEvent1(null, PhoneStatus.PS06_话后, callback, null, "到达话后时触发-呼出结束话后"); }
/// 开始转接成功后触发事件 /// <summary> /// 开始转接成功后触发事件 /// </summary> /// <param name="callback"></param> private void BeginConsultCallBack(Action <object> callback) { //从任意状态->咨询发起状态 AfterActionEventManage.RegisterOnceAfterActionEvent1(null, PhoneStatus.PS09_咨询通话_发起方, callback, null, "开始转接成功后触发"); }