Updated on 2025-08-14 GMT+08:00

Starting an Instant Meeting

Function

This API is used to start an instant meeting.

Function Prototype

startP2pConf(startCallInfo: StartCallInfo, onStartP2pConfResult?: (ret: SDKERR, reason: string, createConfResult: CreateConfResult) => void): voidstartP2pConf(startCallInfo: StartCallInfo, onStartP2pConfResult?: (ret: SDKERR, reason: string, createConfResult: CreateConfResult) => void): void

Request Parameters

Table 1 Input parameter description
Parameter Mandatory Type Description
startCallInfo Yes StartCallInfo Information about starting an instant meeting.
onStartP2pConfResult Yes (ret: SDKERR, reason: string, createConfResult: CreateConfResult) => void Callback of starting the instant meeting.
Table 2 StartCallInfo
Parameter Mandatory Type Description
callerInfo Yes CallerInfo Caller information.
calleeInfo Yes CalleeInfo Called participant information.
mediaType Yes MediaType Media type.
isGuestJoinConfWithoutPwd No boolean Whether a guest can join the meeting without the password.
confAllowJoinUser No ConfAllowJoinUserType Users who are allowed to join the meeting. By default, everyone is allowed.
Table 3 CallerInfo
Parameter Mandatory Type Description
nickName No string Caller name.
Table 4 CalleeInfo
Parameter Mandatory Type Description
nickName No string Called participant name.
number Yes string Called number. If this parameter is set to the SIP number (for example, +99111244216210249) allocated to the account, the call is made via the Huawei Cloud Meeting app. 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 string Third-party account of the called participant. Either this parameter or number is used. The priority is as follows: number > thirdUserId. This parameter is used for app ID authentication.
userUuid No string Participant UUID.
type No AttendeeType Participant type.
corpId No string Enterprise ID.
Table 5 Enumerated values of AttendeeType
Enumeration Name Enumerated Value Description
ATTENDEE_TYPE_NORMAL 0 Voice, HD, or SD participant address.
ATTENDEE_TYPE_TELEPRESENCE 1 Address of a telepresence participant (uni-screen or tri-screen telepresence participant).
ATTENDEE_TYPE_TERMINAL 2 Meeting room or hard terminal.
ATTENDEE_TYPE_OUTSIDE 3 External participant.
ATTENDEE_TYPE_CUSTOMNUMBER 4 Custom number.
ATTENDEE_TYPE_MOBILE 5 Soft client user's mobile phone.
ATTENDEE_TYPE_ANONYMOUS 6 Anonymous user.
ATTENDEE_TYPE_TELEPHONE 7 Telephone user.
ATTENDEE_TYPE_BOARD 8 Whiteboard user.
ATTENDEE_TYPE_IDEAHUB 9 Large-screen device with HiSilicon chips.
ATTENDEE_TYPE_HWVISION 10 Smart TV.
ATTENDEE_TYPE_WELINKC 11 WeLink (public edition).
Table 6 Enumerated values of MediaType
Enumeration Name Enumerated Value Description
HWM_MEDIA_TYPE_AUDIO 0 Audio.
HWM_MEDIA_TYPE_VIDEO 1 Video.
Table 7 Enumerated values of ConfAllowJoinUserType
Enumeration Name Enumerated Value Description
CONF_ALLOW_JOIN_ANYONE 0 Everyone.
CONF_ALLOW_JOIN_LOGINED_USER 1 Logged-in users.
CONF_ALLOW_JOIN_IN_COMPANY_USER 2 Corporate users only.
CONF_ALLOW_JOIN_INVITED_USER 3 Invited users only.

Return Values

void

Callback Method Parameters

(ret: SDKERR, reason: string, createConfResult: CreateConfResult) => void

Table 8 Input parameter description
Parameter Type Description
ret For details about SDKERR, see Error Code Reference. Error code.
reason string Error description.
createConfResult CreateConfResult Meeting creation result.
Table 9 CreateConfResult
Parameter Type Description
confId string Meeting ID.
vmrConfId string Cloud meeting room ID (valid only for the macOS platform).
hostPwd string Host password.
guestPwd string Guest password.
mediaType MediaType Meeting media type (valid only for the macOS platform).
guestJoinUri string Guest link.
selfConfRole ConfRole Role in the meeting.
subject string Meeting topic.
startTime number (Discarded. The startTimeStamp parameter is recommended.) Meeting start time, accurate to seconds (UTC).
endTime number (Discarded. The endTimeStamp field is recommended.) Meeting end time.
startTimeStamp number Meeting start time (timestamp, in seconds).
endTimeStamp number Meeting end time (timestamp, in seconds).
schedulerName string Name of the user who schedules the meeting.
customInfo string Custom extension information.
Table 10 Enumerated values of ConfRole
Enumeration Name Enumerated Value Description
HWM_CONF_ROLE_ATTENDEE 0 Guest.
HWM_CONF_ROLE_HOST 1 Host.
HWM_CONF_ROLE_AUDIENCE 2 Attendee.
HWM_CONF_ROLE_COHOST 3 Co-host.
HWM_CONF_ROLE_WAITING 4 Waiting room member.