使用eXsip和ORTP通话(一)
来源:互联网 发布:阿里云java开发手册 编辑:程序博客网 时间:2024/05/18 01:36
#include "stdafx.h"
#include "YouToo.h"
#include "YouTooDlg.h"
#define WAIT_TIMER 200 //事件检测时间间隔ms
#define REG_TIMER 30*1000 //注册时间间隔ms
bool build_media(int local_port, const char *remote_ip,
int remote_port, int payload, const char *fmtp, int jitter, bool ec, int bitrate);
CYouTooDlg *dlg_wnd = NULL;
AudioStream *audio = NULL;
RtpProfile *profile = NULL;
RtpSession *session = NULL;
OrtpEvQueue *q = NULL;
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define DEBUG_INFO debug_info->AddString
UINT sip_ua_monitor(void *pArg)
{
bool ret = false;
char *payload_str;
char localip[128];
char tmp[4096];
CString dtmf_str;
char dtmf[50] = {0};
int reg_remain = REG_TIMER;
CYouTooDlg *pMainWnd = (CYouTooDlg *)pArg;
CListBox *debug_info = ((CListBox *)pMainWnd->GetDlgItem(IDC_INFO));
DEBUG_INFO("Event monitor for ua[c|s] start!");
eXosip_event_t *uac_e;
osip_message_t *ack = NULL;
osip_message_t *answer = NULL;
sdp_message_t * msg_rsp = NULL;
sdp_connection_t * con_rsp = NULL;
#include "YouToo.h"
#include "YouTooDlg.h"
#define WAIT_TIMER 200
#define REG_TIMER
bool build_media(int local_port, const char *remote_ip,
CYouTooDlg *dlg_wnd = NULL;
AudioStream *audio = NULL;
RtpProfile *profile = NULL;
RtpSession *session = NULL;
OrtpEvQueue *q = NULL;
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define DEBUG_INFO debug_info->AddString
UINT sip_ua_monitor(void *pArg)
{