#define Q931_MAX_DISPLAY	32

#define CALL_IDENTIFIER_LEN		16

extern		XSHORT H245_iSrcPort;
extern		XSHORT H245_iDstPort;
extern		XCHAR Remote_pH245IP[IP_ALEN];

extern		XCHAR	Remote_pDisplay[Q931_MAX_DISPLAY+1];
extern		XCHAR	Remote_pH2250IP[IP_ALEN];
extern		XSHORT	Q931_iSrcPort;
extern		XSHORT	Remote_iH2250Port;
extern		XCHAR	H323_pNatConnectionIP[IP_ALEN];
extern		XSHORT	H323_iNatConnectionPort;

extern		XCHAR	H323_bInAltGkMode;
extern		XSHORT	H323_iRasSeq;
extern		XSHORT	H323_iQ931CallRef;

extern		BOOLEAN	H323_bGateway;
extern		BOOLEAN	H323_bUseGRQ;
extern		BOOLEAN	H323_bRtpInConnect;

extern		XSHORT	H323_iKeepAliveTTL;

#ifdef __cplusplus
extern "C" {
#endif

	void	H323Initialize();							// h323.c
	void	H323Startup();
	void	H323Logon();
	void	H323Logoff();
	BOOLEAN	H323Call(PXCHAR pKeyBuf);
	void	H323AnswerCall(BOOLEAN bAnswer);
	void	H323Hangup();
	void	H323Connect();
	void	H323Connected();
	void	H323HandleTimer();
	BOOLEAN	H323RunTcp();
	BOOLEAN H323RunUdp();
	void	H323SendDtmfKeys(PXCHAR pKeyBuf, UCHAR iLen);
	void	H323RasSendArq();		// This function is opened for YiYangXinTong Specially
	void	H2250Start();
	void	H245Start();

	void	H323CallHold();
	void	H323CallTransfer(PXCHAR pKeyBuf);
	void	H323CallForward();

	void	H323NatConnect();
	void	H323NatDisconnect();

	void	H323SendRasData(USHORT iLength, UCHAR iType);

	void	H323LoadMsgs();

	void	H245_HandleMsg(PXCHAR pMsg);
	void	Q931_HandleMsg(PXCHAR pMsg, USHORT iLen);

#ifdef __cplusplus
}
#endif

