// rtp payload type
#define RTP_G711U		0
#define RTP_GSM			3
#define RTP_G711A		8
#define RTP_G722		9
#define RTP_G7231		4
#define RTP_CN			13	// comfort noise
#define RTP_G728		15
#define RTP_G729		18
#define RTP_REDUNDENCE	96
#define RTP_TELEVENT	101	

extern		CCHAR	Rtp_cFrameTime[CODEC_NULL];
extern		CCHAR	Rtp_cVoiceLen[CODEC_NULL];

extern		XSHORT	Rtp_iDstPort;
extern		XSHORT	Rtcp_iDstPort;
extern		XCHAR	Rtp_iDtmfPayloadType;
extern		XCHAR	Rtp_iPeerIlbcPType;
extern		XLONG	Rtp_lSendPackets;
extern		XLONG	Rtp_lSendBytes;
extern		XLONG	Rtp_lRecvPackets;
extern		XLONG	Rtp_lRecvBytes;

extern		XCHAR	Rtp_bOpened;
#define RTP_SSRC_LEN	4
extern		XCHAR	Rtp_pLocalSSRC[RTP_SSRC_LEN];
extern		BOOLEAN Rtp_bPacketSent;

#ifdef __cplusplus
extern "C" {
#endif

// Rtcp.c
void	RtcpOpen();
void	RtcpRun();
void	RtcpHandleTimer();

void	RtcpUpdateSeq(PXCHAR pRtpHead);

// Rtp.c
void	RtpInitialize();
void	RtpStartReceive(BOOLEAN bReceive);
void	RtpOpen(BOOLEAN bSend, BOOLEAN bReceive);
void	RtpClose();
void	RtpRun();
void	RtpSend(UCHAR iLength, PXCHAR pData);
void	RtpSendDtmfKey(UCHAR iKey);
//void	RtpSendNatHint();

UCHAR	RtpGetAudioType(UCHAR iRtpType);
UCHAR	RtpGetLocalRtpType(UCHAR iAudioType);
UCHAR	RtpGetPeerRtpType(UCHAR iAudioType);

#ifdef __cplusplus
}
#endif
