#ifdef __cplusplus
extern "C" {
#endif

#define SIP_CONNECT			0
#define SIP_PEER_HANGUP		1
#define SIP_UPDATE_STATE	2
#define SIP_CALL_FORWARD	3
#define SIP_SIGNAL_BUSY		4
#define SIP_SIGNAL_REORDER	5
#define SIP_STOP_TONE		6
#define	SIP_LINE0_CLOSED	7
#define SIP_LINE1_CLOSED	8

#define SIP_MODE_INACTIVE	0
#define SIP_MODE_RECVONLY	1
#define SIP_MODE_SENDONLY	2
#define SIP_MODE_SENDRECV	3
#define SIP_MODE_NUMBER		4

extern  DCHAR Sip_iConnMode;
extern  XSHORT Sip_iRegisterPort;
extern  XSHORT Sip_iRtpPort;

	void	SipStartup();
	void	SipInitialize();							// sip.c
	void	SipArpResolved();
	void	SipArpFailed();
	void	SipLogon();
	void	SipLogoff();
	BOOLEAN	SipCall(PXCHAR pKeyBuf);
	void	SipAnswerCall(BOOLEAN bAccept);
	void	SipHangup();
	void	SipConnect();
	void	SipConnected();
	void	SipHandleTimer();
//	BOOLEAN	SipRunTcp();
	BOOLEAN SipRunUdp();		
	void	SipSendDtmfKeys(PXCHAR pKeyBuf, UCHAR iLen);

	void	SipCallHold();
	void	SipCallForward();
	void	SipCallTransfer(PXCHAR pKeyBuf);
	void	SipLoadMsgs();


#ifdef __cplusplus
}
#endif
