Initiating a Call
Function
This API is used to initiate a call by calling a number or a third-party account. Call this API only after login.
Function Prototype
startCall(startCallInfo: StartCallInfo, onStartCallResult?: (ret: SDKERR, reason: string) => void): voidstartCall(startCallInfo: StartCallInfo, onStartCallResult?: (ret: SDKERR, reason: string) => void): void
Request Parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
startCallInfo | Y | StartCallInfo | Parameters for initiating a call. |
onStartCallResult | Y | (ret: SDKERR, reason: string) => void | Callback of initiating the call. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
callerInfo | Y | CallerInfo | Caller information. |
calleeInfo | Y | CalleeInfo | Called participant information. |
mediaType | Y | MediaType | Media type. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
nickName | N | string | Caller name. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
nickName | N | string | Called participant name. |
number | Y | string | 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 | Y | 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. |
Enumeration Name | Enumerated Value | Description |
---|---|---|
HWM_MEDIA_TYPE_AUDIO | 0 | Audio. |
HWM_MEDIA_TYPE_VIDEO | 1 | Video. |
Return Values
void
Callback Method Parameters
(ret: SDKERR, reason: string) => void
Parameter | Type | Description |
---|---|---|
ret | For details about SDKERR, see Error Code Reference. | Error code. |
reason | string | Error description. |
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