Updated on 2023-03-23 GMT+08:00

Scheduling a Meeting

BookConf

API Description

This API is used to schedule a meeting.

Precautions

  1. Call this API after login.
  2. This API is an asynchronous API. The return value only indicates whether the API is successfully called. The actual service processing result is returned in the corresponding callback function.
  3. When calling this API, add yourself to the participant list and set yourself as the host.
  4. The details about the meeting that is successfully scheduled are returned in the callback function. For details, see HwmConfDetail. If only the meeting ID is specified, the meeting details fail to be obtained.

Method Definition

1
HWM_SDK_AGENT_API hwmsdk::HwmErrCode BookConf(const HwmBookConfParam *param);

Callback Function

1
virtual void OnBookConfResult(hwmsdk::HwmErrCode ret, const char* reason, const HwmConfDetail* confDetail) {};

Parameter Description

Table 1 HwmBookConfParam parameters

Parameter

Mandatory

Type

Description

subject

Yes

char[]

Meeting topic.

startTime

Yes

long long

Timestamp of the meeting start time (UTC time), in seconds.

duration

Yes

int

Meeting duration, in minutes. The value ranges from 15 to 1425.

confType

No

HwmConfMediaType

Meeting type. The default meeting type is video meeting.

isNeedConfPwd

No

bool

Whether a password is required. By default, no password is required.

NOTE:

This parameter is valid only for meetings with a random ID.

isRecordOn

No

bool

Whether to enable recording.

NOTE:

This parameter is valid only for cloud recording, not for local recording on clients.

isAutoRecordOn

No

bool

Whether to enable automatic meeting recording. Disabled by default.

If automatic meeting recording is enabled, the meeting can be recorded by default even meeting recording is disabled.

NOTE:

This parameter is valid only for cloud recording, not for local recording on clients.

timeZone

Yes

int

Time zone code. For details, see Time Zone Table. This parameter is used for sending meeting notifications.

vmrFlag

No

bool

Whether to use the virtual meeting room. To schedule a meeting with a concurrent meeting ID, set this parameter to false.

vmrId

No

char[]

Unique cloud meeting room ID. To schedule a meeting with a concurrent meeting ID, set this parameter to an empty string.

joinConfRestrictionType

No

HwmJoinConfPermissionType

Participants who are allowed to join the meeting. By default, everyone is allowed.

isSmsOn

No

bool

Whether to send an SMS notification. This function must be enabled in the enterprise configuration. Otherwise, the function does not take effect.

isMailOn

No

bool

Whether to send an email notification.

isEmailCalendarOn

No

bool

Whether to send an email calendar.

attendees

Yes

HwmAttendeeInfo*

Participant list.

attendeeLen

Yes

unsigned int

Number of participants.

vmrConfIdType

No

HwmVmrConfIdType

ID type of the cloud meeting room.

guestPwd

No

char[]

Guest password. If this parameter is left blank, the guest password is generated by the server.

NOTE:

This parameter is valid only for meetings with a random ID.

isOpenWaitingRoom

No

bool

Whether to enable the waiting room.

NOTE:

The function takes effect only after the waiting room function is enabled.

allowGuestStartConf

No

bool

Whether to allow guests to join the meeting ahead of the host.

NOTE:

allowGuestStartConfTime

No

unsigned int

Time range allowed for guests to join the meeting in advance, in minutes.

0: Guests can join the meeting at any time before the scheduled time.

x: Guests can join the meeting x minutes before the scheduled time.

NOTE:
  • This parameter is valid only for meetings with random IDs.
  • For meetings with fixed IDs, the time range cannot be set.
Table 2 Enumerated values of HwmConfMediaType

Enumerated Value

Description

HWM_AUDIO_AND_DATA

Voice and data meeting.

HWM_VIDEO_AND_DATA

Video and data meeting.

Table 3 Enumerated values of HwmJoinConfPermissionType

Enumerated Value

Description

RESTRICTION_CALL_IN_ALL

Everyone.

RESTRICTION_CALL_IN_COMPANY

Corporate users only.

RESTRICTION_CALL_IN_INVITED

Invited users only.

Table 4 HwmAttendeeInfo parameters

Parameter

Mandatory

Type

Description

number

Yes

char[]

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.

thirdUserId

Yes

char[]

Third-party user ID. This parameter is used for app ID authentication. Either this parameter or number must be set.

name

Yes

char[]

Participant name.

email

No

char[]

Email address used for receiving email notifications.

sms

No

char[]

Mobile number used for receiving SMS notifications.

isMute

No

bool

Whether to mute the microphone.

isAutoInvite

No

bool

Whether to automatically invite participants.

role

Yes

HwmConfRole

Participant role in the meeting.

isAnonymous

No

BOOL

Whether to join the meeting anonymously. (This parameter is used only for obtaining the participant list).

callStatus

No

ConfAttendeeState

Participant status. (This parameter is used only for obtaining the participant list).

orgId

No

char[]

Used to identify whether the participant belongs to the current enterprise. (This parameter is used only for obtaining the participant list).

Table 5 Enumerated values of HwmConfRole

Enumerated Value

Description

HWM_CONF_ROLE_ATTENDEE

Common participant.

HWM_CONF_ROLE_CHAIRMAN

Host.

Table 6 Enumerated values of HwmVmrConfIdType

Enumerated Value

Description

HWM_VMR_CONF_ID_TYPE_FIXED

(Default) Fixed ID of the cloud meeting room.

HWM_VMR_CONF_ID_TYPE_RANDOM

Random ID of the cloud meeting room.

Table 7 Return values

Type

Description

HwmErrCode

If 0 is returned, the operation is successful. If other values are returned, the operation fails. For details about values returned upon failures, see Common Error Codes.

Table 8 HwmConfDetail parameters

Parameter

Type

Description

confListInfo

HwmConfListInfo

Meeting details. For details, see Table 3.

vmrFlag

bool

Whether the meeting is in a cloud meeting room.

vmrId

char[]

Unique cloud meeting room ID.

isRecordOn

bool

Whether recording is supported.

isAutoRecord

bool

Whether to enable automatic meeting recording.

isGuestFreePwd

bool

Whether a guest can join the meeting without the password.

isMailOn

bool

Whether to send email notifications.

isSmsOn

bool

Whether to send SMS notifications.

isEmailCalenderOn

bool

Whether to send calendar notifications.

joinConfRestrictionType

HwmJoinConfPermissionType

Participants who are allowed to join the meeting. For details, see Table 3.

attendees

HwmAttendeeInfo*

Participant list. For details about the fields, see Scheduling a Meeting.

attendeeLen

unsigned int

Number of participants.

confServerType

HwmConfServerType

Meeting server type. 1: RTC. 0: MCU.

isOpenWaitingRoom

bool

Whether to enable the waiting room

Sample Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
* Schedule a meeting.
*/
int CdemoBookConfDlg::OnBnClickedBookConf()
{
    hwmsdkagent::HwmBookConfParam data = {0};
    string confSubject = u8"My scheduled meeting"; // The value must be a UTF-8 character string.
    strncpy_s(data.subject, confSubject.c_str(), HWM_MAX_SUBJECT_LEN);
    data.confType = hwmsdkagent::HwmConfMediaType::HWM_VIDEO_AND_DATA;
    data.isNeedConfPwd = true;
    data.isAutoRecordOn = true;
    data.isRecordOn = true;
    data.startTime = 1598398920; // UTC timestamp, in seconds. If the obtained time is the local time, the time needs to be converted to the UTC time.
    data.duration = 30; // Meeting duration, in minutes
    data.timeZone = 56; // Time zone. The value 56 indicates GMT+08:00.
    data.joinConfRestrictionType = hwmsdkagent::HwmJoinConfPermissionType::RESTRICTION_CALL_IN_ALL;
    
    std::vector<hwmsdkagent::HwmAttendeeInfo> attendeeList;
    // Participants to invite
    hwmsdkagent::HwmAttendeeInfo attendeeInfo = { 0 };
    string attName = "Mike";
    string attNumber = "+991116003543";
    string attEmail = "";
    string attSms = "";
    string attUserId = "";
    strncpy_s(attendeeInfo.name, attName.c_str(), HWM_MAX_USER_NAME_LEN);
    strncpy_s(attendeeInfo.number, attNumber.c_str(), HWM_MAX_NUMBER_LEN);
    strncpy_s(attendeeInfo.email, attEmail.c_str(), HWM_MAX_EMAIL_LEN);
    strncpy_s(attendeeInfo.sms, attSms.c_str(), HWM_MAX_PHONE_NUM_LEN);
    strncpy_s(attendeeInfo.thirdUserId, attUserId.c_str(), HWM_MAX_USER_ID_LEN);
    attendeeInfo.isMute = true;
    attendeeInfo.isAutoInvite = true;
    attendeeList.push_back(attendeeInfo);
 
    data.attendees = attendeeList.data();
    data.attendeeLen = attendeeList.size(); 
    data.isSmsOn = true;
    data.isMailOn = true;
    data.isEmailCalendarOn = true;
    return hwmsdkagent::BookConf(&data);
}