呼叫中心系统的测试文档源码

// TestView.cpp : implementation of the CTestView class
//
#include "stdafx.h"
#include "Test.h"
#include "TestDoc.h"
#include "TestView.h"
#include "Fsk.h"
#include "BusChInfo.h"
#include "ConInfo.h"
#include "SetChkTonePara.h"
#include "PcmCompatible.h"
#include "SS1base.h"
#include "Ss7.h"
#include "TsToChList.h"
#include "CallTest.h"
#include "direct.h"
#include
//#include "../shp_a3/shpa3api.h"
#include "ver34.h"
#include "ver353.h"
#include "ver404.h"
#include "time.h"
#define _TESTDATA
#include "TestData.h"
#include "OverallEnergyLevelDlg.h"
#include "40ExDlg.h"
#include "SetWaitDtmf.h"
#include "Ver444x.h"
#include "BoardInfo.h"
#include "DlgMultiCall.h" // added by hunnad for 多路呼叫, 2007.10.15
#include "Dlgver456x.h"
#include "DlgIsupAdv.h"
#include "ShvDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
enum{
CHKPLAY_PLAYING,
CHKPLAY_NORMAL_END,
CHKPLAY_DTMF_END,
CHKPLAY_BURGEIN,
CHKPLAY_REMOTEHANGUP_END, //added by xxb for 恒生,01.09,2002 +++++
CHKPLAY_APPLICATION_END, //added by xxb for 恒生,01.09,2002 +++++
CHKPLAY_PAUSED,//added by xxb,2002.8.2
CHKPLAY_LINKFROM_END,//Added by xxb, for 因下总线而中止,2003.04.17
CHKPLAY_NETDISCONNECT,//Added by yxh, for 网络文件放音改进, 2003.09.30
};
enum
{
CHKRECORD_RECORDING,    //0: recording
CHKRECORD_APPLICATION_END, //1: application end
CHKRECORD_DTMF_END,    //2: record operation is stopped by DTMF key
CHKRECORD_REMOTEHANGUP_END,//3: recor operation is stopped by remote hangup
CHECKRECORD_TIMEUP_END,    //4: end of record for time up.
CHECKRECORD_FILE_PAUSED,   //5: file record is paused.
CHECKRECORD_FILE_WRITE_ERROR,//6:file write error
};
extern int nIsSsmStartCtiOK;
BOOL bEnableOpToneAnalyze[MAX_CH];
BOOL bEnableOpRingDetect[MAX_CH];
BOOL bEnableOpBlockRemoteCh[MAX_CH];
BOOL bEnableOpEchoCanceller[MAX_CH];
BOOL bEnableOpADC[MAX_CH];
BOOL bTimerOpen = TRUE;
HANDLE hFile;
/
// CTestView
IMPLEMENT_DYNCREATE(CTestView, CFormView)
BEGIN_MESSAGE_MAP(CTestView, CFormView)
//{{AFX_MSG_MAP(CTestView)
ON_CBN_SELCHANGE(IDC_COMBO_SELCURCH, OnSelchangeComboSelcurch)
ON_NOTIFY(NM_CLICK, IDC_CHLIST, OnClickChlist)
ON_WM_TIMER()
ON_WM_DESTROY()
ON_COMMAND(ID_OPEN_SHCONFIG, OnOpenShconfig)
ON_COMMAND(ID_OPEN_SHCTICONFIG, OnOpenShcticonfig)
ON_COMMAND(ID_VER34, OnVer34)
ON_COMMAND(ID_ONTIMEFLAG, Ontimeflag)
ON_UPDATE_COMMAND_UI(ID_ONTIMEFLAG, OnUpdateOntimeflag)
ON_COMMAND(ID_VER353, OnVer353)
ON_COMMAND(ID_OVERALL_ENERGY_LEVEL, OnOverallEnergyLevel)
ON_COMMAND(ID_40EX_OPEN_BUS, On40exOpenBus)
ON_COMMAND(ID_SSMSETWAITDTMFEX, OnSsmsetwaitdtmfex)
ON_COMMAND(ID_BUTTON_SPY, OnButtonSpy)
ON_COMMAND(ID_VER404, OnVer404)
ON_COMMAND(ID_VER444x, OnVer444x)
ON_COMMAND(ID_BOARDINFO, OnBoardinfo)
ON_NOTIFY(TCN_SELCHANGE, IDC_TAB_VIEW, OnSelchangeTabView)
ON_BN_CLICKED(IDC_SELECT_ALLCH, OnSelectAllch)
ON_COMMAND(IDC_BUTTON_SS7, OnButtonSs7)
ON_COMMAND(IDC_BUTTON_fsk, OnBUTTONfsk)
ON_COMMAND(IDC_BUTTON_BUS, OnButtonBus)
ON_COMMAND(IDC_BUTTON_CONF, OnButtonConf)
ON_COMMAND(IDC_BUTTON_SetChkTonePara, OnBUTTONSetChkTonePara)
ON_COMMAND(IDC_BUTTON_PcmFunc, OnBUTTONPcmFunc)
ON_COMMAND(IDC_BUTTON_SS1Base, OnBUTTONSS1Base)
ON_COMMAND(ID_VER458x, OnVER458x)
ON_COMMAND(ID_VER4605, OnVer4605)
ON_COMMAND(IDC_VER_4720_SHV, OnVer4720Shv)
ON_COMMAND(ID_MULTICALL, OnMulticall)
ON_COMMAND(ID_HANGUPALL, OnHangupall)
ON_COMMAND(ID_PICKUPALL, OnPickupall)
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CFormView::OnFilePrintPreview)
END_MESSAGE_MAP()
/
// CTestView construction/destruction
CTestView::CTestView()
: CFormView(CTestView::IDD)
{
//{{AFX_DATA_INIT(CTestView)
m_SelectAllCh = FALSE;
//}}AFX_DATA_INIT
// TODO: add construction code here
}
CTestView::~CTestView()
{
}
void CTestView::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTestView)
DDX_Control(pDX, IDC_TAB_VIEW, m_TabCtrl);
DDX_Control(pDX, IDC_COMBO_SELCURCH, m_SelCurCh);
DDX_Control(pDX, IDC_CHLIST, m_ChList);
DDX_Check(pDX, IDC_SELECT_ALLCH, m_SelectAllCh);
//}}AFX_DATA_MAP
}
BOOL CTestView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
//  the CREATESTRUCT cs
return CFormView::PreCreateWindow(cs);
}
enum{
ITEM_Ch,
ITEM_ChHwType,
ITEM_ChState,
ITEM_RingCount,
ITEM_SendRingCount,//added by LCL for RingCounter, 2005.09.19
ITEM_RxDTMF,
ITEM_ToneAnalyzeResult,
    ITEM_2ndToneAnalyzeResult, //ADDED BY yxd 2003.3.20
ITEM_Burgein,
ITEM_DetectNoSound,
ITEM_PlayTime,
ITEM_PlayTimeEx,
ITEM_PlayPercentage,
ITEM_ChkPlay,
ITEM_GetPlayType,
ITEM_RecTime,
ITEM_ChkRec,
ITEM_OverallEnergy,
ITEM_AdaptiveFilter,
ITEM_AdaptiveFilterStudy,
ITEM_ECRatio,
ITEM_LCD,
ITEM_DKEY, //added by yxh for GetDKeyStr, 2005.09.02
ITEM_CallerId,
ITEM_CallerIdEx,
ITEM_Vad,
ITEM_PeakFreq,
ITEM_RxCAS,
ITEM_TxCAS,
ITEM_RxR2,
ITEM_TxR2,
ITEM_PendReason,
ITEM_ChStateKeepTime,
ITEM_PhoneNumber,
ITEM_Ploar,
ITEM_BlockRemote,
ITEM_CallTest,
ITEM_CallInTest,
ITEM_CodecType
};
void CTestView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
GetParentFrame()->RecalcLayout();
ResizeParentToFit();
/*
char szPathName[MAX_PATH];
memset(szPathName, 0, MAX_PATH);
GetCurrentDirectory(MAX_PATH, szPathName);
strcat(szPathName, "\TestRecFiles");
if(_mkdir(szPathName)==-1 && errno!=EEXIST) //创建文件夹,创建失败而且失败原因不是文件夹已经存在
{
MessageBox("创建存放录音文件的文件夹失败", "警告", MB_OK|MB_ICONSTOP);
return;
}
*/
if(SsmGetMaxUsableBoard() != SsmGetMaxCfgBoard())
{
bIsInitError = TRUE;
char t[1000];
SsmGetLastErrMsg(szErrMsg);
// wsprintf(t,"警告: 板卡总数=%d, 初始化成功板卡数=%d!n 错误信息="%s"",//masked by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.11
wsprintf(t,BoxMsg_Fmt_InitBoard,//added by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.11
SsmGetMaxCfgBoard(),
SsmGetMaxUsableBoard(),
szErrMsg);
if(AfxMessageBox(t, MB_OK, 0) == IDOK)
bIsInitError = FALSE;
}
nMaxCh = SsmGetMaxCh();
TC_ITEM * m_pTCItem;
m_pTCItem = new TC_ITEM;
m_pTCItem->mask = TCIF_TEXT;
m_pTCItem->pszText = "基本函数";
m_TabCtrl.InsertItem(0, m_pTCItem);
m_pTCItem->pszText = "放音函数";
m_TabCtrl.InsertItem(1, m_pTCItem);
m_pTCItem->pszText = "录音函数";
m_TabCtrl.InsertItem(2, m_pTCItem);
m_pTCItem->pszText = "事件驱动";
m_TabCtrl.InsertItem(3, m_pTCItem);
m_pTCItem->pszText = "IP函数";
m_TabCtrl.InsertItem(4, m_pTCItem);
m_pTCItem->pszText = "其它函数";
m_TabCtrl.InsertItem(5, m_pTCItem);
delete m_pTCItem; //added by xxh for memory leak output, 2006.12.06
CRect rcBaseFram;
GetDlgItem(IDC_TAB_VIEW)->GetWindowRect(&rcBaseFram);
m_dlgBase.Create(IDD_VIEW_BASE, this);
m_dlgPlay.Create(IDD_VIEW_PLAY, this);
m_dlgRec.Create(IDD_VIEW_REC, this);
m_dlgEvent.Create(IDD_VIEW_EVENT, this);
m_dlgIP.Create(IDD_VIEW_IP, this);
m_dlgOther.Create(IDD_VIEW_OTHER, this);
hwndView[VIEW_BASE] = m_dlgBase.GetSafeHwnd();
hwndView[VIEW_PLAY] = m_dlgPlay.GetSafeHwnd(); 
hwndView[VIEW_REC] = m_dlgRec.GetSafeHwnd();
hwndView[VIEW_EVENT] = m_dlgEvent.GetSafeHwnd();
hwndView[VIEW_IP] = m_dlgIP.GetSafeHwnd();
hwndView[VIEW_OTHER] = m_dlgOther.GetSafeHwnd();
ScreenToClient(&rcBaseFram);
::MoveWindow(hwndView[VIEW_BASE], rcBaseFram.left + 1, rcBaseFram.top + 20, rcBaseFram.Width() - 2, rcBaseFram.Height() - 21, 0);
::MoveWindow(hwndView[VIEW_PLAY], rcBaseFram.left + 1, rcBaseFram.top + 20, rcBaseFram.Width() - 2, rcBaseFram.Height() - 21, 0);
::MoveWindow(hwndView[VIEW_REC], rcBaseFram.left + 1, rcBaseFram.top + 20, rcBaseFram.Width() - 2, rcBaseFram.Height() - 21, 0);
::MoveWindow(hwndView[VIEW_EVENT], rcBaseFram.left + 1, rcBaseFram.top + 20, rcBaseFram.Width() - 2, rcBaseFram.Height() - 21, 0);
::MoveWindow(hwndView[VIEW_IP], rcBaseFram.left + 1, rcBaseFram.top + 20, rcBaseFram.Width() - 2, rcBaseFram.Height() - 21, 0);
::MoveWindow(hwndView[VIEW_OTHER], rcBaseFram.left + 1, rcBaseFram.top + 20, rcBaseFram.Width() - 2, rcBaseFram.Height() - 21, 0);
::ShowWindow(hwndView[VIEW_BASE], SW_SHOW);
InitChList(TRUE);
char szTmp[MAX_CH];
for(int ch=0; ch {
m_SelCurCh.InsertString(ch, _itoa(ch,szTmp,10));
}
m_SelCurCh.SetCurSel(0);
InitChVariable();
OnSelchangeComboSelcurch();
InitCallTest();
SetDlgItemInt(IDC_EDIT_SelectAllChStart, 0,TRUE);
SetDlgItemInt(IDC_EDIT_SelectAllChEnd, nMaxCh-1,TRUE);
uTimerId = SetTimer(1,200,NULL); 
if(uTimerId == 0)
{
char t[200];
bIsInitError = TRUE;
// wsprintf(t,"错误:启动主定时器失败,请退出一些应用程序后,重新启动Testn");//masked by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.11
wsprintf(t,BoxMsg_TimerFail);//added by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.11
if(AfxMessageBox(t, MB_OK, 0) == IDOK)
bIsInitError = FALSE;
PostQuitMessage(0);
return ;
}
nISDNItemCnt = 0;
char cNewStat[100];
for(ch=0; ch {
wsprintf(cNewStat,"%dms",SsmGetChStateKeepTime(ch));
m_ChList.SetItemText( ch, ITEM_ChStateKeepTime, cNewStat );
}
//+++START+++ added by yxh for SpyTest, 2003.08.22
pDlg = new CSpyDialog;
pDlg->Create(IDD_DIALOG_SPY, this);
//+++END+++   added by yxh for SpyTest, 2003.08.22
//++++start++++ added by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
InitLang();
//+++++end+++++ added by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
}
/
// CTestView printing
BOOL CTestView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CTestView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CTestView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
void CTestView::OnPrint(CDC* pDC, CPrintInfo* /*pInfo*/)
{
// TODO: add customized printing code here
}
/
// CTestView diagnostics
#ifdef _DEBUG
void CTestView::AssertValid() const
{
CFormView::AssertValid();
}
void CTestView::Dump(CDumpContext& dc) const
{
CFormView::Dump(dc);
}
CTestDoc* CTestView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTestDoc)));
return (CTestDoc*)m_pDocument;
}
#endif //_DEBUG
/
// CTestView message handlers
void CTestView::InitChVariable()
{
int ch;
// char szTmp[60];
// strcpy(szTmp,"\..\..\testvoc");
GetCurrentDirectory(MAX_PATH,szCurPath);
// strcat(szCurPath,szTmp);
for(ch=0; ch for(ch=0; ch for(ch=0; ch for(ch=0; ch for(ch=0; ch SetDlgItemInt(IDC_EDIT_LocalFlashTime, 500, TRUE);
}
//#define MAXITEM 35 //masked by yxh for GetDKeyStr, 2005.09.02
//#define  MAXITEM 36 //added by yxh for GetDKeyStr, 2005.09.02//masked by LCL for RingCounter, 2005.09.19
//#define  MAXITEM 37 added by LCL for RingCounter, 2005.09.19
//#define  MAXITEM 38 added by cy for GetPLayType, 2006.07.10
#define  MAXITEM 39 added by hunnad for GetPLayType, 2007.10.18
enum{
ITEM_PcmNo,
ITEM_TIME,
ITEM_L2Status,
ITEM_L2D_L3Atom,
ITEM_L3Start,
ITEM_L3_L2DAtom,
ITEM_RefInd,
};
#define MAXISDNITEM 7
void CTestView::UpdateChList()
{
for(int ch=0; ch {
char cNewStat[250]; 
int nDirection;
switch(SsmGetChType(ch))
{
//++++start++++ masked by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
/* case 14: wsprintf(cNewStat, "变声"); break;
case 9: wsprintf(cNewStat,"软传真"); break;
case 10: wsprintf(cNewStat,"磁石"); break;
case 0: wsprintf(cNewStat,"模拟"); break;
case 1: wsprintf(cNewStat,"内线"); break;
case 2: wsprintf(cNewStat,"坐席"); break;
case 3: wsprintf(cNewStat,"录音"); break;
case 4:
if(SsmGetAutoCallDirection(ch,&nDirection) == 0) 
{
if (nDirection==3)
wsprintf(cNewStat,"SS1Spy"); 
else
wsprintf(cNewStat,"SS1");
}
else if(nDirection==0)                           wsprintf(cNewStat,"SS1i"); 
else if(nDirection==1)                           wsprintf(cNewStat,"SS1o"); 
else                                          wsprintf(cNewStat,"SS1io"); 
break;
case 5: wsprintf(cNewStat,"传真"); break;
case 6:
if(SsmGetAutoCallDirection(ch,&nDirection) == 0) 
{
if (nDirection==3)
wsprintf(cNewStat,"SS7Spy"); 
else
wsprintf(cNewStat,"SS7");
}
else if(nDirection==0)                           wsprintf(cNewStat,"TUPi"); 
else if(nDirection==1)                           wsprintf(cNewStat,"TUPo"); 
else if(nDirection==2)                           wsprintf(cNewStat,"TUPio"); 
else                                             wsprintf(cNewStat,"TUP-x");
break;
case 7: //ISDN User ch
if(SsmGetAutoCallDirection(ch,&nDirection) == 0) 
{
if (nDirection==3)
wsprintf(cNewStat,"ISDNSpy"); 
else
wsprintf(cNewStat,"ISDN");
}
else if(nDirection==0)                           wsprintf(cNewStat,"ISDNi"); 
else if(nDirection==1)                           wsprintf(cNewStat,"ISDNo"); 
else if(nDirection==2)                           wsprintf(cNewStat,"ISDNio"); 
else  wsprintf(cNewStat,"ISDN");
break;
case 8: //Isdn Net ch
if(SsmGetAutoCallDirection(ch,&nDirection) == 0) 
{
if (nDirection==3)
wsprintf(cNewStat,"ISDNNetSpy"); 
else
wsprintf(cNewStat,"ISDNNet");
}
else if(nDirection==0)                           wsprintf(cNewStat,"ISDNNeti"); 
else if(nDirection==1)                           wsprintf(cNewStat,"ISDNNeto"); 
else if(nDirection==2)                           wsprintf(cNewStat,"ISDNNetio"); 
else  wsprintf(cNewStat,"ISDNNet");
break;
case 11:    wsprintf(cNewStat,"ISUPio");break;
//+++START+++ added by yxh for 2B+D, 2005.01.26
case 12: wsprintf(cNewStat, "DTR"); break;
//+++ END +++ added by yxh for 2B+D, 2005.01.26
default:
wsprintf(cNewStat,"-1"); break;
break;
}
*/
//+++++end+++++ masked by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
//++++start++++ added by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
case 14: LoadString(g_hInstance, IDS_CHTYPE_14, cNewStat, sizeof(cNewStat)); break;
case 9: LoadString(g_hInstance, IDS_CHTYPE_9, cNewStat, sizeof(cNewStat)); break;
case 10: LoadString(g_hInstance, IDS_CHTYPE_10, cNewStat, sizeof(cNewStat)); break;
case 0: LoadString(g_hInstance, IDS_CHTYPE_0, cNewStat, sizeof(cNewStat)); break;
case 1: LoadString(g_hInstance, IDS_CHTYPE_1, cNewStat, sizeof(cNewStat)); break;
case 2: LoadString(g_hInstance, IDS_CHTYPE_2, cNewStat, sizeof(cNewStat)); break;
case 3: LoadString(g_hInstance, IDS_CHTYPE_3, cNewStat, sizeof(cNewStat)); break;
case 4:
if(SsmGetAutoCallDirection(ch,&nDirection) == 0) 
{
if (nDirection==3)
wsprintf(cNewStat,"SS1Spy"); 
else
wsprintf(cNewStat,"SS1");
}
else if(nDirection==0)                           wsprintf(cNewStat,"SS1i"); 
else if(nDirection==1)                           wsprintf(cNewStat,"SS1o"); 
else                                          wsprintf(cNewStat,"SS1io"); 
break;
case 5: LoadString(g_hInstance, IDS_CHTYPE_5, cNewStat, sizeof(cNewStat)); break;
case 6:
if(SsmGetAutoCallDirection(ch,&nDirection) == 0) 
{
if (nDirection==3)
wsprintf(cNewStat,"SS7Spy"); 
else
wsprintf(cNewStat,"SS7");
}
else if(nDirection==0)                           wsprintf(cNewStat,"TUPi"); 
else if(nDirection==1)                           wsprintf(cNewStat,"TUPo"); 
else if(nDirection==2)                           wsprintf(cNewStat,"TUPio"); 
else                                             wsprintf(cNewStat,"TUP-x");
break;
case 7: //ISDN User ch
if(SsmGetAutoCallDirection(ch,&nDirection) == 0) 
{
if (nDirection==3)
wsprintf(cNewStat,"ISDNSpy"); 
else
wsprintf(cNewStat,"ISDN");
}
else if(nDirection==0)                           wsprintf(cNewStat,"ISDNi"); 
else if(nDirection==1)                           wsprintf(cNewStat,"ISDNo"); 
else if(nDirection==2)                           wsprintf(cNewStat,"ISDNio"); 
else  wsprintf(cNewStat,"ISDN");
break;
case 8: //Isdn Net ch
if(SsmGetAutoCallDirection(ch,&nDirection) == 0) 
{
if (nDirection==3)
wsprintf(cNewStat,"ISDNNetSpy"); 
else
wsprintf(cNewStat,"ISDNNet");
}
else if(nDirection==0)                           wsprintf(cNewStat,"ISDNNeti"); 
else if(nDirection==1)                           wsprintf(cNewStat,"ISDNNeto"); 
else if(nDirection==2)                           wsprintf(cNewStat,"ISDNNetio"); 
else  wsprintf(cNewStat,"ISDNNet");
break;
case 11:    wsprintf(cNewStat,"ISUPio");break;
//+++START+++ added by yxh for 2B+D, 2005.01.26
case 12: wsprintf(cNewStat, "DTR"); break;
//+++ END +++ added by yxh for 2B+D, 2005.01.26
//+++START+++ added by wza for voip, 2006.12.27
case 15: wsprintf(cNewStat, "H323"); break;
case 16: wsprintf(cNewStat, "SIP"); break;
//+++ END +++ added by wza for voip, 2005.12.27
default:
wsprintf(cNewStat,"-1"); break;
break;
}
//+++++end+++++ added by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
m_ChList.SetItemText( ch, ITEM_ChHwType, cNewStat);
}
}
void CTestView::InitChList(BOOL bFistTime)
{
LV_COLUMN lvc[MAXITEM];
LIST_PARA MainList[MAXITEM] = 
{
{24 ,"Ch",},
{60 ,"类型"},
{60 ,"状态"},
{45 ,"RCnt"},
{80 ,"CheckSendRCnt"}, //added by LCL for RingCounter, 2005.09.19
{100 ,"DTMF接收缓冲区"},
{42 ,"TnChk"},
{42 ,"2ndTnChk"},//ADDED BY yxd 2003.3.20
{24 ,"BI"},
{40 ,"Snd"},
{45 ,"PTime"},
{45 ,"PTimeEx"}, //Added By cqb For SHCTI030902 Test
{30 ,"P%"},
{55 ,"ChkPlay"},
{55,"GetPlayType"},
{55 ,"RecTime"},
{55 ,"ChkRec"},
{70 ,"OvrEnrg"},
{30 ,"AF"},
{30 ,"AFS"},
{30 ,"ECR"},
{80, "LCD"},
{80, "DKEY"}, //added by yxh for GetDKeyStr, 2005.09.02
{80 ,"CallerId"},
{80 ,"CallerIdEx"},
{30 ,"Vad"},
{50 ,"Fpeak"},
{45 ,"RxCAS"},
{45 ,"TxCAS"},
{45 ,"RxR2"},
{45 ,"TxR2"},
{160,"挂起原因"},
{60 ,"状态时间"},
{80 ,"被叫号码"},
{60 ,"极性反转"},
{120 ,"闭塞对端"},
{150 ,"呼出统计:收号/接续/总数/接续错/收号错"},
{150 ,"呼入统计:收号/接续/总数"} ,
{150, "IP编码格式"}
};
m_ChList.SetBkColor(RGB(0,0,0));
m_ChList.SetTextColor(RGB(0,255,0));
m_ChList.SetTextBkColor(RGB(0,0,0));
DWORD dwExtendedStyle = m_ChList.GetExtendedStyle();
dwExtendedStyle |= LVS_EX_FULLROWSELECT;
m_ChList.SetExtendedStyle(dwExtendedStyle);
for(WORD i=0; i {
lvc[i].mask     =  LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM | LVCF_FMT;
lvc[i].iSubItem = i;
lvc[i].pszText  = MainList[i].szText;
lvc[i].cx       = MainList[i].ColumnWidth;
if(i==0||i==17) lvc[i].fmt = LVCFMT_LEFT;
else            lvc[i].fmt = LVCFMT_RIGHT;
if(bFistTime)
m_ChList.InsertColumn(i,&lvc[i]);
}
m_ChList.DeleteAllItems();
char dig[4];
for(i=0; i m_ChList.InsertItem(i,_itoa(i,dig,10));
for(int ch=0; ch {
UpdateChList();
nOldChState[ch] = -100;
nOldRingCount[ch] = -100;
nOldRingFlag[ch] = -100;
nSendRingRst[ch] = -100; //added by LCL for RingCounter, 2005.09.19
nSendRingCnt[ch] = -100; //added by LCL for RingCounter, 2005.09.19
nToneAnalyzeResult[ch] = -100;
        n2ndToneAnalyzeResult[ch] = -100;//ADDED BY yxd 2003.3.20
nOldChkPlay[ch] = -100;
nOldGetPlayType[ch] = -100;
nOldChkRec[ch] = -100;
nOldSsmDetectBargeIn[ch] = -100;
lOldPlayedTime[ch] = -100L;
lOldPlayedTimeEx[ch] = -100L;
lOldRecTime[ch] = -100l;
lOldOverallEnergy[ch] = -100l;
nPlayedPct[ch] = -100;
nOldCallerIdEx[ch] = -100;
nOldEchoCancellerState[ch] = -100;
nOldEchoCancellerStudyState[ch] = -100;
nOldEchoCancellerRatio[ch] = -100;
nOldCallerI[ch] = -100;
nOldRxPhoNumLen[ch] = -100;
nOldLineVoltage[ch] = -100;
nOldPeakFrq[ch] = -100;
nOldGetCAS[ch] = -100;
nOldSendingCAS[ch] = -100;
nOldGetR2[ch] = -100;
nOldSendingR2[ch] = -100;
nOldGetSendingR2[ch] = -100;
nOldSendingR2Mode[ch] = -100;
nOldPhoNumStr[ch] = -100;
nOldPloarRvrsCount[ch] = -100;
nOldBlockRemoteStatus[ch] = -100;
//add by JK shi for 支持SetKB功能, begin
nOldPendReason[ch] = -100;
//add by JK shi for 支持SetKB功能, end
}
}
void CTestView::OnDestroy() 
{
CFormView::OnDestroy();
// TODO: Add your message handler code here
if(nIsSsmStartCtiOK == 0) 
{
SsmCloseCti();
}
KillTimer( uTimerId );
//+++START+++ added by yxh for SpyTest, 2003.08.22
if(pDlg != NULL)
{
delete pDlg;
}
//+++END+++   added by yxh for SpyTest, 2003.08.22
}
long lOldTime[MAX_CH];
DWORD dwEnergyTable[MAX_CH];
void CTestView::OnTimer(UINT nIDEvent) 
{
// TODO: Add your message handler code here and/or call default
char cNewStat[600],cOldStat[600],szRxCallerId[300];
//add by JK shi for 支持SetKB功能, begin
int nNewPendReason, nShowUpdate ;
//add by JK shi for 支持SetKB功能, end
int nResult, nNewChState, nRingFlag, nRet ;
long lResult;
//static long lOldTime[MAX_CH];
if(!bTimerOpen)
return ;
int nEnergy;
// if((lResult=SsmGetOverallEnergyAllCh(0, 30, dwEnergyTable)) != -1)
for(int k=0; k {
nEnergy=SsmGetOverallEnergy(k);
if(nEnergy>=0)
{
_itoa(nEnergy,cNewStat,10); 
m_ChList.SetItemText( k, ITEM_OverallEnergy, cNewStat );
}
}
for(int ch=0; ch {
if((nNewChState=SsmGetChState(ch)) != nOldChState[ch])

//++++start++++ masked by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
/* switch(nNewChState)
{
case -1: wsprintf(cNewStat,"-1"); break;
case S_CALL_STANDBY: wsprintf(cNewStat,"空闲"); break;
case S_CALL_PICKUPED: wsprintf(cNewStat,"摘机"); break;
case S_CALL_RINGING: wsprintf(cNewStat,"振铃"); break;
case S_CALL_TALKING: wsprintf(cNewStat,"通话"); break;
case S_CALL_ANALOG_WAITDIALTONE: wsprintf(cNewStat,"WtDT"); break;
case S_CALL_ANALOG_TXPHONUM: wsprintf(cNewStat,"Dl.."); break;
case S_CALL_ANALOG_WAITDIALRESULT: wsprintf(cNewStat,"WtDl"); break;
case S_CALL_PENDING: wsprintf(cNewStat,"挂起"); break;
case S_CALL_OFFLINE: wsprintf(cNewStat,"断线"); break;
case S_CALL_WAIT_REMOTE_PICKUP: wsprintf(cNewStat,"回铃"); break;
case S_CALL_UNAVAILABLE: wsprintf(cNewStat,"不可用"); break;
case S_CALL_LOCKED: wsprintf(cNewStat,"呼出保留"); break;
case S_CALL_LocalBlock: wsprintf(cNewStat,"本地闭塞"); break;
case S_CALL_RemoteBlock: wsprintf(cNewStat,"对端闭塞"); break;
case S_CALL_Ss1InWaitPhoNum  : wsprintf(cNewStat,"接收被叫"); break;
case S_CALL_Ss1InWaitFwdStop : wsprintf(cNewStat,"等待前向"); break;
case S_CALL_Ss1InWaitCallerID: wsprintf(cNewStat,"接收主叫"); break;
case S_CALL_Ss1InWaitKD      : wsprintf(cNewStat,"接收KD"); break;
case S_CALL_Ss1InWaitKDStop  : wsprintf(cNewStat,"等KD停发"); break;
case S_CALL_SS1_SAYIDLE      : wsprintf(cNewStat,"发送示闲"); break;
case S_CALL_SS1WaitIdleCAS   : wsprintf(cNewStat,"等待示闲"); break;
case S_CALL_SS1PhoNumHoldup  : wsprintf(cNewStat,"S_CALL_SS1PhoNumHoldup"); break;
case S_CALL_Ss1InWaitStopSendA3p: wsprintf(cNewStat,"S_CALL_Ss1InWaitStopSendA3p"); break;
case S_CALL_Ss1OutWaitBwdAck      : wsprintf(cNewStat,"等待后向占用证实信令”"); break;
case S_CALL_Ss1OutTxPhoNum        : wsprintf(cNewStat,"发送被叫"); break;
case S_CALL_Ss1OutWaitAppendPhoNum: wsprintf(cNewStat,"号码不足"); break;
case S_CALL_Ss1OutTxCallerID      : wsprintf(cNewStat,"发送主叫"); break;
case S_CALL_Ss1OutWaitKB          : wsprintf(cNewStat,"等待KB"); break;
case S_FAX_ROUND   : wsprintf(cNewStat,"状态转移过程中"); break;
case S_FAX_PhaseA  : wsprintf(cNewStat,"呼叫建立"); break;
case S_FAX_PhaseB  : wsprintf(cNewStat,"报文前处理"); break;
case S_FAX_SendDCS : wsprintf(cNewStat,"发送DCS信号"); break;
case S_FAX_Train   : wsprintf(cNewStat,"传输训练"); break;
case S_FAX_PhaseC  : wsprintf(cNewStat,"报文传输"); break;
case S_FAX_PhaseD  : wsprintf(cNewStat,"报文后处理"); break;
case S_FAX_NextPage: wsprintf(cNewStat,"传输下页"); break;
case S_FAX_AllSent : wsprintf(cNewStat,"传输结束"); break;
case S_FAX_PhaseE  : wsprintf(cNewStat,"呼叫释放"); break;
case S_FAX_Reset   : wsprintf(cNewStat,"复位猫"); break;
case S_FAX_Init    : wsprintf(cNewStat,"初始化猫"); break;
case S_FAX_RcvDCS  : wsprintf(cNewStat,"接收DCS"); break;
case S_FAX_SendFTT : wsprintf(cNewStat,"发送训练失败信号FTT"); break;
case S_FAX_SendCFR : wsprintf(cNewStat,"发送证实信号CFR"); break;
case S_TUP_WaitPcmReset: wsprintf(cNewStat,"电路复原"); break;
case S_TUP_WaitSAM: wsprintf(cNewStat,"等待SAM"); break;
case S_TUP_WaitGSM: wsprintf(cNewStat,"等待GSM"); break;
case S_TUP_WaitCLF: wsprintf(cNewStat,"等待CLF"); break;
case S_TUP_WaitPrefix: wsprintf(cNewStat,"接收局号"); break;
case S_TUP_WaitDialAnswer: wsprintf(cNewStat,"等待应答"); break;
case S_TUP_WaitRLG: wsprintf(cNewStat,"等待RLG"); break;
case S_ISDN_OUT_WAIT_NET_RESPONSE: wsprintf(cNewStat, "等待网络响应"); break;
case S_ISDN_OUT_PLS_APPEND_NO: wsprintf(cNewStat, "等待追加号码"); break;
case S_ISDN_IN_CHK_CALL_IN: wsprintf(cNewStat, "检测到呼入"); break;
case S_ISDN_IN_RCVING_NO: wsprintf(cNewStat,"正在接收号码"); break;
case S_ISDN_IN_WAIT_TALK: wsprintf(cNewStat, "准备进入通话"); break;
case S_ISDN_OUT_WAIT_ALERT: wsprintf(cNewStat, "等待提醒信号"); break;
case S_ISDN_CALL_BEGIN: wsprintf(cNewStat, "呼叫起始"); break;
case S_ISDN_WAIT_HUANGUP: wsprintf(cNewStat, "等待释放"); break;
case S_CALL_SENDRING: wsprintf(cNewStat, "发送振铃"); break;
case S_ISUP_WaitSAM:     wsprintf(cNewStat, "等待SAM");     break;
case S_ISUP_WaitRLC:     wsprintf(cNewStat, "等待RLC");     break;
case S_ISUP_WaitReset:     wsprintf(cNewStat, "电路复原");     break;
case S_ISUP_LocallyBlocked: wsprintf(cNewStat, "本地阻断");     break;
case S_ISUP_RemotelyBlocked: wsprintf(cNewStat, "远端阻断");     break;
case S_ISUP_WaitDialAnswer:         wsprintf(cNewStat, "等待ACM"); break;
case S_ISUP_WaitINF:     wsprintf(cNewStat, "等待INF");     break;
case S_DTRC_ACTIVE: wsprintf(cNewStat, "Active");     break;
default: wsprintf(cNewStat,"S=%d",nNewChState); break;
}*/
//+++++end+++++ masked by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
//++++start++++ added by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
switch(nNewChState)
{
case -1: wsprintf(cNewStat,"-1"); break;
case S_CALL_STANDBY: LoadString(g_hInstance, IDS_S_CALL_STANDBY, cNewStat, sizeof(cNewStat)); break;
case S_CALL_PICKUPED: LoadString(g_hInstance, IDS_S_CALL_PICKUPED, cNewStat, sizeof(cNewStat)); break;
case S_CALL_RINGING: LoadString(g_hInstance, IDS_S_CALL_RINGING, cNewStat, sizeof(cNewStat)); break;
case S_CALL_TALKING: LoadString(g_hInstance, IDS_S_CALL_TALKING, cNewStat, sizeof(cNewStat)); break;
case S_CALL_ANALOG_WAITDIALTONE: wsprintf(cNewStat,"WtDT"); break;
case S_CALL_ANALOG_TXPHONUM: wsprintf(cNewStat,"Dl.."); break;
case S_CALL_ANALOG_WAITDIALRESULT: wsprintf(cNewStat,"WtDl"); break;
case S_CALL_PENDING: LoadString(g_hInstance, IDS_S_CALL_PENDING, cNewStat, sizeof(cNewStat)); break;
case S_CALL_OFFLINE: LoadString(g_hInstance, IDS_S_CALL_OFFLINE, cNewStat, sizeof(cNewStat)); break;
case S_CALL_WAIT_REMOTE_PICKUP: LoadString(g_hInstance, IDS_S_CALL_WAIT_REMOTE_PICKUP, cNewStat, sizeof(cNewStat)); break;
case S_CALL_UNAVAILABLE: LoadString(g_hInstance, IDS_S_CALL_UNAVAILABLE, cNewStat, sizeof(cNewStat)); break;
case S_CALL_LOCKED: LoadString(g_hInstance, IDS_S_CALL_LOCKED, cNewStat, sizeof(cNewStat)); break;
case S_CALL_LocalBlock: LoadString(g_hInstance, IDS_S_CALL_LocalBlock, cNewStat, sizeof(cNewStat)); break;
case S_CALL_RemoteBlock: LoadString(g_hInstance, IDS_S_CALL_RemoteBlock, cNewStat, sizeof(cNewStat)); break;
case S_CALL_Ss1InWaitPhoNum  : LoadString(g_hInstance, IDS_S_CALL_Ss1InWaitPhoNum, cNewStat, sizeof(cNewStat)); break;
case S_CALL_Ss1InWaitFwdStop : LoadString(g_hInstance, IDS_S_CALL_Ss1InWaitFwdStop, cNewStat, sizeof(cNewStat)); break;
case S_CALL_Ss1InWaitCallerID: LoadString(g_hInstance, IDS_S_CALL_Ss1InWaitCallerID, cNewStat, sizeof(cNewStat)); break;
case S_CALL_Ss1InWaitKD      : LoadString(g_hInstance, IDS_S_CALL_Ss1InWaitKD, cNewStat, sizeof(cNewStat)); break;
case S_CALL_Ss1InWaitKDStop  : LoadString(g_hInstance, IDS_S_CALL_Ss1InWaitKDStop, cNewStat, sizeof(cNewStat)); break;
case S_CALL_SS1_SAYIDLE      : LoadString(g_hInstance, IDS_S_CALL_SS1_SAYIDLE, cNewStat, sizeof(cNewStat)); break;
case S_CALL_SS1WaitIdleCAS   : LoadString(g_hInstance, IDS_S_CALL_SS1WaitIdleCAS, cNewStat, sizeof(cNewStat)); break;
case S_CALL_SS1PhoNumHoldup  : LoadString(g_hInstance, IDS_S_CALL_SS1PhoNumHoldup, cNewStat, sizeof(cNewStat)); break;
case S_CALL_Ss1InWaitStopSendA3p: LoadString(g_hInstance, IDS_S_CALL_Ss1InWaitStopSendA3p, cNewStat, sizeof(cNewStat)); break;
case S_CALL_Ss1OutWaitBwdAck      : LoadString(g_hInstance, IDS_S_CALL_Ss1OutWaitBwdAck, cNewStat, sizeof(cNewStat)); break;
case S_CALL_Ss1OutTxPhoNum        : LoadString(g_hInstance, IDS_S_CALL_Ss1OutTxPhoNum, cNewStat, sizeof(cNewStat)); break;
case S_CALL_Ss1OutWaitAppendPhoNum: LoadString(g_hInstance, IDS_S_CALL_Ss1OutWaitAppendPhoNum, cNewStat, sizeof(cNewStat)); break;
case S_CALL_Ss1OutTxCallerID      : LoadString(g_hInstance, IDS_S_CALL_Ss1OutTxCallerID, cNewStat, sizeof(cNewStat)); break;
case S_CALL_Ss1OutWaitKB          : LoadString(g_hInstance, IDS_S_CALL_Ss1OutWaitKB, cNewStat, sizeof(cNewStat)); break;
case S_FAX_ROUND   : LoadString(g_hInstance, IDS_S_FAX_ROUND, cNewStat, sizeof(cNewStat)); break;
case S_FAX_PhaseA  : LoadString(g_hInstance, IDS_S_FAX_PhaseA, cNewStat, sizeof(cNewStat)); break;
case S_FAX_PhaseB  : LoadString(g_hInstance, IDS_S_FAX_PhaseB, cNewStat, sizeof(cNewStat)); break;
case S_FAX_SendDCS : LoadString(g_hInstance, IDS_S_FAX_SendDCS, cNewStat, sizeof(cNewStat)); break;
case S_FAX_Train   : LoadString(g_hInstance, IDS_S_FAX_Train, cNewStat, sizeof(cNewStat)); break;
case S_FAX_PhaseC  : LoadString(g_hInstance, IDS_S_FAX_PhaseC, cNewStat, sizeof(cNewStat)); break;
case S_FAX_PhaseD  : LoadString(g_hInstance, IDS_S_FAX_PhaseD, cNewStat, sizeof(cNewStat)); break;
case S_FAX_NextPage: LoadString(g_hInstance, IDS_S_FAX_NextPage, cNewStat, sizeof(cNewStat)); break;
case S_FAX_AllSent : LoadString(g_hInstance, IDS_S_FAX_AllSent, cNewStat, sizeof(cNewStat)); break;
case S_FAX_PhaseE  : LoadString(g_hInstance, IDS_S_FAX_PhaseE, cNewStat, sizeof(cNewStat)); break;
case S_FAX_Reset   : LoadString(g_hInstance, IDS_S_FAX_Reset, cNewStat, sizeof(cNewStat)); break;
case S_FAX_Init    : LoadString(g_hInstance, IDS_S_FAX_Init, cNewStat, sizeof(cNewStat)); break;
case S_FAX_RcvDCS  : LoadString(g_hInstance, IDS_S_FAX_RcvDCS, cNewStat, sizeof(cNewStat)); break;
case S_FAX_SendFTT : LoadString(g_hInstance, IDS_S_FAX_SendFTT, cNewStat, sizeof(cNewStat)); break;
case S_FAX_SendCFR : LoadString(g_hInstance, IDS_S_FAX_SendCFR, cNewStat, sizeof(cNewStat)); break;
case S_TUP_WaitPcmReset: LoadString(g_hInstance, IDS_S_TUP_WaitPcmReset, cNewStat, sizeof(cNewStat)); break;
case S_TUP_WaitSAM: LoadString(g_hInstance, IDS_S_TUP_WaitSAM, cNewStat, sizeof(cNewStat)); break;
case S_TUP_WaitGSM: LoadString(g_hInstance, IDS_S_TUP_WaitGSM, cNewStat, sizeof(cNewStat)); break;
case S_TUP_WaitCLF: LoadString(g_hInstance, IDS_S_TUP_WaitCLF, cNewStat, sizeof(cNewStat)); break;
case S_TUP_WaitPrefix: LoadString(g_hInstance, IDS_S_TUP_WaitPrefix, cNewStat, sizeof(cNewStat)); break;
case S_TUP_WaitDialAnswer: LoadString(g_hInstance, IDS_S_TUP_WaitDialAnswer, cNewStat, sizeof(cNewStat)); break;
case S_TUP_WaitRLG: LoadString(g_hInstance, IDS_S_TUP_WaitRLG, cNewStat, sizeof(cNewStat)); break;
case S_ISDN_OUT_WAIT_NET_RESPONSE: LoadString(g_hInstance, IDS_S_ISDN_OUT_WAIT_NET_RESPONSE, cNewStat, sizeof(cNewStat)); break;
case S_ISDN_OUT_PLS_APPEND_NO: LoadString(g_hInstance, IDS_S_ISDN_OUT_PLS_APPEND_NO, cNewStat, sizeof(cNewStat)); break;
case S_ISDN_IN_CHK_CALL_IN: LoadString(g_hInstance, IDS_S_ISDN_IN_CHK_CALL_IN, cNewStat, sizeof(cNewStat)); break;
case S_ISDN_IN_RCVING_NO: LoadString(g_hInstance, IDS_S_ISDN_IN_RCVING_NO, cNewStat, sizeof(cNewStat)); break;
case S_ISDN_IN_WAIT_TALK: LoadString(g_hInstance, IDS_S_ISDN_IN_WAIT_TALK, cNewStat, sizeof(cNewStat)); break;
case S_ISDN_OUT_WAIT_ALERT: LoadString(g_hInstance, IDS_S_ISDN_OUT_WAIT_ALERT, cNewStat, sizeof(cNewStat)); break;
case S_ISDN_CALL_BEGIN: LoadString(g_hInstance, IDS_S_ISDN_CALL_BEGIN, cNewStat, sizeof(cNewStat)); break;
case S_ISDN_WAIT_HUANGUP: LoadString(g_hInstance, IDS_S_ISDN_WAIT_HUANGUP, cNewStat, sizeof(cNewStat)); break;
case S_CALL_SENDRING: LoadString(g_hInstance, IDS_S_CALL_SENDRING, cNewStat, sizeof(cNewStat)); break;
case S_ISUP_WaitSAM:     LoadString(g_hInstance, IDS_S_ISUP_WaitSAM, cNewStat, sizeof(cNewStat)); break;
case S_ISUP_WaitRLC:     LoadString(g_hInstance, IDS_S_ISUP_WaitRLC, cNewStat, sizeof(cNewStat)); break;
case S_ISUP_WaitReset:     LoadString(g_hInstance, IDS_S_ISUP_WaitReset, cNewStat, sizeof(cNewStat)); break;
case S_ISUP_LocallyBlocked: LoadString(g_hInstance, IDS_S_ISUP_LocallyBlocked, cNewStat, sizeof(cNewStat)); break;
case S_ISUP_RemotelyBlocked: LoadString(g_hInstance, IDS_S_ISUP_RemotelyBlocked, cNewStat, sizeof(cNewStat)); break;
case S_ISUP_WaitDialAnswer:         LoadString(g_hInstance, IDS_S_ISUP_WaitDialAnswer, cNewStat, sizeof(cNewStat)); break;
case S_ISUP_WaitINF:     LoadString(g_hInstance, IDS_S_ISUP_WaitINF, cNewStat, sizeof(cNewStat)); break;
case S_DTRC_ACTIVE: LoadString(g_hInstance, IDS_S_DTRC_ACTIVE, cNewStat, sizeof(cNewStat)); break;
case S_CALL_VOIP_DIALING: LoadString(g_hInstance, IDS_S_VOIP_DIALING, cNewStat, sizeof(cNewStat)); break;
case S_CALL_VOIP_WAIT_CONNECTED: LoadString(g_hInstance, IDS_S_VOIP_WAIT_CONNECTED, cNewStat, sizeof(cNewStat)); break;
case S_CALL_VOIP_CHANNEL_UNUSABLE: LoadString(g_hInstance, IDS_S_VOIP_CHANNEL_UNUSABLE, cNewStat, sizeof(cNewStat)); break;
default: wsprintf(cNewStat,"S=%d",nNewChState); break;
}
//+++++end+++++ added by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
m_ChList.SetItemText( ch, ITEM_ChState, cNewStat );
}
if(bEnableOpRingDetect[ch])
{
nResult = SsmGetRingCount(ch);
nRingFlag = SsmGetRingFlag(ch);
if(nResult!=nOldRingCount[ch] || nRingFlag!=nOldRingFlag[ch])
{
wsprintf(cNewStat,"%d:%d",nRingFlag,nResult);
m_ChList.SetItemText( ch, ITEM_RingCount, cNewStat );
nOldRingCount[ch] = nResult;
nOldRingFlag[ch] = nRingFlag;
}
}
//+++START+++ added by LCL for RingCounter, 2005.09.19
int nSendRCnt = 0;
nResult = SsmCheckSendRing(ch, &nSendRCnt);
if(nSendRingRst[ch] != nResult || nSendRingCnt[ch] != nSendRCnt)
{
wsprintf(cNewStat, "%d:%d", nSendRCnt, nResult);
m_ChList.SetItemText(ch, ITEM_SendRingCount, cNewStat);
nSendRingCnt[ch] = nSendRCnt;
nSendRingRst[ch] = nResult;
}
//+++ END +++ added by LCL for RingCounter, 2005.09.19
nResult = SsmGetDtmfStr(ch,cNewStat);
if(nResult  == -1) wsprintf(cNewStat,"-1");
else if (nResult  == 0) wsprintf(cNewStat,"");
nResult = m_ChList.GetItemText( ch, ITEM_RxDTMF, cOldStat, 255 );
if(nResult==0)
cOldStat[0]='';
if ( strcmp(cNewStat,cOldStat) != 0 ) 
m_ChList.SetItemText( ch, ITEM_RxDTMF, cNewStat );
if(bEnableOpToneAnalyze[ch])
{
if((nResult=SsmGetToneAnalyzeResult(ch)) != nToneAnalyzeResult[ch])
{
nToneAnalyzeResult[ch] = nResult;
switch(nResult)
{
case -1: wsprintf(cNewStat,"-1"); break;
case 0: wsprintf(cNewStat,"?"); break;
case 1: wsprintf(cNewStat,"DlTn"); break;
case 2: wsprintf(cNewStat,"BsTn"); break;
case 3: wsprintf(cNewStat,"EcTn"); break;
case 4: wsprintf(cNewStat,"ENoVc"); break;
case 5: wsprintf(cNewStat,"NoVoc"); break;
case 6: wsprintf(cNewStat,"Voc");  break;
case 7: wsprintf(cNewStat,"VcF1"); break;
case 8: wsprintf(cNewStat,"VcF2"); break;
case 9: wsprintf(cNewStat,"AptTn"); break;//added by zyq for 060901-bug-测试组-修改Test的一些bug, 2006.09.05
}
m_ChList.SetItemText( ch, ITEM_ToneAnalyzeResult, cNewStat );
}
            //++start++  ADDED BY yxd 2003.3.20
if((nResult=SsmGet2ndToneAnalyzeResult(ch)) != n2ndToneAnalyzeResult[ch])
{
n2ndToneAnalyzeResult[ch] = nResult;
switch(nResult)
{
case -1: wsprintf(cNewStat,"-1"); break;
case 0: wsprintf(cNewStat,"?"); break;
case 1: wsprintf(cNewStat,"DlTn"); break;
case 2: wsprintf(cNewStat,"BsTn"); break;
case 3: wsprintf(cNewStat,"EcTn"); break;
//+++START+++ added by zyq for 060901-bug-测试组-修改Test的一些bug, 2006.09.05
case 4: wsprintf(cNewStat,"ENoVc"); break;
case 5: wsprintf(cNewStat,"NoVoc"); break;
case 6: wsprintf(cNewStat,"Voc");  break;
case 7: wsprintf(cNewStat,"VcF1"); break;
case 8: wsprintf(cNewStat,"VcF2"); break;
case 9: wsprintf(cNewStat,"AptTn"); break;
//+++ END +++ added by zyq for 060901-bug-测试组-修改Test的一些bug, 2006.09.05
}
m_ChList.SetItemText( ch, ITEM_2ndToneAnalyzeResult, cNewStat );
}
//++end++
/*
if((lResult=SsmGetOverallEnergy(ch)) != lOldOverallEnergy[ch])
{
lOldOverallEnergy[ch] = lResult;
_itoa(lResult,cNewStat,10); 
m_ChList.SetItemText( ch, ITEM_OverallEnergy, cNewStat );
}
*/
if((nResult=SsmGetPeakFrq(ch)) != nOldPeakFrq[ch])
{
nOldPeakFrq[ch] = nResult;
if(nResult==-1) wsprintf(cNewStat,"-1");
else            wsprintf(cNewStat,"%dHz",nResult);
m_ChList.SetItemText( ch, ITEM_PeakFreq, cNewStat );
}
}
//int WINAPI SsmDetectBargeIn(int ch)
if((nResult=SsmDetectBargeIn(ch)) != nOldSsmDetectBargeIn[ch])
{
nOldSsmDetectBargeIn[ch] = nResult;
wsprintf(cNewStat,"%d",nResult); 
m_ChList.SetItemText( ch, ITEM_Burgein, cNewStat );
}
//++++start++++ masked by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
/* switch(SsmDetectNoSound(ch))
{
case -1: wsprintf(cNewStat,"-1"); break;
case 0: wsprintf(cNewStat,"0:%d",SsmGetNoSoundTime(ch)/1000); break;
case 1: wsprintf(cNewStat,"无声",SsmGetNoSoundTime(ch)/1000); break;
}
*/
//+++++end+++++ masked by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
//++++start++++ added by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
switch(SsmDetectNoSound(ch))
{
case -1: wsprintf(cNewStat,"-1"); break;
case 0: wsprintf(cNewStat,"0:%d",SsmGetNoSoundTime(ch)/1000); break;
case 1: LoadString(g_hInstance, IDS_DetectSnd_NoSnd, cNewStat, sizeof(cNewStat)); break;
}
//+++++end+++++ added by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
if(strcmp(cNewStat,szOldNoSoundState[ch]) != 0 ) 
{
strcpy(szOldNoSoundState[ch],cNewStat);
m_ChList.SetItemText( ch, ITEM_DetectNoSound, cNewStat );
}
if((lResult=SsmGetPlayedTime(ch)) != lOldPlayedTime[ch])
{
lOldPlayedTime[ch] = lResult;
_itoa(lResult,cNewStat,10); 
m_ChList.SetItemText( ch, ITEM_PlayTime, cNewStat );
}
//++++START++++ added by cqb for SHCTI030902 Test
if((lResult=SsmGetPlayedTimeEx(ch)) != lOldPlayedTimeEx[ch])
{
lOldPlayedTimeEx[ch] = lResult;
_itoa(lResult,cNewStat,10); 
m_ChList.SetItemText( ch, ITEM_PlayTimeEx, cNewStat );
}
//++++END++++
if((nResult=SsmGetPlayedPercentage(ch)) != nPlayedPct[ch])
{
nPlayedPct[ch] = nResult;
_itoa(nResult,cNewStat,10);
m_ChList.SetItemText( ch, ITEM_PlayPercentage, cNewStat );
}
if((nResult=SsmCheckPlay(ch)) != nOldChkPlay[ch])
{
nOldChkPlay[ch] = nResult;
switch(nResult)
{
case -1: wsprintf(cNewStat,"-1"); break;
case CHKPLAY_PLAYING: wsprintf(cNewStat,"Playing"); break;
case CHKPLAY_NORMAL_END:wsprintf(cNewStat,"NmlEnd"); break;
case CHKPLAY_DTMF_END: wsprintf(cNewStat,"DtmfEnd"); break;
case CHKPLAY_BURGEIN: wsprintf(cNewStat,"BIEnd"); break;
case CHKPLAY_REMOTEHANGUP_END:wsprintf(cNewStat,"REMOTE HANGUP"); break;
case CHKPLAY_APPLICATION_END:wsprintf(cNewStat,"APP_STOPPLAY"); break;
case CHKPLAY_PAUSED: wsprintf(cNewStat,"APP_PAUSED"); break;
case CHKPLAY_LINKFROM_END: wsprintf(cNewStat,"LINKFORM_END"); break;
case CHKPLAY_NETDISCONNECT: wsprintf(cNewStat,"NET_DISCONNECT"); break;//Added by yxh, for 网络文件放音改进, 2003.09.30
}
m_ChList.SetItemText( ch, ITEM_ChkPlay, cNewStat );
}
      if((nResult=SsmGetPlayType(ch))!= nOldGetPlayType[ch])
  {
  nOldGetPlayType[ch] = nResult;
  switch(nResult)
  {
case -1: wsprintf(cNewStat,"-1"); break;
case 0: wsprintf(cNewStat,"PLAY_NULL"); break;
case 1:wsprintf(cNewStat,"PLAY_FILE"); break;
case 2: wsprintf(cNewStat,"PLAY_FILE_PAUSED"); break;
case 3: wsprintf(cNewStat,"PLAY_FILELIST"); break;
case 4:wsprintf(cNewStat,"PLAY_INDEXLIST"); break;
case 5:wsprintf(cNewStat,"PLAY_MEM"); break;
case 6: wsprintf(cNewStat,"PLAY_MEMLIST"); break;
case 7: wsprintf(cNewStat,"PLAY_FSK"); break;
case 8: wsprintf(cNewStat,"PLAY_MONITOR"); break;
case 9:wsprintf(cNewStat,"PLAY_MEMBLOCK");break;
  }
  m_ChList.SetItemText(ch,ITEM_GetPlayType,cNewStat);
  }
if((lResult=SsmGetRecTime(ch)) != lOldRecTime[ch])
{
lOldRecTime[ch] = lResult;
_itoa(lResult,cNewStat,10); 
m_ChList.SetItemText( ch, ITEM_RecTime, cNewStat );
}
if((nResult=SsmCheckRecord(ch)) != nOldChkRec[ch])
{
nOldChkRec[ch] = nResult;
switch(nResult)
{
case -1:
wsprintf(cNewStat,"-1"); break;
case CHKRECORD_RECORDING:    //0: recording
wsprintf(cNewStat,"recording"); break;
case CHKRECORD_APPLICATION_END: //1: application end
wsprintf(cNewStat,"AppEnd"); break;
case CHKRECORD_DTMF_END:    //2: record operation is stopped by DTMF key
wsprintf(cNewStat,"DtmfEnd"); break;
case CHKRECORD_REMOTEHANGUP_END://3: recor operation is stopped by remote hangup
wsprintf(cNewStat,"REMOTE HANGUP"); break;
case CHECKRECORD_TIMEUP_END:    //4: end of record for time up.
wsprintf(cNewStat,"TIMEUP_END"); break;
case CHECKRECORD_FILE_PAUSED:    //5: file record is paused.
wsprintf(cNewStat,"FILE_PAUSED"); break;
case CHECKRECORD_FILE_WRITE_ERROR:
wsprintf(cNewStat,"FILE_WRITE_ERROR");
}
m_ChList.SetItemText( ch, ITEM_ChkRec, cNewStat );
}
if(bEnableOpEchoCanceller[ch])
{
if((nResult=SsmGetEchoCancellerState(ch)) != nOldEchoCancellerState[ch])
{
nOldEchoCancellerState[ch] = nResult;
_itoa(nResult,cNewStat,10);
m_ChList.SetItemText( ch, ITEM_AdaptiveFilter, cNewStat );
}
if((nResult=SsmGetEchoCancellerStudyState(ch)) != nOldEchoCancellerStudyState[ch])
{
nOldEchoCancellerStudyState[ch] = nResult;
_itoa(nResult,cNewStat,10);
m_ChList.SetItemText( ch, ITEM_AdaptiveFilterStudy, cNewStat );
}
if((nResult=SsmGetEchoCancellerRatio(ch)) != nOldEchoCancellerRatio[ch])
{
nOldEchoCancellerRatio[ch] = nResult;
_itoa(nResult,cNewStat,10);
m_ChList.SetItemText( ch, ITEM_ECRatio, cNewStat );
}
}
nResult = DTRGetLCDStr(ch, cNewStat);
if(nResult  == -1) wsprintf(cNewStat, "-1");
else if(nResult  == 0) wsprintf(cNewStat, "");
nResult = m_ChList.GetItemText(ch, ITEM_LCD, cOldStat, 300);
if(nResult == 0)
cOldStat[0] = '';
if (strcmp(cNewStat,cOldStat) != 0) 
m_ChList.SetItemText(ch, ITEM_LCD, cNewStat);
//+++START+++ added by yxh for GetDKeyStr, 2005.09.02
nResult = DTRGetDKeyStr(ch, cNewStat);
if(nResult  == -1) wsprintf(cNewStat, "-1");
else if(nResult  == 0) wsprintf(cNewStat, "");
nResult = m_ChList.GetItemText(ch, ITEM_DKEY, cOldStat, 300);
if(nResult == 0)
cOldStat[0] = '';
if (strcmp(cNewStat,cOldStat) != 0) 
m_ChList.SetItemText(ch, ITEM_DKEY, cNewStat);
//+++ END +++ added by yxh for GetDKeyStr, 2005.09.02
nResult = SsmGetCallerId(ch,cNewStat);
if(nResult  == -1) wsprintf(cNewStat, "-1");
else if(nResult  == 0) wsprintf(cNewStat, "");
nResult = m_ChList.GetItemText( ch, ITEM_CallerId, cOldStat, 300 );
if(nResult == 0)
cOldStat[0] = '';
if ( strcmp(cNewStat,cOldStat) != 0 ) 
m_ChList.SetItemText( ch, ITEM_CallerId, cNewStat );
//if((nResult=SsmGetCallerId(ch,cNewStat)) != nOldCallerI[ch]
// || nResult != 0)
//{
// nResult=SsmGetCallerId(ch,cNewStat);
// nOldCallerI[ch] = nResult;
// if(nResult == -1) wsprintf(cNewStat,"-1");
// else if(nResult == 0) wsprintf(cNewStat,"");
// m_ChList.SetItemText( ch, ITEM_CallerId, cNewStat );
//}
nResult = SsmGetCallerIdEx(ch,szRxCallerId);
if(nResult == -1) wsprintf(szRxCallerId, "");
else if(nResult == 0) wsprintf(szRxCallerId, "");
nRet = m_ChList.GetItemText( ch, ITEM_CallerIdEx, cOldStat, 300 );
if(nRet==0)
cOldStat[0]='';
if ( strcmp(szRxCallerId,cOldStat) != 0 ) 
{
wsprintf(cNewStat,"");
for(int k=0; k m_ChList.SetItemText( ch, ITEM_CallerIdEx, cNewStat );
}
// if((nResult=SsmGetCallerIdEx(ch,szRxCallerId)) != nOldCallerIdEx[ch]
// || nResult != 0)
// {
// nResult=SsmGetCallerIdEx(ch,szRxCallerId);
// nOldCallerIdEx[ch] = nResult;
// if(nResult == -1) wsprintf(cNewStat,"-1");
// else if(nResult == 0) wsprintf(cNewStat,"");
// else
// {
// wsprintf(cNewStat,"");
// for(int k=0; k // }
// m_ChList.SetItemText( ch, ITEM_CallerIdEx, cNewStat );
// }
if(bEnableOpADC[ch])
{
if((nResult=SsmGetLineVoltage(ch)) != nOldLineVoltage[ch])
{
nOldLineVoltage[ch] = nResult;
_itoa(nResult,cNewStat,10);
m_ChList.SetItemText( ch, ITEM_Vad, cNewStat );
}
}
if((nResult=SsmGetCAS(ch)) != nOldGetCAS[ch])
{
nOldGetCAS[ch] = nResult;
if(nResult == -1) wsprintf(cNewStat,"-1",nResult);
else wsprintf(cNewStat,"0x%x",nResult);
m_ChList.SetItemText( ch, ITEM_RxCAS, cNewStat );
}
if((nResult=SsmGetSendingCAS(ch)) != nOldSendingCAS[ch])
{
nOldSendingCAS[ch] = nResult;
if(nResult == -1) wsprintf(cNewStat,"-1",nResult);
else wsprintf(cNewStat,"0x%x",nResult);
m_ChList.SetItemText( ch, ITEM_TxCAS, cNewStat );
}
if((nResult=SsmGetR2(ch)) != nOldGetR2[ch])
{
nOldGetR2[ch] = nResult;
wsprintf(cNewStat,"%d",nResult);
m_ChList.SetItemText( ch, ITEM_RxR2, cNewStat );
}
int nMode;
BYTE btRxR2;
nResult = SsmGetSendingR2(ch,&nMode,&btRxR2);
if(nResult != nOldGetSendingR2[ch])
{
nOldGetSendingR2[ch] = nResult;
if(nResult == -1) m_ChList.SetItemText( ch, 23, "-1");
else if(nOldSendingR2Mode[ch]!=nMode || nOldSendingR2[ch]!=btRxR2)
{
nOldSendingR2Mode[ch] = nMode;
nOldSendingR2[ch] = btRxR2;
if(nMode==0) wsprintf(cNewStat,"B:%d",btRxR2);
else         wsprintf(cNewStat,"F:%d",btRxR2);
m_ChList.SetItemText( ch, ITEM_TxR2, cNewStat );
}
}
//add by JK shi for 支持SetKB功能, begin
nShowUpdate=0;
if (nNewChState==S_CALL_PENDING)
{
if(nOldChState[ch]!=S_CALL_PENDING)
nShowUpdate=1;
else
{
nNewPendReason=SsmGetPendingReason(ch);
if (nOldPendReason[ch]!=nNewPendReason)
nShowUpdate=1;
}
}
//add by JK shi for 支持SetKB功能, end
//if(nOldChState[ch]!=S_CALL_PENDING && nNewChState==S_CALL_PENDING)
if (nShowUpdate)
{
//++++start++++ masked by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
/* switch(nResult=SsmGetPendingReason(ch))
{
case -1: wsprintf(cNewStat,"-1"); break;
case ANALOGOUT_NO_DIALTONE: wsprintf(cNewStat,"模拟:没有拨号音"); break;
case ANALOGOUT_BUSYTONE: wsprintf(cNewStat,"模拟:忙音"); break;
case ANALOGOUT_ECHO_NOVOICE: wsprintf(cNewStat,"模拟:回铃后无声"); break;
case ANALOGOUT_NOANSWER: wsprintf(cNewStat,"模拟:没有应答"); break;
case ANALOGOUT_TALKING_REMOTE_HANGUPED: wsprintf(cNewStat,"模拟:远端挂机"); break;
case ANALOGOUT_NOVOICE: wsprintf(cNewStat,"模拟:拨号后线路无声"); break;
case PEND_WaitBckStpMsg: wsprintf(cNewStat,"等待APP设置后向建立消息"); break;
case SS1IN_BWD_KB5: wsprintf(cNewStat,"SS1IN收到KB5"); break;
case PEND_RemoteHangupOnTalking: wsprintf(cNewStat,"呼入:通话时主叫先挂机"); break;
case PEND_SsxUnusable: wsprintf(cNewStat,"通话时信令不可用"); break;
case PEND_CircuitReset: wsprintf(cNewStat,"电路复原"); break;
case PEND_CalleeHangupOnTalking: wsprintf(cNewStat,"呼出:被叫先挂机"); break;
case SS1OUT_NOANSWER: wsprintf(cNewStat,"No1: 无人接听"); break;
case SS1OUT_NOBWDACK: wsprintf(cNewStat,"No1: 没有应答信号"); break;
case SS1OUT_DIALING_BWD_HANGUP: wsprintf(cNewStat,"No1: 检测到被叫拆线"); break;
case SS1OUT_BWD_A5: wsprintf(cNewStat,"No1: 收到后向A5"); break;
case SS1OUT_BWD_KB5: wsprintf(cNewStat,"No1: 收到后向KB5"); break;
case SS1OUT_BWD_KB2: wsprintf(cNewStat,"No1: 收到后向KB2"); break;
case SS1OUT_BWD_KB3: wsprintf(cNewStat,"No1: 收到后向KB3"); break;
case SS1OUT_BWD_A4: wsprintf(cNewStat,"No1: 收到后向A4"); break;
case SS1OUT_BWD_KB4: wsprintf(cNewStat,"No1: 收到后向KB4"); break;
case SS1OUT_TIMEOUT_BWD_A: wsprintf(cNewStat,"No1: 等待后向A超时"); break;
case SS1OUT_TIMEOUT_BWD_A_STOP: wsprintf(cNewStat,"No1: 等待后向A停发超时"); break;
case SS1OUT_TIMEOUT_BWD_KB: wsprintf(cNewStat,"No1: 等待KB超时"); break;
case SS1OUT_TIMEOUT_BWD_KB_STOP: wsprintf(cNewStat,"No1: 等待KB停发超时"); break;
case SS1OUT_TIMEOUT_CALLERID_BWD_A1: wsprintf(cNewStat,"No1: 发主叫等待A1超时"); break;
case SS1OUT_TIMEOUT_CALLERID_BWD_A1_STOP: wsprintf(cNewStat,"No1: 发主叫等待A1停发超时"); break;
case SS1OUT_UNDEFINED_CALLERID_BWD_A: wsprintf(cNewStat,"No1: 发主叫收到未定义后向A"); break;
case SS1OUT_UNDEFINED_BWD_A: wsprintf(cNewStat,"No1: 收到未定义后向A"); break;
case SS1OUT_UNDEFINED_BWD_KB: wsprintf(cNewStat,"No1: 收到未定义KB"); break;
case ISDN_CALLOVER: wsprintf(cNewStat,"ISDN:呼叫正常结束,对方先挂机"); break;
case ISDN_WAIT_RELEASE: wsprintf(cNewStat,"ISDN:等待释放" ); break;
case ISDN_HANGING: wsprintf(cNewStat,"ISDN:正在拆线" ); break;
case ISDN_RELEASING : wsprintf(cNewStat,"ISDN:正在释放" ); break;
case ISDN_UNALLOCATED_NUMBER: wsprintf(cNewStat,"ISDN:未分配的号码"); break;
case ISDN_NETWORK_BUSY: wsprintf(cNewStat,"ISDN:网络忙"); break;
case ISDN_CIRCUIT_NOT_AVAILABLE: wsprintf(cNewStat, "ISDN:指定的电路不可用"); break;
case ISDN_NO_ANSWER: wsprintf(cNewStat, "ISDN:无应答"); break;
case ISDN_CALL_REJ:     wsprintf(cNewStat, "ISDN:呼叫拒绝"); break;
case PEND_AutoDialFailed:
switch(SsmGetAutoDialFailureReason(ch))
{
case ATDL_NULL: wsprintf(cNewStat,""); break;
case ATDL_Cancel: wsprintf(cNewStat,"拨号失败:取消"); break;
case ATDL_WaitDialAnsTimeout: wsprintf(cNewStat,"拨号失败:等候应答超时"); break;
case ATDL_WaitRemotePickupTimeout: wsprintf(cNewStat,"拨号失败:等候被叫摘机超时");  break;
case ATDL_Mtp3Unusable: wsprintf(cNewStat,"拨号失败:MTP3不可用"); break;
case ATDL_RcvSSB: wsprintf(cNewStat,"拨号失败:收到SSB"); break;
case ATDL_RcvSLB: wsprintf(cNewStat,"拨号失败:收到SLB"); break;
case ATDL_RcvSTB: wsprintf(cNewStat,"拨号失败:收到STB"); break;
case ATDL_RcvUNN: wsprintf(cNewStat,"拨号失败:收到UNN"); break;
case ATDL_RcvSEC: wsprintf(cNewStat,"拨号失败:收到SEC"); break;
case ATDL_RcvCGC: wsprintf(cNewStat,"拨号失败:收到CGC"); break;
case ATDL_RcvNNC: wsprintf(cNewStat,"拨号失败:收到NNC"); break;
case ATDL_RcvCFL: wsprintf(cNewStat,"拨号失败:收到CFL"); break;
case ATDL_RcvLOS: wsprintf(cNewStat,"拨号失败:收到LOS"); break;
case ATDL_RcvSST: wsprintf(cNewStat,"拨号失败:收到SST"); break;
case ATDL_RcvACB: wsprintf(cNewStat,"拨号失败:收到ACB"); break;
case ATDL_RcvDPN: wsprintf(cNewStat,"拨号失败:收到DPN"); break;
case ATDL_RcvEUM: wsprintf(cNewStat,"拨号失败:收到EUM"); break;
case ATDL_RcvADI: wsprintf(cNewStat,"拨号失败:收到ADI"); break;
case ATDL_RcvBLO: wsprintf(cNewStat,"拨号失败:收到BLO"); break;
case ATDL_DoubleOccupy: wsprintf(cNewStat,"拨号失败:检出同抢"); break;
case ATDL_CircuitReset: wsprintf(cNewStat,"拨号失败:电路复原"); break;
case ATDL_BlockedByRemote: wsprintf(cNewStat,"拨号失败:对端闭塞"); break;
case ATDL_SS1WaitOccupyAckTimeout: wsprintf(cNewStat,"拨号失败:等待占用应答超时"); break;
case ATDL_SS1RcvCAS_HANGUP: wsprintf(cNewStat,"拨号失败:收到后向拆线信号"); break;
case ATDL_SS1RcvA4: wsprintf(cNewStat,"拨号失败:收到A4信号"); break;
case ATDL_SS1RcvA5: wsprintf(cNewStat,"拨号失败:收到A5信号"); break;
case ATDL_SS1RcvUndefinedAx: wsprintf(cNewStat,"拨号失败:收到未定义后向A"); break;
case ATDL_SS1RcvUndefinedAxOnTxCallerId: wsprintf(cNewStat,"拨号失败:送主叫收到未定义A"); break;
case ATDL_SS1WaitAxTimeout: wsprintf(cNewStat,"拨号失败:等候后向A超时"); break;
case ATDL_SS1WaitAxStopTimeout: wsprintf(cNewStat,"拨号失败:等候后向A组停发超时"); break;
case ATDL_SS1WaitAxTimeoutOnTxCallerId: wsprintf(cNewStat,"拨号失败:送主叫等候后向A超时"); break;
case ATDL_SS1WaitAxStopTimeoutOnTxCallerId: wsprintf(cNewStat,"拨号失败:送主叫等候后向A停发超时"); break;
case ATDL_SS1RcvKB2: wsprintf(cNewStat,"拨号失败:收到KB2信号"); break;
case ATDL_SS1RcvKB3: wsprintf(cNewStat,"拨号失败:收到KB3信号"); break;
case ATDL_SS1RcvKB4: wsprintf(cNewStat,"拨号失败:收到KB4信号"); break;
case ATDL_SS1RcvKB5: wsprintf(cNewStat,"拨号失败:收到KB5信号"); break;
case ATDL_SS1RcvUndefinedKB: wsprintf(cNewStat,"拨号失败:收到未定义KB信号"); break;
case ATDL_SS1WaitKBTimeout: wsprintf(cNewStat,"拨号失败:接收后向KB信号超时"); break;
case ATDL_SS1WaitKBStopTimeout: wsprintf(cNewStat,"拨号失败:等候被叫停发KB超时"); break;
case ATDL_ISDNNETISBUS  : wsprintf(cNewStat,"拨号失败:网络忙" ); break;
default :
wsprintf(cNewStat,"拨号失败: ???"); 
break;
}
break;
default:
wsprintf(cNewStat,"%d",nResult); break;
break;
}
*/
//+++++end+++++ masked by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
//++++start++++ added by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
switch(nResult=SsmGetPendingReason(ch))
{
case -1: wsprintf(cNewStat,"-1"); break;
case ANALOGOUT_NO_DIALTONE: LoadString(g_hInstance, IDS_ANALOGOUT_NO_DIALTONE, cNewStat, sizeof(cNewStat)); break;
case ANALOGOUT_BUSYTONE: LoadString(g_hInstance, IDS_ANALOGOUT_BUSYTONE, cNewStat, sizeof(cNewStat)); break;
case ANALOGOUT_ECHO_NOVOICE: LoadString(g_hInstance, IDS_ANALOGOUT_ECHO_NOVOICE, cNewStat, sizeof(cNewStat)); break;
case ANALOGOUT_NOANSWER: LoadString(g_hInstance, IDS_ANALOGOUT_NOANSWER, cNewStat, sizeof(cNewStat)); break;
case ANALOGOUT_TALKING_REMOTE_HANGUPED: LoadString(g_hInstance, IDS_ANALOGOUT_TALKING_REMOTE_HANGUPED, cNewStat, sizeof(cNewStat)); break;
case ANALOGOUT_NOVOICE: LoadString(g_hInstance, IDS_ANALOGOUT_NOVOICE, cNewStat, sizeof(cNewStat)); break;
case PEND_WaitBckStpMsg: LoadString(g_hInstance, IDS_PEND_WaitBckStpMsg, cNewStat, sizeof(cNewStat)); break;
case SS1IN_BWD_KB5: LoadString(g_hInstance, IDS_SS1IN_BWD_KB5, cNewStat, sizeof(cNewStat)); break;
case PEND_RemoteHangupOnTalking: LoadString(g_hInstance, IDS_PEND_RemoteHangupOnTalking, cNewStat, sizeof(cNewStat)); break;
case PEND_SsxUnusable: LoadString(g_hInstance, IDS_PEND_SsxUnusable, cNewStat, sizeof(cNewStat)); break;
case PEND_CircuitReset: LoadString(g_hInstance, IDS_PEND_CircuitReset, cNewStat, sizeof(cNewStat)); break;
case PEND_CalleeHangupOnTalking: LoadString(g_hInstance, IDS_PEND_CalleeHangupOnTalking, cNewStat, sizeof(cNewStat)); break;
case SS1OUT_NOANSWER: LoadString(g_hInstance, IDS_SS1OUT_NOANSWER, cNewStat, sizeof(cNewStat)); break;
case SS1OUT_NOBWDACK: LoadString(g_hInstance, IDS_SS1OUT_NOBWDACK, cNewStat, sizeof(cNewStat)); break;
case SS1OUT_DIALING_BWD_HANGUP: LoadString(g_hInstance, IDS_SS1OUT_DIALING_BWD_HANGUP, cNewStat, sizeof(cNewStat)); break;
case SS1OUT_BWD_A5: LoadString(g_hInstance, IDS_SS1OUT_BWD_A5, cNewStat, sizeof(cNewStat)); break;
case SS1OUT_BWD_KB5: LoadString(g_hInstance, IDS_SS1OUT_BWD_KB5, cNewStat, sizeof(cNewStat)); break;
case SS1OUT_BWD_KB2: LoadString(g_hInstance, IDS_SS1OUT_BWD_KB2, cNewStat, sizeof(cNewStat)); break;
case SS1OUT_BWD_KB3: LoadString(g_hInstance, IDS_SS1OUT_BWD_KB3, cNewStat, sizeof(cNewStat)); break;
case SS1OUT_BWD_A4: LoadString(g_hInstance, IDS_SS1OUT_BWD_A4, cNewStat, sizeof(cNewStat)); break;
case SS1OUT_BWD_KB4: LoadString(g_hInstance, IDS_SS1OUT_BWD_KB4, cNewStat, sizeof(cNewStat)); break;
case SS1OUT_TIMEOUT_BWD_A: LoadString(g_hInstance, IDS_SS1OUT_TIMEOUT_BWD_A, cNewStat, sizeof(cNewStat)); break;
case SS1OUT_TIMEOUT_BWD_A_STOP: LoadString(g_hInstance, IDS_SS1OUT_TIMEOUT_BWD_A_STOP, cNewStat, sizeof(cNewStat)); break;
case SS1OUT_TIMEOUT_BWD_KB: LoadString(g_hInstance, IDS_SS1OUT_TIMEOUT_BWD_KB, cNewStat, sizeof(cNewStat)); break;
case SS1OUT_TIMEOUT_BWD_KB_STOP: LoadString(g_hInstance, IDS_SS1OUT_TIMEOUT_BWD_KB_STOP, cNewStat, sizeof(cNewStat)); break;
case SS1OUT_TIMEOUT_CALLERID_BWD_A1: LoadString(g_hInstance, IDS_SS1OUT_TIMEOUT_CALLERID_BWD_A1, cNewStat, sizeof(cNewStat)); break;
case SS1OUT_TIMEOUT_CALLERID_BWD_A1_STOP: LoadString(g_hInstance, IDS_SS1OUT_TIMEOUT_CALLERID_BWD_A1_STOP, cNewStat, sizeof(cNewStat)); break;
case SS1OUT_UNDEFINED_CALLERID_BWD_A: LoadString(g_hInstance, IDS_SS1OUT_UNDEFINED_CALLERID_BWD_A, cNewStat, sizeof(cNewStat)); break;
case SS1OUT_UNDEFINED_BWD_A: LoadString(g_hInstance, IDS_SS1OUT_UNDEFINED_BWD_A, cNewStat, sizeof(cNewStat)); break;
case SS1OUT_UNDEFINED_BWD_KB: LoadString(g_hInstance, IDS_SS1OUT_UNDEFINED_BWD_KB, cNewStat, sizeof(cNewStat)); break;
case ISDN_CALLOVER: LoadString(g_hInstance, IDS_ISDN_CALLOVER, cNewStat, sizeof(cNewStat)); break;
case ISDN_WAIT_RELEASE: LoadString(g_hInstance, IDS_ISDN_WAIT_RELEASE, cNewStat, sizeof(cNewStat)); break;
case ISDN_HANGING: LoadString(g_hInstance, IDS_ISDN_HANGING, cNewStat, sizeof(cNewStat)); break;
case ISDN_RELEASING : LoadString(g_hInstance, IDS_ISDN_RELEASING, cNewStat, sizeof(cNewStat)); break;
case ISDN_UNALLOCATED_NUMBER: LoadString(g_hInstance, IDS_ISDN_UNALLOCATED_NUMBER, cNewStat, sizeof(cNewStat)); break;
case ISDN_NETWORK_BUSY: LoadString(g_hInstance, IDS_ISDN_NETWORK_BUSY, cNewStat, sizeof(cNewStat)); break;
case ISDN_CIRCUIT_NOT_AVAILABLE: LoadString(g_hInstance, IDS_ISDN_CIRCUIT_NOT_AVAILABLE, cNewStat, sizeof(cNewStat)); break;
case ISDN_NO_ANSWER: LoadString(g_hInstance, IDS_ISDN_NO_ANSWER, cNewStat, sizeof(cNewStat)); break;
case ISDN_CALL_REJ:     LoadString(g_hInstance, IDS_ISDN_CALL_REJ, cNewStat, sizeof(cNewStat)); break;
case PEND_AutoDialFailed:
switch(SsmGetAutoDialFailureReason(ch))
{
case ATDL_NULL: LoadString(g_hInstance, IDS_ATDL_NULL, cNewStat, sizeof(cNewStat)); break;
case ATDL_Cancel: LoadString(g_hInstance, IDS_ATDL_Cancel, cNewStat, sizeof(cNewStat)); break;
case ATDL_WaitDialAnsTimeout: LoadString(g_hInstance, IDS_ATDL_WaitDialAnsTimeout, cNewStat, sizeof(cNewStat)); break;
case ATDL_WaitRemotePickupTimeout: LoadString(g_hInstance, IDS_ATDL_WaitRemotePickupTimeout, cNewStat, sizeof(cNewStat));  break;
case ATDL_Mtp3Unusable: LoadString(g_hInstance, IDS_ATDL_Mtp3Unusable, cNewStat, sizeof(cNewStat)); break;
case ATDL_RcvSSB: LoadString(g_hInstance, IDS_ATDL_RcvSSB, cNewStat, sizeof(cNewStat)); break;
case ATDL_RcvSLB: LoadString(g_hInstance, IDS_ATDL_RcvSLB, cNewStat, sizeof(cNewStat)); break;
case ATDL_RcvSTB: LoadString(g_hInstance, IDS_ATDL_RcvSTB, cNewStat, sizeof(cNewStat)); break;
case ATDL_RcvUNN: LoadString(g_hInstance, IDS_ATDL_RcvUNN, cNewStat, sizeof(cNewStat)); break;
case ATDL_RcvSEC: LoadString(g_hInstance, IDS_ATDL_RcvSEC, cNewStat, sizeof(cNewStat)); break;
case ATDL_RcvCGC: LoadString(g_hInstance, IDS_ATDL_RcvCGC, cNewStat, sizeof(cNewStat)); break;
case ATDL_RcvNNC: LoadString(g_hInstance, IDS_ATDL_RcvNNC, cNewStat, sizeof(cNewStat)); break;
case ATDL_RcvCFL: LoadString(g_hInstance, IDS_ATDL_RcvCFL, cNewStat, sizeof(cNewStat)); break;
case ATDL_RcvLOS: LoadString(g_hInstance, IDS_ATDL_RcvLOS, cNewStat, sizeof(cNewStat)); break;
case ATDL_RcvSST: LoadString(g_hInstance, IDS_ATDL_RcvSST, cNewStat, sizeof(cNewStat)); break;
case ATDL_RcvACB: LoadString(g_hInstance, IDS_ATDL_RcvACB, cNewStat, sizeof(cNewStat)); break;
case ATDL_RcvDPN: LoadString(g_hInstance, IDS_ATDL_RcvDPN, cNewStat, sizeof(cNewStat)); break;
case ATDL_RcvEUM: LoadString(g_hInstance, IDS_ATDL_RcvEUM, cNewStat, sizeof(cNewStat)); break;
case ATDL_RcvADI: LoadString(g_hInstance, IDS_ATDL_RcvADI, cNewStat, sizeof(cNewStat)); break;
case ATDL_RcvBLO: LoadString(g_hInstance, IDS_ATDL_RcvBLO, cNewStat, sizeof(cNewStat)); break;
case ATDL_DoubleOccupy: LoadString(g_hInstance, IDS_ATDL_DoubleOccupy, cNewStat, sizeof(cNewStat)); break;
case ATDL_CircuitReset: LoadString(g_hInstance, IDS_ATDL_CircuitReset, cNewStat, sizeof(cNewStat)); break;
case ATDL_BlockedByRemote: LoadString(g_hInstance, IDS_ATDL_BlockedByRemote, cNewStat, sizeof(cNewStat)); break;
case ATDL_SS1WaitOccupyAckTimeout: LoadString(g_hInstance, IDS_ATDL_SS1WaitOccupyAckTimeout, cNewStat, sizeof(cNewStat)); break;
case ATDL_SS1RcvCAS_HANGUP: LoadString(g_hInstance, IDS_ATDL_SS1RcvCAS_HANGUP, cNewStat, sizeof(cNewStat)); break;
case ATDL_SS1RcvA4: LoadString(g_hInstance, IDS_ATDL_SS1RcvA4, cNewStat, sizeof(cNewStat)); break;
case ATDL_SS1RcvA5: LoadString(g_hInstance, IDS_ATDL_SS1RcvA5, cNewStat, sizeof(cNewStat)); break;
case ATDL_SS1RcvUndefinedAx: LoadString(g_hInstance, IDS_ATDL_SS1RcvUndefinedAx, cNewStat, sizeof(cNewStat)); break;
case ATDL_SS1RcvUndefinedAxOnTxCallerId: LoadString(g_hInstance, IDS_ATDL_SS1RcvUndefinedAxOnTxCallerId, cNewStat, sizeof(cNewStat)); break;
case ATDL_SS1WaitAxTimeout: LoadString(g_hInstance, IDS_ATDL_SS1WaitAxTimeout, cNewStat, sizeof(cNewStat)); break;
case ATDL_SS1WaitAxStopTimeout: LoadString(g_hInstance, IDS_ATDL_SS1WaitAxStopTimeout, cNewStat, sizeof(cNewStat)); break;
case ATDL_SS1WaitAxTimeoutOnTxCallerId: LoadString(g_hInstance, IDS_ATDL_SS1WaitAxTimeoutOnTxCallerId, cNewStat, sizeof(cNewStat)); break;
case ATDL_SS1WaitAxStopTimeoutOnTxCallerId: LoadString(g_hInstance, IDS_ATDL_SS1WaitAxStopTimeoutOnTxCallerId, cNewStat, sizeof(cNewStat)); break;
case ATDL_SS1RcvKB2: LoadString(g_hInstance, IDS_ATDL_SS1RcvKB2, cNewStat, sizeof(cNewStat)); break;
case ATDL_SS1RcvKB3: LoadString(g_hInstance, IDS_ATDL_SS1RcvKB3, cNewStat, sizeof(cNewStat)); break;
case ATDL_SS1RcvKB4: LoadString(g_hInstance, IDS_ATDL_SS1RcvKB4, cNewStat, sizeof(cNewStat)); break;
case ATDL_SS1RcvKB5: LoadString(g_hInstance, IDS_ATDL_SS1RcvKB5, cNewStat, sizeof(cNewStat)); break;
case ATDL_SS1RcvUndefinedKB: LoadString(g_hInstance, IDS_ATDL_SS1RcvUndefinedKB, cNewStat, sizeof(cNewStat)); break;
case ATDL_SS1WaitKBTimeout: LoadString(g_hInstance, IDS_ATDL_SS1WaitKBTimeout, cNewStat, sizeof(cNewStat)); break;
case ATDL_SS1WaitKBStopTimeout: LoadString(g_hInstance, IDS_ATDL_SS1WaitKBStopTimeout, cNewStat, sizeof(cNewStat)); break;
case ATDL_ISDNNETISBUS  : LoadString(g_hInstance, IDS_ATDL_ISDNNETISBUS, cNewStat, sizeof(cNewStat)); break;
case ATDL_IPInvalidPhonum: LoadString(g_hInstance, IDS_ATDL_IPInvalidPhonum, cNewStat, sizeof(cNewStat)); break;
case ATDL_IPRemoteBusy: LoadString(g_hInstance, IDS_ATDL_IPRemoteBusy, cNewStat, sizeof(cNewStat)); break;
case ATDL_IPBeenRefused: LoadString(g_hInstance, IDS_ATDL_IPBeenRefused, cNewStat, sizeof(cNewStat)); break;
case ATDL_IPDnsFail  : LoadString(g_hInstance, IDS_ATDL_IPDnsFail, cNewStat, sizeof(cNewStat)); break;
case ATDL_IPCodecUnSupport  : LoadString(g_hInstance, IDS_ATDL_IPCodecUnSupport, cNewStat, sizeof(cNewStat)); break;
case ATDL_IPOutOfResources  : LoadString(g_hInstance, IDS_ATDL_IPOutOfResources, cNewStat, sizeof(cNewStat)); break;
case ATDL_IPLocalNetworkErr  : LoadString(g_hInstance, IDS_ATDL_IPLocalNetworkErr, cNewStat, sizeof(cNewStat)); break;
case ATDL_IPRemoteNetworkErr  : LoadString(g_hInstance, IDS_ATDL_IPRemoteNetworkErr, cNewStat, sizeof(cNewStat)); break;
default :
LoadString(g_hInstance, IDS_ATDL_DEFAULT, cNewStat, sizeof(cNewStat)); 
break;
}
break;
default:
wsprintf(cNewStat,"%d",nResult); break;
break;
}
//+++++end+++++ added by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
m_ChList.SetItemText( ch, ITEM_PendReason, cNewStat );
}
else if((nOldChState[ch]==S_CALL_PENDING   && nNewChState!=S_CALL_PENDING)   ||
    (nOldChState[ch]==S_CALL_RemoteBlock     && nNewChState!=S_CALL_RemoteBlock)     ||
(nOldChState[ch]==S_CALL_LocalBlock&&nNewChState!=S_CALL_LocalBlock)    )
{
m_ChList.SetItemText( ch, ITEM_PendReason, "" );
}
//long WINAPI SsmGetChStateKeepTime(int ch)
lResult = SsmGetChStateKeepTime(ch);
if(lResult  != lOldTime[ch])
{
lOldTime[ch] = lResult ;
wsprintf(cNewStat,"%dms",lResult);
m_ChList.SetItemText( ch, ITEM_ChStateKeepTime, cNewStat );
}
// wsprintf(cNewStat,"%dms",SsmGetChStateKeepTime(ch));
// m_ChList.SetItemText( ch, ITEM_ChStateKeepTime, cNewStat );
nResult = SsmGetPhoNumStr(ch,cNewStat);
if(nResult  == -1) wsprintf(cNewStat, "-1");
else if(nResult  == 0) wsprintf(cNewStat, "");
nResult = m_ChList.GetItemText( ch, ITEM_PhoneNumber, cOldStat, 255 );
if(nResult==0)
cOldStat[0]='';
if ( strcmp(cNewStat,cOldStat) != 0 ) 
m_ChList.SetItemText( ch, ITEM_PhoneNumber, cNewStat );
//int WINAPI SsmGetPolarRvrsCount(int ch)
//if(SsmQueryOpPolarRvrs(CurCh) == 1) nResult = SsmGetPolarRvrsCount(CurCh);//masked by sh for the error of PolarRvrs, 2007-10-26
if(SsmQueryOpPolarRvrs(ch) == 1) nResult = SsmGetPolarRvrsCount(ch); //added by sh for the error of PolarRvrs, 2007-10-26
else                                nResult = -1;
if(nResult != nOldPloarRvrsCount[ch])
{
nOldPloarRvrsCount[ch] = nResult;
m_ChList.SetItemText( ch, ITEM_Ploar, _itoa(nResult,cNewStat,10) );
}
if(bEnableOpBlockRemoteCh[ch])
{
if((nResult=SsmGetRemoteChBlockStatus(ch)) != nOldBlockRemoteStatus[ch])
{
nOldBlockRemoteStatus[ch] = nResult;
//++++start++++ masked by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
/* switch(nResult)
{
case -1 : wsprintf(cNewStat,"不支持"); break;
case BLOCKREMOTE_Unblocked : wsprintf(cNewStat,""); break;
case BLOCKREMOTE_Blocked : wsprintf(cNewStat,"闭塞"); break;
case BLOCKREMOTE_WaitBlockAck : wsprintf(cNewStat,"等待闭塞证实"); break;
case BLOCKREMOTE_WaitUnblockAck : wsprintf(cNewStat,"等待解除闭塞证实"); break;
}
*/ //+++++end+++++ masked by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
//++++start++++ added by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
switch(nResult)
{
case -1 : LoadString(g_hInstance, IDS_BLOCKREMOTE_INVALID, cNewStat, sizeof(cNewStat)); break;
case BLOCKREMOTE_Unblocked : LoadString(g_hInstance, IDS_BLOCKREMOTE_Unblocked, cNewStat, sizeof(cNewStat)); break;
case BLOCKREMOTE_Blocked : LoadString(g_hInstance, IDS_BLOCKREMOTE_Blocked, cNewStat, sizeof(cNewStat)); break;
case BLOCKREMOTE_WaitBlockAck : LoadString(g_hInstance, IDS_BLOCKREMOTE_WaitBlockAck, cNewStat, sizeof(cNewStat)); break;
case BLOCKREMOTE_WaitUnblockAck : LoadString(g_hInstance, IDS_BLOCKREMOTE_WaitUnblockAck, cNewStat, sizeof(cNewStat)); break;
}
//+++++end+++++ added by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.9
m_ChList.SetItemText( ch, ITEM_BlockRemote, cNewStat );
}
}
if(CallTest[ch].bEnIn) CallinTestHandler(ch, nNewChState);
if(CallTest[ch].bEnOut) CalloutTestHandler(ch, nNewChState);
nOldChState[ch] = nNewChState;
//add by JK shi for 支持SetKB功能, begin
nOldPendReason[ch] = nNewPendReason;
//add by JK shi for 支持SetKB功能, end
if(SsmGetChType(ch) == 15 || SsmGetChType(ch) == 16)
{
char szUsingCodecType[50] = {''};
memset(szUsingCodecType, 0, sizeof(szUsingCodecType));
int nResult = SsmIpGetSessionCodecType(ch);
switch(nResult)
{
case 6:
wsprintf(szUsingCodecType, "G.711 aLaw"); 
break;
case 7:
wsprintf(szUsingCodecType, "G.711 muLaw"); 
break;
case 131:
wsprintf(szUsingCodecType, "G.729"); 
break;
}
m_ChList.SetItemText(ch, ITEM_CodecType, szUsingCodecType);
}
else
m_ChList.SetItemText(ch, ITEM_CodecType, "-1");
}
if(bEnSearchIdleCh) SearchIdleChCallout();
CFormView::OnTimer(nIDEvent);
}
void CTestView::OnSelchangeComboSelcurch()
{
CurCh = m_SelCurCh.GetCurSel();
m_ChList.EnsureVisible(CurCh, FALSE);
m_dlgBase.OnSelchangeCurCh(CurCh);
m_dlgPlay.OnSelchangeCurCh(CurCh);
m_dlgRec.OnSelchangeCurCh(CurCh);
m_dlgEvent.OnSelchangeCurCh(CurCh);
m_dlgOther.OnSelchangeCurCh(CurCh);
m_dlgIP.OnSelchangeCurCh(CurCh);
SetDlgItemInt(IDC_EDIT_LocalFlashTime, 500, TRUE);
UpdateData(FALSE);
}
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@   RxDTMF OPERATION   @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@ TXDTMF OPERATION  @@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@ SEND TONE OPERATION  @@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@ INTER-CH OPERATION  @@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ PLAY OPERATION @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@    RECORD OPERATION   @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@ SET TONE-CHECK PARAMETERS @@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@ CONFERENCE OPERATION  @@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
LPBYTE pszMemDot=NULL, pszBuf[100];
DWORD dwMemSize=4096L;
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo-killer OPERATION  @@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo-killer OPERATION  @@@@@@@@@@@@@@@@@@@@@@@@@@@@
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CALL TEST ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void CTestView::InitCallTest()
{
PCALLTEST p;
for(int ch=0; ch {
p = &CallTest[ch];
p->bEnIn       = FALSE;
p->bEnInRxDtmf = FALSE;
p->bEnInTxDtmf = FALSE;
p->nInTotTest  = 0;
p->nInCallOK   = 0;
p->nInRxDtmfOk = 0;
p->bEnOut       = FALSE;
p->bEnOutRxDtmf = FALSE;
p->bEnOutTxDtmf = FALSE;
p->nOutTotTest  = 0;
p->nOutCallOK   = 0;
p->nOutRxDtmfOK = 0;
p->nStep     = CALLTEST_IDLE;
p->dwTimeOut = 0L;
p->bEnRec    = FALSE;
}
bEnSearchIdleCh  = FALSE;
bEnCallOutRxDtmf = FALSE;
bEnCallOutTxDtmf = FALSE;
nCallInterval    = 1;
}
void CTestView::CallinTestHandler(int ch, int nChState)
{
char szBuf[100],szPhoNum[100];
PCALLTEST p = &CallTest[ch];
int nRet;
time_t ltime;
switch(p->nStep)
{
case CALLTEST_IDLE:
if(nChState == S_CALL_RINGING)
{
SsmPickup(ch);
SsmGetCallerId(ch,szBuf);
SsmGetPhoNumStr(ch,szPhoNum);
if(strcmp(szBuf,CALLERID)==0 && strcmp(szPhoNum,PHONE_NUMBER)==0) p->nInCallOK++;
p->nInTotTest++;
p->dwTimeOut = 0l;
if(p->bInIsSaveOldRecFile)
{
time(<ime);
wsprintf(p->szRecFile,"Rectime#ldch%d.wav", ltime, ch);
}
else
wsprintf(p->szRecFile, "RecCh%d.wav", ch);
if(p->bEnRec)
{
if( SsmChkRecToFile( ch )==1) //recording now
SsmStopRecToFile(ch);
nRet = SsmRecToFile(ch, p->szRecFile , 6, 0, -1, 0, 0);
if(nRet)
myShowErrMsg();
}
if(p->bEnInRxDtmf) p->nStep = CALLTEST_IN_WaitDtmf;
else               p->nStep = CALLTEST_IN_StartSendDtmf;
}
else if(nChState == S_CALL_PENDING)
{
nRet = SsmGetChStateKeepTime(ch);
if(nRet > 2000) //pending longer than 2s
{
SsmHangup(ch);
p->nInTotTest++;
wsprintf(szBuf,"%d/%d/%d",p->nInRxDtmfOk,p->nInCallOK,p->nInTotTest);
m_ChList.SetItemText( ch, ITEM_CallInTest, szBuf);
p->dwTimeOut = 0l;
p->nStep  = CALLTEST_IDLE;
}
}
break;
case CALLTEST_IN_WaitDtmf:
SsmGetDtmfStr(ch,szBuf);
if(strcmp(szBuf,TEST_DTMF) == 0)
{
p->nInRxDtmfOk++;
p->dwTimeOut = 0l;
p->nStep = CALLTEST_IN_StartSendDtmf;
}
else if(nChState!=S_CALL_TALKING || ++p->dwTimeOut>40)
{
SsmHangup(ch);
wsprintf(szBuf,"%d/%d/%d",p->nInRxDtmfOk,p->nInCallOK,p->nInTotTest);
m_ChList.SetItemText( ch, ITEM_CallInTest, szBuf);
p->dwTimeOut = 0l;
p->nStep  = CALLTEST_IDLE;
}
break;
case CALLTEST_IN_StartSendDtmf:
if(p->bEnInTxDtmf) 
{
SsmTxDtmf(ch,TEST_DTMF);
p->nStep = CALLTEST_IN_ChkTxDtmf;
}
else 
{
SsmHangup(ch);
wsprintf(szBuf,"%d/%d/%d",p->nInRxDtmfOk,p->nInCallOK,p->nInTotTest);
m_ChList.SetItemText( ch, ITEM_CallInTest, szBuf);
p->nStep = CALLTEST_IDLE;
}
break;
case CALLTEST_IN_ChkTxDtmf:
if(SsmChkTxDtmf(ch)==0)
{
SsmHangup(ch);
wsprintf(szBuf,"%d/%d/%d",p->nInRxDtmfOk,p->nInCallOK,p->nInTotTest);
m_ChList.SetItemText( ch, ITEM_CallInTest, szBuf);
p->nStep = CALLTEST_IDLE;
}
break;
}
}
//int WINAPI SsmSearchIdleCallOutCh(WORD wSearchMode, DWORD dwPrecedence)
void CTestView::SearchIdleChCallout()
{
int ch;
while((ch=SsmSearchIdleCallOutCh(0x26,0)) != -1)
{
// if(++nWaitSearchIdleChTimeCnt[ch] <= nCallInterval) return; //changed  2002.12.6
nWaitSearchIdleChTimeCnt[ch] = 0;
PCALLTEST p = &CallTest[ch];
p->bEnOut = TRUE;
p->bEnRec = FALSE;
p->bEnOutRxDtmf = bEnCallOutRxDtmf;
p->bEnOutTxDtmf = bEnCallOutTxDtmf;
if(bDialAtOnce)
{
SsmPickup(ch);
SsmSetTxCallerId(ch, CALLERID);
if(SsmAutoDial(ch,PHONE_NUMBER) == -1) 
{
SsmHangup(ch);
}
else
{
p->nOutTotTest++;
p->dwTimeOut = 0L;
p->nStep = CALLTEST_OUT_WaitDial;
}
}
else p->nStep  = CALLTEST_IDLE;
if(bOneCallOnly) break;
}
}
void CTestView::CalloutTestHandler(int ch, int nChState)
{
int nResult, nDirection;
char szBuf[100];
PCALLTEST p = &CallTest[ch];
nResult = SsmGetAutoCallDirection(ch,&nDirection);
if(nResult==-1 || nDirection<1) return;
switch(p->nStep)
{
case CALLTEST_IDLE:
if(++nWaitSearchIdleChTimeCnt[ch] <= nCallInterval) break; //changed 2002.12.6
nWaitSearchIdleChTimeCnt[ch] = 0;
if(bEnSearchIdleCh || (!bEnSearchIdleCh&&nChState==S_CALL_STANDBY)) 
{
SsmPickup(ch);
SsmSetTxCallerId(ch, CALLERID);
if(SsmAutoDial(ch,PHONE_NUMBER) == -1) 
{
SsmHangup(ch);
return;
}
p->nOutTotTest++;
p->dwTimeOut = 0L;
p->nStep = CALLTEST_OUT_WaitDial;
}
break;
case CALLTEST_OUT_WaitDial:
switch(SsmChkAutoDial(ch))
{
case DIAL_VOICE: //"通话"状态
case DIAL_VOICEF1:
case DIAL_VOICEF2:
p->nOutCallOK++;
p->dwTimeOut = 0L;
if(p->bEnOutTxDtmf) p->nStep = CALLTEST_OUT_StartSendDtmf;
else                p->nStep = CALLTEST_OUT_WaitDtmf;
break;
case DIAL_NO_DIALTONE:
case DIAL_BUSYTONE:
case DIAL_ECHO_NOVOICE:
case DIAL_NOVOICE:
case DIAL_NOANSWER:
case DIAL_FAILURE:
case DIAL_INVALID_PHONUM:
p->nAutoDialFailed ++;
SsmHangup(ch);
wsprintf(szBuf,"%d/%d/%d/%d/%d",p->nOutRxDtmfOK,p->nOutCallOK,p->nOutTotTest, p->nAutoDialFailed, p->nOutRxDtmfFailed);
m_ChList.SetItemText( ch, ITEM_CallTest, szBuf);
p->dwTimeOut = 0L;
if(bEnSearchIdleCh) p->bEnOut = FALSE;
p->nStep = CALLTEST_IDLE;
break;
case DIAL_STANDBY:
nResult = SsmGetChStateKeepTime(ch);
if(nResult > 2000)
{
p->nAutoDialFailed ++;
SsmHangup(ch);
wsprintf(szBuf,"%d/%d/%d/%d/%d",p->nOutRxDtmfOK,p->nOutCallOK,p->nOutTotTest, p->nAutoDialFailed, p->nOutRxDtmfFailed);
m_ChList.SetItemText( ch, ITEM_CallTest, szBuf);
p->dwTimeOut = 0L;
if(bEnSearchIdleCh) p->bEnOut = FALSE;
p->nStep = CALLTEST_IDLE;
}
break;
case DIAL_DIALING:
case DIAL_ECHOTONE:
default:
break;
}
break;
case CALLTEST_OUT_StartSendDtmf:
SsmTxDtmf(ch,TEST_DTMF);
p->nStep = CALLTEST_OUT_ChkTxDtmf;
break;
case CALLTEST_OUT_ChkTxDtmf:
if(SsmChkTxDtmf(ch) == 0)
{
p->nStep = CALLTEST_OUT_WaitDtmf;
}
break;
case CALLTEST_OUT_WaitDtmf:
if(p->bEnOutRxDtmf)
{
SsmGetDtmfStr(ch,szBuf);
if(strcmp(szBuf,TEST_DTMF) == 0)
{
SsmHangup(ch);
p->nOutRxDtmfOK++;
wsprintf(szBuf,"%d/%d/%d/%d/%d",p->nOutRxDtmfOK,p->nOutCallOK,p->nOutTotTest, p->nAutoDialFailed, p->nOutRxDtmfFailed);
m_ChList.SetItemText( ch, ITEM_CallTest, szBuf);
if(bEnSearchIdleCh) p->bEnOut = FALSE;
p->nStep = CALLTEST_IDLE;
}
else if(++p->dwTimeOut > 40)
{
SsmHangup(ch);
p->nOutRxDtmfFailed++;
wsprintf(szBuf,"%d/%d/%d/%d/%d",p->nOutRxDtmfOK,p->nOutCallOK,p->nOutTotTest, p->nAutoDialFailed, p->nOutRxDtmfFailed);
m_ChList.SetItemText( ch, ITEM_CallTest, szBuf);
if(bEnSearchIdleCh) p->bEnOut = FALSE;
p->nStep = CALLTEST_IDLE;
}
}
else
{
SsmHangup(ch);
wsprintf(szBuf,"%d/%d/%d",p->nOutRxDtmfOK,p->nOutCallOK,p->nOutTotTest);
m_ChList.SetItemText( ch, ITEM_CallTest, szBuf);
if(bEnSearchIdleCh) p->bEnOut = FALSE;
p->nStep = CALLTEST_IDLE;
}
break;
}
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SS7 FUNCTION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void CTestView::OnClickChlist(NMHDR* pNMHDR, LRESULT* pResult) 
{
// TODO: Add your control notification handler code here
int nItem, nFlags;
    
    nFlags = LVNI_SELECTED;
    nItem = m_ChList.GetNextItem(-1, nFlags );
    if ( nItem != -1 )
{
m_SelCurCh.SetCurSel(nItem);        
CurCh = m_SelCurCh.GetCurSel();
}
OnSelchangeComboSelcurch();
*pResult = 0;
}
void CTestView::OnOpenShconfig() 
{
// TODO: Add your command handler code here
TCHAR lpstrActual[300];
TCHAR command[400] = TEXT("notepad ");
STARTUPINFO si = {sizeof(si) };
PROCESS_INFORMATION pi;
DWORD dwExitCode;
GetCurrentDirectory(MAX_PATH,lpstrActual);
lstrcat(lpstrActual,"\ShConfig.ini");
lstrcat(command, lpstrActual);
//WinExec( command, SW_SHOWNORMAL);
BOOL fSucess = CreateProcess(NULL, command, NULL, NULL, 
FALSE, 0, NULL, NULL, &si, &pi);
if(fSucess)
{
// OnBUTTONSsmCloseCti();
Sleep(200);
CloseHandle(pi.hThread);
WaitForSingleObject(pi.hProcess , INFINITE);
GetExitCodeProcess(pi.hProcess , &dwExitCode);
CloseHandle(pi.hProcess);
// OnBUTTONSsmStartCti();
}
}
void CTestView::OnOpenShcticonfig() 
{
// TODO: Add your command handler code here
TCHAR lpstrActual[300];
// TCHAR command[400] = TEXT("notepad ");
STARTUPINFO si = {sizeof(si) };
PROCESS_INFORMATION pi;
DWORD dwExitCode;
GetCurrentDirectory(MAX_PATH,lpstrActual);
lstrcat(lpstrActual,"\ShCtiConfig.exe");
// lstrcat(command, lpstrActual);
BOOL fSucess = CreateProcess(NULL, lpstrActual, NULL, NULL, 
FALSE, 0, NULL, NULL, &si, &pi);
if(fSucess)
{
// OnBUTTONSsmCloseCti();
Sleep(200);
CloseHandle(pi.hThread);
WaitForSingleObject(pi.hProcess , INFINITE);
GetExitCodeProcess(pi.hProcess , &dwExitCode);
CloseHandle(pi.hProcess);
// OnBUTTONSsmStartCti();
}
else
{
// MessageBox("在当前目录下没有找到ShCtiConfig.exe程序!", MB_OK);//masked by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.11
MessageBox(BoxMsg_NoConfigExe, MB_OK);//added by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007.1.11
}
}
void CTestView::OnVer34() 
{
// TODO: Add your command handler code here
CVer34 dlg;
dlg.DoModal();
}
void CTestView::Ontimeflag()
{
// TODO: Add your command handler code here
bTimerOpen = !bTimerOpen;
m_dlgBase.OnSetTimer(bTimerOpen);
m_dlgPlay.OnSetTimer(bTimerOpen);
m_dlgRec.OnSetTimer(bTimerOpen);
m_dlgOther.OnSetTimer(bTimerOpen);
m_dlgIP.OnSetTimer(bTimerOpen);
return;
}
void CTestView::OnUpdateOntimeflag(CCmdUI* pCmdUI) 
{
// TODO: Add your command update UI handler code here
pCmdUI->SetCheck(bTimerOpen);
}
void CTestView::myShowErrMsg(int ch)
{
char szErrMsg[300], szErrCode[20];
wsprintf(szErrCode,"ch=%d ErrorCode=%d",ch,SsmGetLastErrCode());
SsmGetLastErrMsg(szErrMsg);
// lstrcat(szErrMsg, szErrCode);
AfxMessageBox(szErrMsg, MB_OK, 0);
}
void WriteLog(char *pMsg)
{
SYSTEMTIME st;
GetLocalTime(&st);
FILE* pFile = fopen( "T3523.txt", "a+t" );
if(pFile != NULL) 
{
fprintf( pFile,"%04u-%02u-%02u %02u:%02u:%02u %sn",
  st.wYear,
  st.wMonth,
  st.wDay,
  st.wHour,
  st.wMinute,
  st.wSecond,   
  pMsg);
fclose(pFile);
}
}
void CTestView::OnVer353() 
{
ver353 dlg;
dlg.DoModal();
}
void CTestView::OnOverallEnergyLevel() 
{
COverallEnergyLevelDlg dlg;
dlg.DoModal();
}
void CTestView::On40exOpenBus() 
{
C40ExDlg dlg;
dlg.nCurCh = CurCh;
dlg.DoModal();
}
void CTestView::OnSsmsetwaitdtmfex() 
{
// TODO: Add your command handler code here
CSetWaitDtmf dlg;
dlg.DoModal();
}
//+++START+++ added by yxh for SpyTest, 2003.08.22
void CTestView::OnButtonSpy()
{
// TODO: Add your command handler code here
pDlg->ShowWindow(SW_SHOW);
return;
}
//+++END+++  added by yxh for SpyTest, 2003.08.22
//++++START++++ added by cqb for SHCTI030902 Test
void CTestView::OnVer404() 
{
// TODO: Add your command handler code here
CVer404 dlg;
dlg.DoModal();
}
//++++END++++
void CTestView::OnVer444x() 
{
// TODO: Add your command handler code here
CVer444x dlg;
dlg.DoModal();
}
//++++START++++ added by cqb for 函数返回BUG Test , 2004.9.29
void CTestView::OnBoardinfo() 
{
CBoardInfo bi;
bi.DoModal();
}
//++++START++++ added by cqb for 函数返回BUG Test , 2004.9.29
void CTestView::OnSelchangeTabView(NMHDR* pNMHDR, LRESULT* pResult) 
{
// TODO: Add your control notification handler code here
int nCurSel = m_TabCtrl.GetCurSel();
for(int i=0; i {
::ShowWindow(hwndView[i], SW_HIDE);
}
::ShowWindow(hwndView[nCurSel], SW_SHOW);
*pResult = 0;
}
void CTestView::OnSelectAllch() 
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
int nStartCh = GetDlgItemInt(IDC_EDIT_SelectAllChStart, NULL, TRUE);
int nEndCh   = GetDlgItemInt(IDC_EDIT_SelectAllChEnd,   NULL, TRUE);
m_dlgBase.OnSetAllChPara(m_SelectAllCh, nStartCh, nEndCh);
m_dlgPlay.OnSetAllChPara(m_SelectAllCh, nStartCh, nEndCh);
m_dlgRec.OnSetAllChPara(m_SelectAllCh, nStartCh, nEndCh);
m_dlgOther.OnSetAllChPara(m_SelectAllCh, nStartCh, nEndCh);
m_dlgIP.OnSetAllChPara(m_SelectAllCh, nStartCh, nEndCh);
}
void CTestView::OnButtonSs7() 
{
// TODO: Add your command handler code here
CSs7 Ss7;
Ss7.DoModal();
}
void CTestView::OnBUTTONfsk() 
{
// TODO: Add your command handler code here
CFsk myFsk;
myFsk.DoModal();
}
void CTestView::OnButtonBus() 
{
// TODO: Add your command handler code here
BusChInfo myBusInfo;
myBusInfo.DoModal();
}
void CTestView::OnButtonConf() 
{
// TODO: Add your command handler code here
CConInfo myConf;
myConf.DoModal();
}
void CTestView::OnBUTTONSetChkTonePara() 
{
// TODO: Add your command handler code here
CSetChkTonePara mySetChkTonePara;
mySetChkTonePara.DoModal();
}
void CTestView::OnBUTTONPcmFunc() 
{
// TODO: Add your command handler code here
CPcmCompatible myPcmCompatible;
myPcmCompatible.DoModal();
}
void CTestView::OnBUTTONSS1Base() 
{
// TODO: Add your command handler code here
CSS1base mySS1Op;
mySS1Op.DoModal();
}
void CTestView::OnVER458x() 
{
// TODO: Add your command handler code here
CDlgver456x dlg;
dlg.DoModal();
}
void CTestView::OnVer4605() 
{
// TODO: Add your command handler code here
CDlgIsupAdv dlg;
dlg.DoModal();
}
void CTestView::OnVer4720Shv() 
{
// TODO: Add your command handler code here
CShvDlg dlg;
dlg.DoModal();
}
//++++start++++ added by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007-1-9
void CTestView::InitLang()
{
if (g_dwLanguageID == LANGUAGE_CHINESE_SIMPLIFIED)
{
return;
}
else// if (PRIMARYLANGID(g_dwLanguageID) == LANG_ENGLISH)
{
//TabCtrl
TC_ITEM * pTCItem;
pTCItem = new TC_ITEM;
pTCItem->mask = TCIF_TEXT;
pTCItem->pszText = ENG_TESTFORM_TABCTRL_LAB1;
m_TabCtrl.SetItem(0, pTCItem);
pTCItem->pszText = ENG_TESTFORM_TABCTRL_LAB2;
m_TabCtrl.SetItem(1, pTCItem);
pTCItem->pszText = ENG_TESTFORM_TABCTRL_LAB3;
m_TabCtrl.SetItem(2, pTCItem);
pTCItem->pszText = ENG_TESTFORM_TABCTRL_LAB4;
m_TabCtrl.SetItem(3, pTCItem);
pTCItem->pszText = ENG_TESTFORM_TABCTRL_LAB5;
m_TabCtrl.SetItem(4, pTCItem);
pTCItem->pszText = ENG_TESTFORM_TABCTRL_LAB6;
m_TabCtrl.SetItem(5, pTCItem);
delete pTCItem;
//ChList
LV_COLUMN lvc;
lvc.mask = LVCF_TEXT;
lvc.pszText = ENG_TESTFORM_CHLIST_LAB2;
m_ChList.SetColumn(1, &lvc);
lvc.pszText = ENG_TESTFORM_CHLIST_LAB3;
m_ChList.SetColumn(2, &lvc);
lvc.pszText = ENG_TESTFORM_CHLIST_LAB6;
m_ChList.SetColumn(5, &lvc);
lvc.pszText = ENG_TESTFORM_CHLIST_LAB32;
m_ChList.SetColumn(31, &lvc);
lvc.pszText = ENG_TESTFORM_CHLIST_LAB33;
m_ChList.SetColumn(32, &lvc);
lvc.pszText = ENG_TESTFORM_CHLIST_LAB34;
m_ChList.SetColumn(33, &lvc);
lvc.pszText = ENG_TESTFORM_CHLIST_LAB35;
m_ChList.SetColumn(34, &lvc);
lvc.pszText = ENG_TESTFORM_CHLIST_LAB36;
m_ChList.SetColumn(35, &lvc);
lvc.pszText = ENG_TESTFORM_CHLIST_LAB37;
m_ChList.SetColumn(36, &lvc);
lvc.pszText = ENG_TESTFORM_CHLIST_LAB38;
m_ChList.SetColumn(37, &lvc);
lvc.pszText = ENG_TESTFORM_CHLIST_LAB39;
m_ChList.SetColumn(38, &lvc);
}
}
//+++++end+++++ added by jyp for 061228-bug-技术部门-提供TEST程序的中英文合一的版本, 2007-1-9
//+++start+++ add by hunnad for 多路呼叫,2007.10.15
void CTestView::OnMulticall() 
{
// TODO: Add your command handler code here
CDlgMultiCall dlg;
dlg.DoModal();
}
//+++end+++ add by hunnad for 多路呼叫,2007.10.15
//+++start+++ add by hunnad for 全部挂机,2007.10.15
void CTestView::OnHangupall() 
{
// TODO: Add your command handler code here
for(int ch = 0; ch < SsmGetMaxCh(); ch++)
SsmHangup(ch);
}
//+++start+++ add by hunnad for 全部挂机,2007.10.15
//+++start+++ add by hunnad for 全部摘机,2007.10.15
void CTestView::OnPickupall() 
{
// TODO: Add your command handler code here
for(int ch = 0; ch < SsmGetMaxCh(); ch++)
{
int nState = SsmGetChState(ch);
if(nState == S_CALL_RINGING)
SsmPickup(ch);
}
}
//+++end+++ add by hunnad for 全部摘机,2007.10.15

你可能感兴趣的:(人工智能,智能语音系统,电销机器人源码,dreamweaver,服务器,windows,人工智能)