Пример #1
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);
        }
Пример #2
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);
            }
        }