更新時間:2019-11-20
描述
用戶通過會議列表一鍵入會的方式加入會議。
前提條件
業(yè)務(wù)流程
在加入會議時,入會參數(shù)(conf_join_param),是否視頻接入會議(is_video_join)為必選;
-(BOOL)joinConferenceWithConfId:(NSString *)confId AccessNumber:(NSString *)accessNumber confPassWord:(NSString *)confPassWord joinNumber:(NSString *)joinNumber isVideoJoin:(BOOL)isVideoJoin { TSDK_S_CONF_JOIN_PARAM confJoinParam; memset(&confJoinParam, 0, sizeof(TSDK_S_CONF_JOIN_PARAM)); if (confId.length > 0 && confId != nil) { strcpy(confJoinParam.conf_id, [confId UTF8String]); } if (confPassWord.length > 0 && confPassWord != nil) { strcpy(confJoinParam.conf_password, [confPassWord UTF8String]); } if (accessNumber.length > 0 && accessNumber != nil) { strcpy(confJoinParam.access_number, [accessNumber UTF8String]); } TSDK_CHAR join_number; if (!self.selfJoinNumber) { self.selfJoinNumber = self.sipAccount; } strcpy(&join_number, [self.selfJoinNumber UTF8String]); TSDK_UINT32 call_id; BOOL result = tsdk_join_conference(&confJoinParam, &join_number, (TSDK_BOOL)isVideoJoin, &call_id); DDLogInfo(@"tsdk_join_conference = %d, call_id is :%d",result,call_id); return result == TSDK_SUCCESS ? YES : NO; }
case TSDK_E_CONF_EVT_JOIN_CONF_RESULT: { DDLogInfo(@"TSDK_E_CONF_EVT_JOIN_CONF_RESULT"); BOOL result = notify.param2 == TSDK_SUCCESS; if (!result) { DDLogError(@"TSDK_E_CONF_EVT_JOIN_CONF_RESULT,error:%@",[NSString stringWithUTF8String:(TSDK_CHAR *)notify.data]); return; } _confHandle = notify.param1; TSDK_S_JOIN_CONF_IND_INFO *confInfo = (TSDK_S_JOIN_CONF_IND_INFO *)notify.data; _currentCallId = confInfo->call_id; dispatch_async(dispatch_get_main_queue(), ^{ // go conference [self goConferenceRunView:nil]; [self respondsECConferenceDelegateWithType:CONF_E_CONNECT result:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:TUP_CALL_REMOVE_CALL_VIEW_NOTIFY object:nil]; }); } break;
case TSDK_E_CONF_EVT_INFO_AND_STATUS_UPDATE: { DDLogInfo(@"TSDK_E_CONF_EVT_INFO_AND_STATUS_UPDATE"); [self handleAttendeeUpdateNotify:notify]; } break;
case TSDK_E_CONF_EVT_GET_DATACONF_PARAM_RESULT: { DDLogInfo(@"TSDK_E_CONF_EVT_GET_DATACONF_PARAM_RESULT"); BOOL result = notify.param2 == TSDK_SUCCESS; if (!result) { DDLogError(@"TSDK_E_CONF_EVT_GET_DATACONF_PARAM_RESULT,error:%@",[NSString stringWithUTF8String:(TSDK_CHAR *)notify.data]); return; } dispatch_async(dispatch_get_main_queue(), ^{ [self joinDataConference]; [self startHeartBeatTimer]; }); } break;
-(void)joinDataConference { TSDK_RESULT result = tsdk_join_data_conference(_confHandle); DDLogInfo(@"tsdk_join_data_conference ret: %d", result); }
在加入數(shù)據(jù)會議后,會向UI上報會議信息及狀態(tài)更新事件TSDK_E_CONF_EVT_INFO_AND_STATUS_UPDATE,UI刷新會議成員列表和會議信息。
case TSDK_E_CONF_EVT_JOIN_DATA_CONF_RESULT: { DDLogInfo(@"TSDK_E_CONF_EVT_JOIN_DATA_CONF_RESULT"); NSDictionary *resultInfo = nil; BOOL isSuccess = notify.param2 == TSDK_SUCCESS; resultInfo = @{ UCCONF_RESULT_KEY :[NSNumber numberWithBool:isSuccess] }; [self respondsECConferenceDelegateWithType:DATA_CONF_JOIN_RESOULT result:resultInfo]; } break;
注意事項(xiàng)
無。
描述
用戶由第三方途徑獲取會議信息,通過輸入會議號和接入碼的方式加入會議。
業(yè)務(wù)流程
參見“會議列表一鍵入會”。
注意事項(xiàng)
無。
描述
用戶由第三方途徑獲取會議信息,通過撥打統(tǒng)一會議接入號,使用IVR導(dǎo)航的方式加入會議。
前提條件
業(yè)務(wù)流程
TSDK_BOOL isVideo = ((TSDK_CALL_E_CALL_TYPE)callType==CALL_VIDEO)?TSDK_TRUE:TSDK_FALSE; TSDK_UINT32 callid = 0; TSDK_RESULT ret = tsdk_start_call(&callid,(TSDK_CHAR*)[number UTF8String], isVideo);
case TSDK_E_CALL_EVT_CALL_CONNECTED: { DDLogInfo(@"Call_Log: recv call notify :CALL_E_EVT_CALL_CONNECTED"); TSDK_S_CALL_INFO *callInfo = (TSDK_S_CALL_INFO *)notify.data; CallInfo *tsdkCallInfo = [CallInfo transfromFromCallInfoStract:callInfo]; NSString *callId = [NSString stringWithFormat:@"%d", tsdkCallInfo.stateInfo.callId]; [_tsdkCallInfoDic setObject:tsdkCallInfo forKey:callId]; NSDictionary *resultInfo = @{ TSDK_CALL_INFO_KEY : tsdkCallInfo }; [self respondsCallDelegateWithType:CALL_CONNECT result:resultInfo]; }
- (BOOL)sendDTMFWithDialNum:(NSString *)number callId:(unsigned int)callId { TSDK_E_DTMF_TONE dtmfTone = (TSDK_E_DTMF_TONE)[number intValue]; if ([number isEqualToString:@"*"]) { dtmfTone = TSDK_E_DTMF_STAR; } else if ([number isEqualToString:@"#"]) { dtmfTone = TSDK_E_DTMF_POUND; } TSDK_UINT32 callid = callId; TSDK_RESULT ret = tsdk_send_dtmf((TSDK_UINT32)callid,(TSDK_E_DTMF_TONE)dtmfTone); DDLogInfo(@"Call_Log: tsdk_send_dtmf = %@",(TSDK_SUCCESS == ret)?@"YES":@"NO"); return ret == TSDK_SUCCESS ? YES : NO; }
case TSDK_E_CONF_EVT_JOIN_CONF_RESULT: { DDLogInfo(@"TSDK_E_CONF_EVT_JOIN_CONF_RESULT"); BOOL result = notify.param2 == TSDK_SUCCESS; if (!result) { DDLogError(@"TSDK_E_CONF_EVT_JOIN_CONF_RESULT,error:%@",[NSString stringWithUTF8String:(TSDK_CHAR *)notify.data]); return; } _confHandle = notify.param1; TSDK_S_JOIN_CONF_IND_INFO *confInfo = (TSDK_S_JOIN_CONF_IND_INFO *)notify.data; _currentCallId = confInfo->call_id; dispatch_async(dispatch_get_main_queue(), ^{ // go conference [self goConferenceRunView:nil]; [self respondsECConferenceDelegateWithType:CONF_E_CONNECT result:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:TUP_CALL_REMOVE_CALL_VIEW_NOTIFY object:nil]; }); } break;
case TSDK_E_CONF_EVT_INFO_AND_STATUS_UPDATE: { DDLogInfo(@"TSDK_E_CONF_EVT_INFO_AND_STATUS_UPDATE"); [self handleAttendeeUpdateNotify:notify]; } break;
case TSDK_E_CONF_EVT_GET_DATACONF_PARAM_RESULT: { DDLogInfo(@"TSDK_E_CONF_EVT_GET_DATACONF_PARAM_RESULT"); BOOL result = notify.param2 == TSDK_SUCCESS; if (!result) { DDLogError(@"TSDK_E_CONF_EVT_GET_DATACONF_PARAM_RESULT,error:%@",[NSString stringWithUTF8String:(TSDK_CHAR *)notify.data]); return; } dispatch_async(dispatch_get_main_queue(), ^{ [self joinDataConference]; [self startHeartBeatTimer]; }); } break;
-(void)joinDataConference { TSDK_RESULT result = tsdk_join_data_conference(_confHandle); DDLogInfo(@"tsdk_join_data_conference ret: %d", result); }
在加入數(shù)據(jù)會議后,會向UI上報會議信息及狀態(tài)更新事件TSDK_E_CONF_EVT_INFO_AND_STATUS_UPDATE,UI刷新會議成員列表和會議信息。
case TSDK_E_CONF_EVT_JOIN_DATA_CONF_RESULT: { DDLogInfo(@"TSDK_E_CONF_EVT_JOIN_DATA_CONF_RESULT"); NSDictionary *resultInfo = nil; BOOL isSuccess = notify.param2 == TSDK_SUCCESS; resultInfo = @{ UCCONF_RESULT_KEY :[NSNumber numberWithBool:isSuccess] }; [self respondsECConferenceDelegateWithType:DATA_CONF_JOIN_RESOULT result:resultInfo]; } break;
注意事項(xiàng)
無。
描述
會議主席邀請新的與會者加入會議。
與會者通過主席身份加入會議,或已申請獲取為主席。
業(yè)務(wù)流程
在會議來電通知攜帶的信息(TSDK_S_CONF_INCOMING_INFO)中,對端號碼(number)一般默認(rèn)為會議服務(wù)的統(tǒng)一接入號碼,作為對用戶的提示意義不大,建議使用會議主題(subject)作為來電提示信息。
case TSDK_E_CONF_EVT_CONF_INCOMING_IND: { if (!self.selfJoinNumber) { self.selfJoinNumber = self.sipAccount; } DDLogInfo(@"TSDK_E_CONF_EVT_CONF_INCOMING_IND"); int callID = notify.param2; _confHandle = notify.param1; TSDK_S_CONF_INCOMING_INFO *inComingInfo = (TSDK_S_CONF_INCOMING_INFO *)notify.data; CallInfo *tsdkCallInfo = [[CallInfo alloc]init]; tsdkCallInfo.stateInfo.callId = callID; BOOL is_video_conf = NO; if (inComingInfo->conf_media_type == TSDK_E_CONF_MEDIA_VIDEO || inComingInfo->conf_media_type == TSDK_E_CONF_MEDIA_VIDEO_DATA) { is_video_conf = YES; } tsdkCallInfo.stateInfo.callType = is_video_conf?CALL_VIDEO:CALL_AUDIO; tsdkCallInfo.stateInfo.callNum = [NSString stringWithUTF8String:inComingInfo->number]; [[NSNotificationCenter defaultCenter] postNotificationName:EC_COMING_CONF_NOTIFY object:nil userInfo:@{TUP_CONF_INCOMING_KEY : tsdkCallInfo}]; } break;
- (BOOL)acceptConfCallIsJoinVideoConf:(BOOL)isJoinVideoConf { BOOL result = tsdk_accept_conference(_confHandle, isJoinVideoConf); DDLogInfo(@"tsdk_accept_conference = %d, _confHandle is :%d",result,_confHandle); return result == TSDK_SUCCESS ? YES : NO; }
case TSDK_E_CONF_EVT_JOIN_CONF_RESULT: { DDLogInfo(@"TSDK_E_CONF_EVT_JOIN_CONF_RESULT"); BOOL result = notify.param2 == TSDK_SUCCESS; if (!result) { DDLogError(@"TSDK_E_CONF_EVT_JOIN_CONF_RESULT,error:%@",[NSString stringWithUTF8String:(TSDK_CHAR *)notify.data]); return; } _confHandle = notify.param1; TSDK_S_JOIN_CONF_IND_INFO *confInfo = (TSDK_S_JOIN_CONF_IND_INFO *)notify.data; _currentCallId = confInfo->call_id; dispatch_async(dispatch_get_main_queue(), ^{ // go conference [self goConferenceRunView:nil]; [self respondsECConferenceDelegateWithType:CONF_E_CONNECT result:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:TUP_CALL_REMOVE_CALL_VIEW_NOTIFY object:nil]; }); } break;
case TSDK_E_CONF_EVT_INFO_AND_STATUS_UPDATE: { DDLogInfo(@"TSDK_E_CONF_EVT_INFO_AND_STATUS_UPDATE"); [self handleAttendeeUpdateNotify:notify]; } break;
注意事項(xiàng)
無。
描述
用戶在未注冊EC帳號時,通過匿名方式加入一個會議。
會議已經(jīng)創(chuàng)建,且用戶通過第三方方式獲取到會議ID和密碼。
業(yè)務(wù)流程
參數(shù)TSDK_S_CONF_ANONYMOUS_JOIN_PARAM中的服務(wù)器地址和端口,指會議服務(wù)器的地址和端口。
- (BOOL)joinConferenceWithDisPlayName:(NSString *)disPlayName ConfId:(NSString *)confID PassWord:(NSString *)passWord ServerAdd:(NSString *)serverAdd ServerPort:(int)serverPort { TSDK_S_CONF_ANONYMOUS_JOIN_PARAM anonymousParam; memset(&anonymousParam, 0, sizeof(TSDK_S_CONF_ANONYMOUS_JOIN_PARAM)); strcpy(anonymousParam.display_name, [disPlayName UTF8String]); strcpy(anonymousParam.conf_id, [confID UTF8String]); strcpy(anonymousParam.conf_password, [passWord UTF8String]); strcpy(anonymousParam.server_addr, [serverAdd UTF8String]); anonymousParam.server_port = serverPort; TSDK_RESULT joinConfResult = tsdk_join_conference_by_anonymous(&anonymousParam); return joinConfResult == TSDK_SUCCESS; }
若此次事件通知返回失敗,應(yīng)用程序界面應(yīng)提示用戶。
匿名會議過程中,無論用戶采用主席密碼入會或是普通與會者密碼入會,均只有設(shè)置自己閉音的會控能力,其他會控能力暫不支持。
case TSDK_E_CONF_EVT_JOIN_CONF_RESULT: { DDLogInfo(@"TSDK_E_CONF_EVT_JOIN_CONF_RESULT"); BOOL result = notify.param2 == TSDK_SUCCESS; if (!result) { DDLogError(@"TSDK_E_CONF_EVT_JOIN_CONF_RESULT,error:%@", [NSString stringWithUTF8String:(TSDK_CHAR *)notify.data]); return; } _confHandle = notify.param1; TSDK_S_JOIN_CONF_IND_INFO *confInfo = (TSDK_S_JOIN_CONF_IND_INFO *)notify.data; _currentCallId = confInfo->call_id; dispatch_async(dispatch_get_main_queue(), ^{ // go conference DDLogInfo(@"goConferenceRunView"); [self respondsECConferenceDelegateWithType:CONF_E_CONNECT result:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:TUP_CALL_REMOVE_CALL_VIEW_NOTIFY object:nil]; }); } break;
注意事項(xiàng)
無。