Пример #1
0
        /// <summary>
        /// Hàm này thực hiện việc add or remove 1 SĐT vào / ra khỏi blacklist
        /// </summary>
        /// <param name="ip_dien_thoai">SĐT cần add / remove</param>
        /// <param name="ip_code">10: add; 20: remove</param>
        /// <returns></returns>
        public static CAddRemoveBlackListData add_remove_blacklist(string ip_dien_thoai, int ip_code)
        {
            string v_str_result        = "";
            string v_str_link_services = "";

            v_str_link_services = f002_main_form.m_str_web_service_url + WEB_URL_CALL_CENTER.ADD_REMOVE_BLACKLIST(ip_dien_thoai, ip_code);

            v_str_result = HelpUtils.get_content_from_weburl(v_str_link_services);

            CAddRemoveBlackList v_obj_infor = JsonConvert.DeserializeObject <CAddRemoveBlackList>(v_str_result);

            return(v_obj_infor.Action);
        }
Пример #2
0
        /// <summary>
        /// Hàm này thực hiện việc get incoming call
        /// </summary>
        /// <param name="ip_extension">Mã máy điện thoại</param>
        /// <returns></returns>
        public static CGetIncomingCallData get_incoming_call(string ip_extension)
        {
            string v_str_result        = "";
            string v_str_link_services = "";

            v_str_link_services = f002_main_form.m_str_web_service_url + WEB_URL_CALL_CENTER.GET_INCOMING_CALL(ip_extension);

            v_str_result = HelpUtils.get_content_from_weburl(v_str_link_services);

            CGetIncomingCall v_obj_infor = JsonConvert.DeserializeObject <CGetIncomingCall>(v_str_result);

            return(v_obj_infor.Action);
        }
Пример #3
0
        /// <summary>
        /// Hàm này thực hiện unregister ipphone khỏi queue
        /// </summary>
        /// <param name="ip_extension">Mã ipphone</param>
        /// <returns></returns>
        public static CUnRegisterQueueData register_ipaddress_ipphone_2_queue(string ip_extension)
        {
            string v_str_result        = "";
            string v_str_link_services = "";

            v_str_link_services = f002_main_form.m_str_web_service_url + WEB_URL_CALL_CENTER.UNREGISTER_IP(ip_extension);

            v_str_result = HelpUtils.get_content_from_weburl(v_str_link_services);

            CUnRegisterQueue v_obj_infor = JsonConvert.DeserializeObject <CUnRegisterQueue>(v_str_result);

            return(v_obj_infor.Action);
        }
Пример #4
0
        /// <summary>
        /// Hàm này thực hiện việc UnPause agent, ipphone; tiếp tục nhận cuộc gọi
        /// </summary>
        /// <param name="ip_extension">ipphone</param>
        /// <param name="ip_agent">Agentcode =username</param>
        /// <returns></returns>
        public static CUnPauseQueueData unpause_agent_ipphone_2_queue(string ip_extension
                                                                      , string ip_agent)
        {
            string v_str_result        = "";
            string v_str_link_services = "";

            v_str_link_services = f002_main_form.m_str_web_service_url + WEB_URL_CALL_CENTER.UNPAUSE_AGENT(ip_extension, ip_agent);

            v_str_result = HelpUtils.get_content_from_weburl(v_str_link_services);

            CUnPauseQueue v_obj_infor = JsonConvert.DeserializeObject <CUnPauseQueue>(v_str_result);

            return(v_obj_infor.Action);
        }
Пример #5
0
        /// <summary>
        /// Hàm này thực hiện việc add or remove agent, ipphone khỏi queue
        /// </summary>
        /// <param name="ip_extension">Mã của IPPhone</param>
        /// <param name="ip_agent">Agencode; thường để là username</param>
        /// <param name="ip_kho_queue">Tên của Kho queue (tos_mb, tos_mn)</param>
        /// <param name="ip_code_add_or_remove">10: add; 20: remove</param>
        /// <returns></returns>
        public static CJoinRemoveQueueData add_or_remove_agent_ipphone_2_queue(string ip_extension
                                                                               , string ip_agent
                                                                               , string ip_kho_queue
                                                                               , int ip_code_add_or_remove)
        {
            string v_str_result        = "";
            string v_str_link_services = "";

            if (ip_code_add_or_remove == 10)
            {
                v_str_link_services = f002_main_form.m_str_web_service_url + WEB_URL_CALL_CENTER.ADD_VAO_QUEUE_GOI(ip_extension, ip_agent, ip_kho_queue);
            }
            else if (ip_code_add_or_remove == 20)
            {
                v_str_link_services = f002_main_form.m_str_web_service_url + WEB_URL_CALL_CENTER.REMOVE_KHOI_QUEUE_GOI(ip_extension, ip_agent, ip_kho_queue);
            }

            v_str_result = HelpUtils.get_content_from_weburl(v_str_link_services);

            CJoinRemoveQueue v_obj_infor = JsonConvert.DeserializeObject <CJoinRemoveQueue>(v_str_result);

            return(v_obj_infor.Action);
        }
Пример #6
0
        public static CallInfor get_call_infor_overtime(string ip_call_id)
        {
            string v_str_result = "";

            v_str_result = get_content_from_weburl(f002_main_form.m_str_web_service_url + WEB_URL_CALL_CENTER.GET_CALL_INFOR_OVERTIME(ip_call_id));
            CLichSuCuocGoi v_obj_infor = JsonConvert.DeserializeObject <CLichSuCuocGoi>(v_str_result);

            return(v_obj_infor.data);
        }
Пример #7
0
        public static CallInfor get_call_infor_overtime(string ip_call_id)
        {
            string v_str_result = "";

            v_str_result = get_content_from_weburl("http://203.162.121.70:8080/TPCServer/tpc/DoAction.jsp?event=" + WEB_URL_CALL_CENTER.GET_CALL_INFOR_OVERTIME(ip_call_id));
            CLichSuCuocGoi v_obj_infor = JsonConvert.DeserializeObject <CLichSuCuocGoi>(v_str_result);

            return(v_obj_infor.data);
        }
Пример #8
0
        private void check_incoming_call()
        {
            try
            {
                string m_str_stationId = us_user.ipphone; //ip-phone

                string v_str_link_services = "";

                v_str_link_services = "http://203.162.121.70:8080/TPCServer/tpc/DoAction.jsp?event=" + WEB_URL_CALL_CENTER.GET_INCOMING_CALL(m_str_stationId);

                string v_str_output = CallCenterUtils.get_incoming_call(v_str_link_services).Data;

                US_GD_CUOC_GOI_YEU_CAU m_us_gd_cuoc_goi_yc = new US_GD_CUOC_GOI_YEU_CAU();
                if (v_str_output == "")
                {
                    return;
                }
                CallInfor v_obj_callinfo = HelpUtils.get_start_callinfo_from_client_string_call(v_str_output);
                if (v_obj_callinfo.mobile_phone == "Anonymous")
                {
                    return;
                }

                if (m_us_gd_cuoc_goi_yc.is_call_id_exist(v_obj_callinfo.call_id))
                {
                    return;
                }
                if (v_obj_callinfo.call_id == "" ||
                    v_obj_callinfo.call_id == null)
                {
                    return;
                }

                HelpUtils.ghi_log_he_thong(v_str_output, "");
                //// ghi log gọi điện

                m_timer_imcoming_call.Enabled = false;
                f100_don_dat_hang_new v_f = new f100_don_dat_hang_new();
                v_f.display_for_ipphone(v_obj_callinfo);

                // HelpUtils.open_form_sinh_vien_call(v_obj_callinfo);
                m_timer_imcoming_call.Enabled = true;
            }
            catch (Exception v_e)
            {
                CSystemLog_100.ExceptionHandle(v_e);
            }
        }
Пример #9
0
        /// <summary>
        /// Hàm này thực hiện việc add or remove agent, ipphone khỏi queue
        /// </summary>
        /// <param name="ip_extension">Mã của IPPhone</param>
        /// <param name="ip_agent">Agencode; thường để là username</param>
        /// <param name="ip_kho_queue">Tên của Kho queue (tos_mb, tos_mn)</param>
        /// <param name="ip_code_add_or_remove">10: add; 20: remove</param>
        /// <returns></returns>
        public static CJoinRemoveQueueData add_or_remove_agent_ipphone_2_queue(string ip_extension
                                                                               , string ip_agent
                                                                               , string ip_kho_queue
                                                                               , int ip_code_add_or_remove)
        {
            string v_str_result        = "";
            string v_str_link_services = "";

            if (ip_code_add_or_remove == 10)
            {
                v_str_link_services = "http://203.162.121.70:8080/TPCServer/tpc/DoAction.jsp?event=" + WEB_URL_CALL_CENTER.ADD_VAO_QUEUE_GOI(ip_extension, ip_agent, ip_kho_queue);
            }
            else if (ip_code_add_or_remove == 20)
            {
                v_str_link_services = "http://203.162.121.70:8080/TPCServer/tpc/DoAction.jsp?event=" + WEB_URL_CALL_CENTER.REMOVE_KHOI_QUEUE_GOI(ip_extension, ip_agent, ip_kho_queue);
            }

            v_str_result = HelpUtils.get_content_from_weburl(v_str_link_services);

            CJoinRemoveQueue v_obj_infor = JsonConvert.DeserializeObject <CJoinRemoveQueue>(v_str_result);

            return(v_obj_infor.Action);
        }