📄 t2phone.c
字号:
/******************************************************************** * * File: t2phone.c * * Description: * The IP phone main application. * * Revisions: * 04-may-01 J.H and S.J.M initial version. * * Copyright 2001 Netergy Microelectronics, Inc. All rights reserved. * ********************************************************************/#include "h248app.h"#include "agent_api.h"#include "mib2_api.h"/************************************************************************** * LOCAL FUNCTION PROTOTYPES **************************************************************************/void _ProcessHandset();void _OnHookEvent();void _OffHookEvent();/************************************************************************** * GLOBAL VARIABLES **************************************************************************/DWORD dwT2MainCnt = 0;BOOL g_bQuit = FALSE;char g_MegacoOnHookString[50];extern void *snmp_handle;/************************************************************************** * MAIN FUNCTION **************************************************************************/int main(int argc, char **argv) { SYSLOG(LOG_INFO,"*** Starting H248 T2 Phone app ***\n"); /* initialize drivers, stacks, etc. */ _Initialization(); /* Create instance */ CreateInstance(&xEndPoint[0]); H248ProtocolStart(); sprintf(g_MegacoOnHookString,"%s%s%s","Registering to MGC ",g_sMgcIpAddr," ..."); HandsetDisplayString(g_MegacoOnHookString,1); HandsetRegisterOnHookDisplayString(g_MegacoOnHookString); HandsetRegisterOnHookDisplayNumber(""); while (!g_bQuit) { EndPointProcess(&xEndPoint[0]); /* update date time display */ HandsetUpdateClock(); AudioProcess(); MediaStreamProcess(); } // shutdown H248 Mib2Terminate(); SnmpAgentTerm(snmp_handle); H248ProtocolTerminate(); // give time for shutdown to complete msleep(500); SYSLOG(LOG_INFO,"*** Exiting H248 T2 Phone app ***\n"); return 0;}/**************************************************************************//*********************** END OF FILE **************************************//**************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -