Beispiel #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            //iDVR.EnableDecode = true;
            _objCPCC.GetRecentCall();
            //IRecordedCall RecCall = new IRecordedCall();


            RecordingCriteria     recCrit  = new RecordingCriteria();
            RecordingCriteriaList CritList = new RecordingCriteriaList();

            recCrit.Remark = "This is rem1 test data. Time: 9/24/2008 2:30:02 PM"; // "This is rem1 test data. Time: 9/24/2008 12:18:51 PM";


            IRecordedCallList RecCallList = _objCPCC.GetRecordedCall("Hard Disk", recCrit);
            int cnt = RecCallList.Count;
            int i   = 0;

            foreach (IRecordedCall RecCall in RecCallList)
            {
                i++;
                RecCall.DownloadVoiceFile("C:\\TelStratTest\\DownloadedCall" + i.ToString() + ".wav");
                bool notDone = true;
                while (notDone)
                {
                    switch (RecCall.GetDownloadStatus())
                    {
                    case cstDownloadStatus.DownloadInProcess:
                        notDone = true;
                        break;

                    case cstDownloadStatus.DownloadComplete:
                        notDone = false;
                        break;

                    case cstDownloadStatus.DownloadFileNotFound:
                        notDone = false;
                        break;
                    }
                }

                lBx1.Items.Add(RecCall.AgentFirstName.ToString());
                lBx1.Items.Add(RecCall.AgentLastName.ToString());
                lBx1.Items.Add(RecCall.ANI.ToString());
                lBx1.Items.Add(RecCall.BoardNumber.ToString());
                lBx1.Items.Add(RecCall.ChannelNumber.ToString());
                lBx1.Items.Add(RecCall.Duration.ToString());
                lBx1.Items.Add(RecCall.Remark1.ToString());
                lBx1.Items.Add(RecCall.Remark2.ToString());
                lBx1.Items.Add(RecCall.Port.ToString());


                RecCall.PlayVoiceFile("C:\\TelStratTest\\DownloadedCall" + i.ToString() + ".wav");
            }
        }
Beispiel #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            cst = _objCPCC.EnableDecode(true);
            _objCPCC.GetRecentCall();
            //IRecordedCall RecCall = new IRecordedCall();
            //IRecordedCallList RecCallList = iDVR.GetRecordedCall();


            //RecordingCriteria recCrit = new RecordingCriteria();
            RecordingCriteriaList CritList = new RecordingCriteriaList();

            try
            {
                CritList = _objCPCC.GetRecordingCriteria();
                foreach (RecordingCriteria recCrit in CritList)
                {
                    //foreach (object Item in CritList)
                    //{
                    //    lBx1.Items.Add("NameOrSQLFilter:\n");
                    //    lBx1.Items.Add(recCrit.NameOrSQLSortFilter.ToString());
                    //    lBx1.Items.Add("Mask:\n");
                    //    lBx1.Items.Add(recCrit.Mask.ToString());
                    //    lBx1.Items.Add("PortFilterList:\n");
                    //    lBx1.Items.Add(recCrit.PortFilterList.ToString());
                    //    lBx1.Items.Add("DayMask:\n");
                    //    lBx1.Items.Add(recCrit.DayMask.ToString());
                    //    lBx1.Items.Add("AdministratorOwner:\n");
                    //    lBx1.Items.Add(recCrit.AdministerOwner.ToString());
                    //    lBx1.Items.Add("Remark:\n");
                    //    lBx1.Items.Add(recCrit.Remark.ToString());
                    //    lBx1.Items.Add("\n");

                    //}

                    IRecordedCallList RecCallList = _objCPCC.GetRecordedCall("Hard Disk", recCrit);
                    int cnt = RecCallList.Count;
                    int i   = 0;
                    foreach (IRecordedCall RecCall in RecCallList)
                    {
                        i++;
                        RecCall.DownloadVoiceFile("C:\\TelStratTest\\DownloadedCall" + i.ToString() + ".wav");
                        bool notDone = true;
                        while (notDone)
                        {
                            switch (RecCall.GetDownloadStatus())
                            {
                            case cstDownloadStatus.DownloadInProcess:
                                notDone = true;
                                break;

                            case cstDownloadStatus.DownloadComplete:
                                notDone = false;
                                break;

                            case cstDownloadStatus.DownloadFileNotFound:
                                notDone = false;
                                break;
                            }
                        }

                        RecCall.PlayVoiceFile("C:\\TelStratTest\\DownloadedCall" + i.ToString() + ".wav");
                    }
                }
            }
            catch (Exception ev)
            {
                MessageBox.Show("Error in 'GetRecordingCriteria': " + ev.Message.ToString());
            }
        }