Starting an Instant Meeting
startP2PConf
API Description
This API is used to start an instant meeting.
Precautions
1. The actual service processing result can be obtained by calling the corresponding callback API.
Method Definition
- (void)startP2PConf:(HWMUISDKStartCallInfoModel *)param callback:(_Nonnull HWMSDKCreateConfCompleteHandler)callback;
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
calleeInfo |
Yes |
Called participant information. |
|
callerInfo |
Yes |
Caller information. |
|
mediaType |
Yes |
Media type. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
nickName |
No |
NSString * |
Caller name. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
nickName |
No |
NSString * |
Called participant name. |
number |
Yes |
NSString * |
Called number. If this parameter is set to the SIP number (for example, +99111244216210249) allocated to the account, the Huawei Cloud Meeting app is called. If this parameter is set to a PSTN number (for example, 18700000000), the number is called through the VoIP gateway if the enterprise has enabled PSTN call. This parameter is used for account and password authentication. Either this parameter or thirdUserId must be set (number is prior to thirdUserId). |
thirdUserId |
Yes |
NSString * |
Third-party account of the called participant. This parameter is used for app ID authentication. Either this parameter or number must be set (number is prior to thirdUserId). |
Enumerated Value |
Description |
---|---|
HWMUISDKMediaTypeAudio |
Audio. |
HWMUISDKMediaTypeVideo |
Video. |
Return Values
None
- (void)startP2PConf { // Set the information about the called participant. HWMUISDKCalleeInfo *calleeInfo = [[HWMUISDKCalleeInfo alloc] init]; calleeInfo.nickName = @"Called participant name"; calleeInfo.number = @"123456"; calleeInfo.thirdUserId = @"123456"; // Set the caller information. HWMUISDKCallerInfo *callerInfo = [[HWMUISDKCallerInfo alloc] init]; callerInfo.nickName = @"Caller name"; HWMUISDKStartCallInfoModel *param = [[HWMUISDKStartCallInfoModel alloc] init]; // Set the media type. param.mediaType = HWMUISDKMediaTypeVideo; param.calleeInfo = calleeInfo; param.callerInfo = callerInfo; // Call the SDK API. [[HWMSdk getOpenApi] startP2PConf:param callback:^(NSError * _Nullable error, HWMCreateConfResult * _Nullable result) { if (error) { NSLog(@"Start instant meeting failed.:%@", error.localizedDescription); } else { NSLog(@"Instant meeting started."); } }]; }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot