Exemple #1
0
        /// 软电话通知信息_回调事件
        /// <summary>
        /// 软电话通知信息_回调事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e">messageContent</param>
        private void axUniSoftPhone1_OnMessage(object sender, AxUniSoftPhoneControl.IUniSoftPhoneEvents_OnMessageEvent e)
        {
            string message = HollyContactHelper.ConvertPhoneStatus(axUniSoftPhone1.PreStatus) + " -> " +
                             HollyContactHelper.ConvertPhoneStatus(axUniSoftPhone1.CurStatus);

            LogMessage("消息通知 OnMessage:" + message + "\r\n" + e.messageContent + "\r\n我们定义枚举状态:" + HollyContactHelper.ConvertPhoneStatus(axUniSoftPhone1.CurStatus));
            if (e.messageContent.StartsWith("服务器已上线:"))
            {
                currentLoadConfigCount++;
            }
            if (currentLoadConfigCount == loadConfigCount)
            {
                LogMessage("当前调用Load函数,返回的服务器信息条数为:" + currentLoadConfigCount);
                currentLoadConfigCount = 0;
                //跨号段监控逻辑
                if (isOverPrefixListen)
                {
                    btn_Init_Click(null, null);
                    btn_SignIn_Click(null, null);
                }
            }
            #region 跨号段监控逻辑——开始
            if (e.messageContent.Equals("签入成功。") && isOverPrefixListen)
            {
                btn_Ready_Click(null, null);
            }
            if (e.messageContent.Equals("示闲成功。") && isOverPrefixListen)
            {
                isOverPrefixListen = false;
                bool flag = hollycontacthelper.ListenStart(HollyContactHelper.ConDeviceType.座席工号, txtBox_NumbertoDial.Text.Trim());
                LogRequest("ListenStart-->>" + flag);
            }
            #endregion 跨号段监控逻辑——结束
        }
Exemple #2
0
        /// 软电话状态改变_回调事件
        /// <summary>
        /// 软电话状态改变_回调事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void axUniSoftPhone1_OnStatusChange(object sender, EventArgs e)
        {
            string message = HollyContactHelper.ConvertPhoneStatus(axUniSoftPhone1.PreStatus) + " -> " +
                             HollyContactHelper.ConvertPhoneStatus(axUniSoftPhone1.CurStatus);

            message += "\r\nGetLineInfo_SourceActType:" + axUniSoftPhone1.GetLineInfo_SourceActType();
            message += "\r\nGetLineInfo_DestActType:" + axUniSoftPhone1.GetLineInfo_DestActType();
            LogMessage("状态变化 OnStatusChange:" + message + "\r\n录音地址:" + axUniSoftPhone1.GetLineInfo_RecordFilePath() + axUniSoftPhone1.GetLineInfo_RecordFileName());
        }