更新时间:2019-11-20
描述
用户通过会议列表一键入会的方式加入会议。
前提条件:
业务流程
在加入会议时,入会参数(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; } |
代码示例详见“更新会议状态信息和与会者列表”描述。
//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; |
在加入数据会议后,会向UI上报会议信息及状态更新事件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; } |
注意事项
无。
描述
用户由第三方途径获取会议信息,通过输入会议号和接入码的方式加入会议。
业务流程
参见“会议列表一键入会”。
注意事项
无。
描述
用户由第三方途径获取会议信息,通过拨打统一会议接入号,使用IVR导航的方式加入会议。
前提条件:
业务流程
//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; } |
代码示例详见“更新会议状态信息和与会者列表”描述。
//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; |
在加入数据会议后,会向UI上报会议信息及状态更新事件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; } |
注意事项
无。
描述
会议主席邀请新的与会者加入会议。
与会者通过主席身份加入会议,或已申请获取为主席。
业务流程
//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; } |
代码示例详见“更新会议状态信息和与会者列表”描述。
描述
用户在未注册EC帐号时,通过匿名方式加入一个会议。
会议已经创建,且用户通过第三方方式获取到会议ID和密码。
业务流程
参数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; } |