更新時間:2019-11-20
描述
用戶通過會議列表一鍵入會的方式加入會議。
前提條件:
業(yè)務流程
在加入會議時,入會參數(shù)(conf_join_param),是否視頻接入會議(is_video_join)為必選;
//c code TSDK_RESULT ret; ret = tsdk_join_conference(confJoinParam, joinNumber, isVideoJoin, callId); if (TSDK_SUCCESS != ret) { LOG_D_CALL_ERROR("join conf failed. result=%#x", ret); return -1; } return TSDK_SUCCESS; |
//c code case TSDK_E_CONF_EVT_JOIN_CONF_RESULT: { if (TSDK_SUCCESS == param2) { CHECK_POINTER(data); TSDK_S_JOIN_CONF_IND_INFO* pResult = (TSDK_S_JOIN_CONF_IND_INFO*)data; TSDK_S_JOIN_CONF_IND_INFO* notifyInfo = new TSDK_S_JOIN_CONF_IND_INFO; memset(notifyInfo, 0, sizeof(TSDK_S_JOIN_CONF_IND_INFO)); memcpy_s(notifyInfo, sizeof(TSDK_S_JOIN_CONF_IND_INFO), pResult, sizeof(TSDK_S_JOIN_CONF_IND_INFO)); ::PostMessage(maindlg->GetSafeHwnd(), WM_CONF_CTRL_JOIN_RESULT, (WPARAM)notifyInfo, (LPARAM)param1); } else { maindlg->MessageBox(_T("join conf failed!")); } break; } |
代碼示例詳見“更新會議狀態(tài)信息和與會者列表”描述。
//c code case TSDK_E_CONF_EVT_GET_DATACONF_PARAM_RESULT: { if (TSDK_SUCCESS != param2) { maindlg->MessageBox(_T("get data conf param failed!")); } else { ::PostMessage(maindlg->GetSafeHwnd(), WM_CONF_CTRL_GET_DATA_CONF_PARAM, (WPARAM)param1, NULL); } break; } |
//c code TSDK_RESULT ret; ret = tsdk_join_data_conference(confHandle); if (TSDK_SUCCESS != ret) { LOG_D_CALL_ERROR("join data conf failed. result=%#x", ret); return -1; } return TSDK_SUCCESS; |
在加入數(shù)據(jù)會議后,會向UI上報會議信息及狀態(tài)更新事件TSDK_E_CONF_EVT_INFO_AND_STATUS_UPDATE,UI刷新會議成員列表和會議信息。
//c code case TSDK_E_CONF_EVT_JOIN_DATA_CONF_RESULT: { ::PostMessage(maindlg->GetSafeHwnd(), WM_CONF_CTRL_JOIN_DATACONF_RESULT, NULL, (LPARAM)param2); break; } |
注意事項
無。
描述
用戶由第三方途徑獲取會議信息,通過輸入會議號和接入碼的方式加入會議。
業(yè)務流程
參見“會議列表一鍵入會”。
注意事項
無。
描述
用戶由第三方途徑獲取會議信息,通過撥打統(tǒng)一會議接入號,使用IVR導航的方式加入會議。
前提條件:
業(yè)務流程
//c code TSDK_RESULT ret; ret = tsdk_start_call(&callid, call_number, FALSE); if (TSDK_SUCCESS != ret) { LOG_D_CALL_ERROR("start call failed. result=%#x", ret); return -1; } return TSDK_SUCCESS; |
//c code case TSDK_E_CALL_EVT_CALL_CONNECTED: { CHECK_POINTER(data); TSDK_S_CALL_INFO* callInfo = (TSDK_S_CALL_INFO*)data; TSDK_S_CALL_INFO* notifyInfo = new TSDK_S_CALL_INFO; memset(notifyInfo, 0, sizeof(TSDK_S_CALL_INFO)); memcpy_s(notifyInfo, sizeof(TSDK_S_CALL_INFO), callInfo, sizeof(TSDK_S_CALL_INFO)); ::PostMessage(maindlg->GetSafeHwnd(), WM_CALL_CONNECTED, (WPARAM)notifyInfo, NULL); break; } |
//c code TSDK_RESULT ret; ret = tsdk_send_dtmf(callid, tone); if (TSDK_SUCCESS != ret) { LOG_D_CALL_ERROR("send dtmf failed. result=%#x", ret); return -1; } return TSDK_SUCCESS; |
//c code case TSDK_E_CONF_EVT_JOIN_CONF_RESULT: { if (TSDK_SUCCESS == param2) { CHECK_POINTER(data); TSDK_S_JOIN_CONF_IND_INFO* pResult = (TSDK_S_JOIN_CONF_IND_INFO*)data; TSDK_S_JOIN_CONF_IND_INFO* notifyInfo = new TSDK_S_JOIN_CONF_IND_INFO; memset(notifyInfo, 0, sizeof(TSDK_S_JOIN_CONF_IND_INFO)); memcpy_s(notifyInfo, sizeof(TSDK_S_JOIN_CONF_IND_INFO), pResult, sizeof(TSDK_S_JOIN_CONF_IND_INFO)); ::PostMessage(maindlg->GetSafeHwnd(), WM_CONF_CTRL_JOIN_RESULT, (WPARAM)notifyInfo, (LPARAM)param1); } else { maindlg->MessageBox(_T("join conf failed!")); } break; } |
代碼示例詳見“更新會議狀態(tài)信息和與會者列表”描述。
//c code case TSDK_E_CONF_EVT_GET_DATACONF_PARAM_RESULT: { if (TSDK_SUCCESS != param2) { maindlg->MessageBox(_T("get data conf param failed!")); } else { ::PostMessage(maindlg->GetSafeHwnd(), WM_CONF_CTRL_GET_DATA_CONF_PARAM, (WPARAM)param1, NULL); } break; } |
//c code TSDK_RESULT ret; ret = tsdk_join_data_conference(confHandle); if (TSDK_SUCCESS != ret) { LOG_D_CALL_ERROR("join data conf failed. result=%#x", ret); return -1; } return TSDK_SUCCESS; |
在加入數(shù)據(jù)會議后,會向UI上報會議信息及狀態(tài)更新事件TSDK_E_CONF_EVT_INFO_AND_STATUS_UPDATE,UI刷新會議成員列表和會議信息。
//c code case TSDK_E_CONF_EVT_JOIN_DATA_CONF_RESULT: { ::PostMessage(maindlg->GetSafeHwnd(), WM_CONF_CTRL_JOIN_DATACONF_RESULT, NULL, (LPARAM)param2); break; } |
注意事項
無。
描述
會議主席邀請新的與會者加入會議。
與會者通過主席身份加入會議,或已申請獲取為主席。
業(yè)務流程
//c code case TSDK_E_CONF_EVT_CONF_INCOMING_IND: { CHECK_POINTER(data); TSDK_S_CONF_INCOMING_INFO* pResult = (TSDK_S_CONF_INCOMING_INFO*)data; TSDK_S_CONF_INCOMING_INFO* notifyInfo = new TSDK_S_CONF_INCOMING_INFO; memset(notifyInfo, 0, sizeof(TSDK_S_CONF_INCOMING_INFO)); memcpy_s(notifyInfo, sizeof(TSDK_S_CONF_INCOMING_INFO), pResult, sizeof(TSDK_S_CONF_INCOMING_INFO)); ::PostMessage(maindlg->GetSafeHwnd(), WM_CONF_CTRL_CONF_COMMING, (WPARAM)notifyInfo, (LPARAM)param1); break; } LRESULT CDemoMainDlg::OnConfInComming(WPARAM wparam, LPARAM lparam) { TSDK_S_CONF_INCOMING_INFO* notifyInfo = (TSDK_S_CONF_INCOMING_INFO*)wparam; CHECK_POINTER_RETURN(notifyInfo, 0L); unsigned int handle = (unsigned int)lparam; std::string strchairman = notifyInfo->number; unsigned int conf_id = CTools::str2num(notifyInfo->conf_id); SetConfChairman(false); CDemoCallInCommingDlg incommingDlg; if (TSDK_E_CONF_MEDIA_VIDEO == notifyInfo->conf_media_type || TSDK_E_CONF_MEDIA_VIDEO_DATA == notifyInfo->conf_media_type) { incommingDlg.GetInitParam(VIDEO_CONF_CALL, strchairman, conf_id); } else { incommingDlg.GetInitParam(AUDIO_CONF_CALL, strchairman, conf_id); } INT_PTR nResponse = incommingDlg.DoModal(); if (IDOK == nResponse) { if (TSDK_E_CONF_MEDIA_VIDEO == notifyInfo->conf_media_type || TSDK_E_CONF_MEDIA_VIDEO_DATA == notifyInfo->conf_media_type) { (void)service_conf_mem_accept(handle, TRUE); } else { (void)service_conf_mem_accept(handle, FALSE); } } else { (void)service_conf_mem_reject(handle); } m_confHandle = handle; SAFE_DELETE(notifyInfo); return 0L; } |
//c code TSDK_RESULT ret; ret = tsdk_accept_conference(confHandle, isJoinVideo); if (TSDK_SUCCESS != ret) { LOG_D_CALL_ERROR("accept conf failed. result=%#x", ret); return -1; } return TSDK_SUCCESS; |
//c code case TSDK_E_CONF_EVT_JOIN_CONF_RESULT: { if (TSDK_SUCCESS == param2) { CHECK_POINTER(data); TSDK_S_JOIN_CONF_IND_INFO* pResult = (TSDK_S_JOIN_CONF_IND_INFO*)data; TSDK_S_JOIN_CONF_IND_INFO* notifyInfo = new TSDK_S_JOIN_CONF_IND_INFO; memset(notifyInfo, 0, sizeof(TSDK_S_JOIN_CONF_IND_INFO)); memcpy_s(notifyInfo, sizeof(TSDK_S_JOIN_CONF_IND_INFO), pResult, sizeof(TSDK_S_JOIN_CONF_IND_INFO)); ::PostMessage(maindlg->GetSafeHwnd(), WM_CONF_CTRL_JOIN_RESULT, (WPARAM)notifyInfo, (LPARAM)param1); } else { maindlg->MessageBox(_T("join conf failed!")); } break; } |
代碼示例詳見“更新會議狀態(tài)信息和與會者列表”描述。
描述
用戶在未注冊EC帳號時,通過匿名方式加入一個會議。
會議已經(jīng)創(chuàng)建,且用戶通過第三方方式獲取到會議ID和密碼。
業(yè)務流程
參數(shù)TSDK_S_CONF_ANONYMOUS_JOIN_PARAM中的服務器地址和端口,指會議服務器的地址和端口。
代碼示例:
//c code TSDK_S_CONF_ANONYMOUS_JOIN_PARAM anonymousJoinConfParam; service_memset_s(&anonymousJoinConfParam,sizeof(TSDK_S_CONF_ANONYMOUS_JOIN_PARAM),0,sizeof(TSDK_S_CONF_ANONYMOUS_JOIN_PARAM)); anonymousJoinConfParam.user_id = 1; CTools::CString2Char(m_strConfId, anonymousJoinConfParam.conf_id, TSDK_D_MAX_CONF_ID_LEN); CTools::CString2Char(m_strJoinPwd, anonymousJoinConfParam.conf_password, TSDK_D_MAX_CONF_PASSWORD_LEN); CTools::CString2Char(m_strConfServerAddress, anonymousJoinConfParam.server_addr, TSDK_D_MAX_URL_LENGTH); CTools::CString2Char(m_strNickname, anonymousJoinConfParam.display_name, TSDK_D_MAX_DISPLAY_NAME_LEN); anonymousJoinConfParam.server_port = (unsigned short)CTools::str2num(CTools::UNICODE2UTF(m_strConfServerPort)); (void)service_join_conference_by_anonymous(&anonymousJoinConfParam); int service_join_conference_by_anonymous(TSDK_S_CONF_ANONYMOUS_JOIN_PARAM *confJoinParam) { TSDK_RESULT ret; ret = tsdk_join_conference_by_anonymous(confJoinParam); if (TSDK_SUCCESS != ret) { LOG_D_CALL_ERROR("join conference by anonymous failed. result=%#x", ret); return -1; } return TSDK_SUCCESS; } |
若此次事件通知返回失敗,應用程序界面應提示用戶。
代碼示例:
//c code case TSDK_E_LOGIN_EVT_GET_TEMP_USER_RESULT: { CHECK_POINTER(data); TSDK_CHAR* notifyInfo = (TSDK_CHAR*)data; ::PostMessage(logindlg->GetSafeHwnd(), WM_LOGIN_GET_TEMP_USER_RESULT, (WPARAM)notifyInfo, NULL); break; } |
匿名會議過程中,無論用戶采用主席密碼入會或是普通與會者密碼入會,均只有設置自己閉音的會控能力,其他會控能力暫不支持。
//c code case TSDK_E_CONF_EVT_JOIN_CONF_RESULT: { if (TSDK_SUCCESS == param2) { CHECK_POINTER(data); TSDK_S_JOIN_CONF_IND_INFO* pResult = (TSDK_S_JOIN_CONF_IND_INFO*)data; TSDK_S_JOIN_CONF_IND_INFO* notifyInfo = new TSDK_S_JOIN_CONF_IND_INFO; service_memset_s(notifyInfo, sizeof(TSDK_S_JOIN_CONF_IND_INFO), 0, sizeof(TSDK_S_JOIN_CONF_IND_INFO)); memcpy_s(notifyInfo, sizeof(TSDK_S_JOIN_CONF_IND_INFO), pResult, sizeof(TSDK_S_JOIN_CONF_IND_INFO)); ::PostMessage(maindlg->GetSafeHwnd(), WM_CONF_CTRL_JOIN_RESULT, (WPARAM)notifyInfo, (LPARAM)param1); } else { maindlg->MessageBox(_T("join conf failed!")); } break; } |