// TaskSignalMsg types
#define SIGNAL_IP_CONFLICT		200
#define SIGNAL_DHCP_FAILED		201
#define SIGNAL_INCOMING_CALL	210
#define SIGNAL_RING_BACK		211
#define SIGNAL_START_RING		212
#define SIGNAL_STOP_RING		213
#define SIGNAL_SERVICE_CONTROL	214
#define SIGNAL_CALL_WAITING		215
#define SIGNAL_STOP_WAITING		216

// TaskUserData types
#define NAT_CONNECT				0
#define NAT_DISCONNECT			1
#define NAT_REPLY				2
#define NAT_KEEP_ALIVE			3
#define GRQ_NONSTANDARD			4
#define RRQ_NONSTANDARD			5
#define ARQ_CALLER_NONSTANDARD	6
#define ARQ_CALLEE_NONSTANDARD	7
#define DRQ_NONSTANDARD			8
#define SETUP_NONSTANDARD		9
#define USER_DATA_SOFTWARE_VER	10
#define USER_DATA_HARDWARE_VER	11
#define RAS_TUNNEL_HEAD			12
#define TCP_TUNNEL_HEAD			13
#define RTP_TUNNEL_HEAD			14
#define RTCP_TUNNEL_HEAD		15
#define NAT_SETUP				16
#define NAT_H245_SETUP			17
#define NAT_H245_CONNECT		18
#define SIP_USER_AGENT			19
#define SIP_MEDIARING_ENCRYPT	20

// TaskHandleData types
#define ADM_CFM_NONSTANDARD		0
#define REG_CFM_NONSTANDARD		1
#define REG_REJ_NONSTANDARD		2
#define ADM_REJ_NONSTANDARD		3
#define DEG_CFM_NONSTANDARD		4
#define LOC_REQ_NONSTANDARD		5
#define NONSTANDARD_NONSTANDARD	6
#define CALL_CREDIT_AMOUNT		7
#define CALL_CREDIT_TIME		8
#define HANDLE_DATA_DISPLAY		9
#define HANDLE_DATA_CALLMODE	10
#define HANDLE_DATA_PLAY		11
#define VOICE_MSG_HINT			12
#define UPGRADE_HINT			13
#define SIP_MESSAGE_HINT		14
#define SIP_INFO_HINT			15
#define DTMF_START_KEY			16
#define DTMF_STOP_KEY			17
#define IAX2_TRANSFER_HINT		18
#define MGCP_HANDSET_HD			19
#define MGCP_HANDSET_HU			20

#ifdef __cplusplus
 "C" {
#endif

extern   BOOLEAN Modem_bAtCmd;
extern   BOOLEAN Modem_bAtMode;

// override virtual functions
void	TaskInitialize();							// v_Task.c
void	TaskRestart(UCHAR iReason);
void	TaskDnsCompleted();				
void	TaskDnsFailed();				
void	TaskLogonCompleted();				
void	TaskLogoffCompleted();				
void	TaskLogonFailed(UCHAR iError);				
void	TaskSignalMsg(UCHAR iType);
void	TaskLogon();
void	TaskCall();
void	TaskHangup();
void	TaskHandleTimer();
void	TaskConnected();
void	TaskStartRtp();
void	TaskIncomingData(UCHAR iLen, PXCHAR pData);
void	TaskIncomingKeys(UCHAR iLen, PXCHAR pKeyBuf);
void	TaskWaitPacket();				
void	TaskSendPacket(USHORT iLen, PXCHAR pPacket);
BOOLEAN	TaskRunTcp();
BOOLEAN	TaskRunUdp();
UCHAR	TaskUserData(UCHAR iType, PXCHAR pBuf);
BOOLEAN	TaskHandleData(UCHAR iType, PXCHAR pBuf, UCHAR iLen);

#ifdef __cplusplus
}
#endif
