1e41f4b71Sopenharmony_ci# @ohos.telephony.call (Call) (System API) 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ciThe **call** module provides call management functions, including making calls, redirecting to the dial screen, obtaining the call status, and formatting phone numbers. 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ciTo subscribe to call status changes, use [`observer.on('callStateChange')`](js-apis-observer.md#observeroncallstatechange). 6e41f4b71Sopenharmony_ci 7e41f4b71Sopenharmony_ci>**NOTE** 8e41f4b71Sopenharmony_ci> 9e41f4b71Sopenharmony_ci>The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version. 10e41f4b71Sopenharmony_ci> This topic describes only system APIs provided by the module. For details about its public APIs, see [@ohos.telephony.call (Call)](js-apis-call.md). 11e41f4b71Sopenharmony_ci 12e41f4b71Sopenharmony_ci 13e41f4b71Sopenharmony_ci## Modules to Import 14e41f4b71Sopenharmony_ci 15e41f4b71Sopenharmony_ci```ts 16e41f4b71Sopenharmony_ciimport { call } from '@kit.TelephonyKit'; 17e41f4b71Sopenharmony_ci``` 18e41f4b71Sopenharmony_ci 19e41f4b71Sopenharmony_ci## call.dialCall<sup>9+</sup> 20e41f4b71Sopenharmony_ci 21e41f4b71Sopenharmony_cidialCall\(phoneNumber: string, callback: AsyncCallback\<void\>\): void 22e41f4b71Sopenharmony_ci 23e41f4b71Sopenharmony_ciInitiates a call. This API uses an asynchronous callback to return the result. 24e41f4b71Sopenharmony_ci 25e41f4b71Sopenharmony_ci**System API**: This is a system API. 26e41f4b71Sopenharmony_ci 27e41f4b71Sopenharmony_ci**Required Permissions**: ohos.permission.PLACE_CALL 28e41f4b71Sopenharmony_ci 29e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 30e41f4b71Sopenharmony_ci 31e41f4b71Sopenharmony_ci**Parameters** 32e41f4b71Sopenharmony_ci 33e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 34e41f4b71Sopenharmony_ci| ----------- | ---------------------------- | ---- | -------------------------------------- | 35e41f4b71Sopenharmony_ci| phoneNumber | string | Yes | Phone number. | 36e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result. | 37e41f4b71Sopenharmony_ci 38e41f4b71Sopenharmony_ci**Error codes** 39e41f4b71Sopenharmony_ci 40e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 41e41f4b71Sopenharmony_ci 42e41f4b71Sopenharmony_ci| ID| Error Message | 43e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 44e41f4b71Sopenharmony_ci| 201 | Permission denied. | 45e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 46e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 47e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 48e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 49e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 50e41f4b71Sopenharmony_ci| 8300005 | Airplane mode is on. | 51e41f4b71Sopenharmony_ci| 8300006 | Network not in service. | 52e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 53e41f4b71Sopenharmony_ci 54e41f4b71Sopenharmony_ci**Example** 55e41f4b71Sopenharmony_ci 56e41f4b71Sopenharmony_ci```ts 57e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 58e41f4b71Sopenharmony_ci 59e41f4b71Sopenharmony_cicall.dialCall("138xxxxxxxx", (err: BusinessError) => { 60e41f4b71Sopenharmony_ci if (err) { 61e41f4b71Sopenharmony_ci console.error(`dialCall fail, err->${JSON.stringify(err)}`); 62e41f4b71Sopenharmony_ci } else { 63e41f4b71Sopenharmony_ci console.log(`dialCall success.`); 64e41f4b71Sopenharmony_ci } 65e41f4b71Sopenharmony_ci}); 66e41f4b71Sopenharmony_ci``` 67e41f4b71Sopenharmony_ci 68e41f4b71Sopenharmony_ci 69e41f4b71Sopenharmony_ci## call.dialCall<sup>9+</sup> 70e41f4b71Sopenharmony_ci 71e41f4b71Sopenharmony_cidialCall\(phoneNumber: string, options: DialCallOptions, callback: AsyncCallback\<void\>\): void 72e41f4b71Sopenharmony_ci 73e41f4b71Sopenharmony_ciInitiates a call. You can set call options as needed. This API uses an asynchronous callback to return the result. 74e41f4b71Sopenharmony_ci 75e41f4b71Sopenharmony_ci**System API**: This is a system API. 76e41f4b71Sopenharmony_ci 77e41f4b71Sopenharmony_ci**Required Permissions**: ohos.permission.PLACE_CALL 78e41f4b71Sopenharmony_ci 79e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 80e41f4b71Sopenharmony_ci 81e41f4b71Sopenharmony_ci**Parameters** 82e41f4b71Sopenharmony_ci 83e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 84e41f4b71Sopenharmony_ci| ----------- | ----------------------------------- | ---- | ----------------------------------- | 85e41f4b71Sopenharmony_ci| phoneNumber | string | Yes | Phone number. | 86e41f4b71Sopenharmony_ci| options | [DialCallOptions](#dialcalloptions9)| Yes | Call options, which carry other configuration information of the call. | 87e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 88e41f4b71Sopenharmony_ci 89e41f4b71Sopenharmony_ci**Error codes** 90e41f4b71Sopenharmony_ci 91e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 92e41f4b71Sopenharmony_ci 93e41f4b71Sopenharmony_ci| ID| Error Message | 94e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 95e41f4b71Sopenharmony_ci| 201 | Permission denied. | 96e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 97e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 98e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 99e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 100e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 101e41f4b71Sopenharmony_ci| 8300005 | Airplane mode is on. | 102e41f4b71Sopenharmony_ci| 8300006 | Network not in service. | 103e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 104e41f4b71Sopenharmony_ci 105e41f4b71Sopenharmony_ci**Example** 106e41f4b71Sopenharmony_ci 107e41f4b71Sopenharmony_ci```ts 108e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 109e41f4b71Sopenharmony_ci 110e41f4b71Sopenharmony_cilet dialCallOptions: call.DialCallOptions = { 111e41f4b71Sopenharmony_ci accountId: 0, 112e41f4b71Sopenharmony_ci videoState: 0, 113e41f4b71Sopenharmony_ci dialScene: 0, 114e41f4b71Sopenharmony_ci dialType: 0, 115e41f4b71Sopenharmony_ci} 116e41f4b71Sopenharmony_cicall.dialCall("138xxxxxxxx", dialCallOptions, (err: BusinessError) => { 117e41f4b71Sopenharmony_ci if (err) { 118e41f4b71Sopenharmony_ci console.error(`dialCall fail, err->${JSON.stringify(err)}`); 119e41f4b71Sopenharmony_ci } else { 120e41f4b71Sopenharmony_ci console.log(`dialCall success.`); 121e41f4b71Sopenharmony_ci } 122e41f4b71Sopenharmony_ci}); 123e41f4b71Sopenharmony_ci``` 124e41f4b71Sopenharmony_ci 125e41f4b71Sopenharmony_ci 126e41f4b71Sopenharmony_ci## call.dialCall<sup>9+</sup> 127e41f4b71Sopenharmony_ci 128e41f4b71Sopenharmony_cidialCall\(phoneNumber: string, options?: DialCallOptions\): Promise\<void\> 129e41f4b71Sopenharmony_ci 130e41f4b71Sopenharmony_ciInitiates a call. You can set call options as needed. This API uses a promise to return the result. 131e41f4b71Sopenharmony_ci 132e41f4b71Sopenharmony_ci**System API**: This is a system API. 133e41f4b71Sopenharmony_ci 134e41f4b71Sopenharmony_ci**Required Permissions**: ohos.permission.PLACE_CALL 135e41f4b71Sopenharmony_ci 136e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 137e41f4b71Sopenharmony_ci 138e41f4b71Sopenharmony_ci**Parameters** 139e41f4b71Sopenharmony_ci 140e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 141e41f4b71Sopenharmony_ci| ----------- | ----------------------------------- | ---- | -------------------------------------- | 142e41f4b71Sopenharmony_ci| phoneNumber | string | Yes | Phone number. | 143e41f4b71Sopenharmony_ci| options | [DialCallOptions](#dialcalloptions9)| No | Call options, which carry other configuration information of the call.<br>If this field is not set, the following configuration is used by default. For details, see [DialCallOptions](#dialcalloptions9).<br>- **accountId**: 0 (card slot 1)<br>- **videoState**: voice call<br>- **dialScene**: common call<br>- **dialType**: carrier call | 144e41f4b71Sopenharmony_ci 145e41f4b71Sopenharmony_ci**Return value** 146e41f4b71Sopenharmony_ci 147e41f4b71Sopenharmony_ci| Type | Description | 148e41f4b71Sopenharmony_ci| ---------------------- | ---------------------------- | 149e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 150e41f4b71Sopenharmony_ci 151e41f4b71Sopenharmony_ci**Error codes** 152e41f4b71Sopenharmony_ci 153e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 154e41f4b71Sopenharmony_ci 155e41f4b71Sopenharmony_ci| ID| Error Message | 156e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 157e41f4b71Sopenharmony_ci| 201 | Permission denied. | 158e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 159e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 160e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 161e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 162e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 163e41f4b71Sopenharmony_ci| 8300005 | Airplane mode is on. | 164e41f4b71Sopenharmony_ci| 8300006 | Network not in service. | 165e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 166e41f4b71Sopenharmony_ci 167e41f4b71Sopenharmony_ci**Example** 168e41f4b71Sopenharmony_ci 169e41f4b71Sopenharmony_ci```ts 170e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 171e41f4b71Sopenharmony_ci 172e41f4b71Sopenharmony_cilet dialCallOptions: call.DialCallOptions = { 173e41f4b71Sopenharmony_ci accountId: 0, 174e41f4b71Sopenharmony_ci videoState: 0, 175e41f4b71Sopenharmony_ci dialScene: 0, 176e41f4b71Sopenharmony_ci dialType: 0, 177e41f4b71Sopenharmony_ci} 178e41f4b71Sopenharmony_cicall.dialCall("138xxxxxxxx", dialCallOptions).then(() => { 179e41f4b71Sopenharmony_ci console.log(`dialCall success.`); 180e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 181e41f4b71Sopenharmony_ci console.error(`dialCall fail, promise: err->${JSON.stringify(err)}`); 182e41f4b71Sopenharmony_ci}); 183e41f4b71Sopenharmony_ci``` 184e41f4b71Sopenharmony_ci 185e41f4b71Sopenharmony_ci 186e41f4b71Sopenharmony_ci## call.muteRinger<sup>8+</sup> 187e41f4b71Sopenharmony_ci 188e41f4b71Sopenharmony_cimuteRinger\(callback: AsyncCallback\<void\>\): void 189e41f4b71Sopenharmony_ci 190e41f4b71Sopenharmony_ciMutes the ringtone while it is playing. It does not work if the ringtone has been muted. This API uses an asynchronous callback to return the result. 191e41f4b71Sopenharmony_ci 192e41f4b71Sopenharmony_ci**System API**: This is a system API. 193e41f4b71Sopenharmony_ci 194e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 195e41f4b71Sopenharmony_ci 196e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 197e41f4b71Sopenharmony_ci 198e41f4b71Sopenharmony_ci**Parameters** 199e41f4b71Sopenharmony_ci 200e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 201e41f4b71Sopenharmony_ci| ----------- | ------------------------- | ---- | ---------- | 202e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 203e41f4b71Sopenharmony_ci 204e41f4b71Sopenharmony_ci**Error codes** 205e41f4b71Sopenharmony_ci 206e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 207e41f4b71Sopenharmony_ci 208e41f4b71Sopenharmony_ci| ID| Error Message | 209e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 210e41f4b71Sopenharmony_ci| 201 | Permission denied. | 211e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 212e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 213e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 214e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 215e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 216e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 217e41f4b71Sopenharmony_ci 218e41f4b71Sopenharmony_ci**Example** 219e41f4b71Sopenharmony_ci 220e41f4b71Sopenharmony_ci```ts 221e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 222e41f4b71Sopenharmony_ci 223e41f4b71Sopenharmony_cicall.muteRinger((err: BusinessError) => { 224e41f4b71Sopenharmony_ci if (err) { 225e41f4b71Sopenharmony_ci console.error(`muteRinger fail, err->${JSON.stringify(err)}`); 226e41f4b71Sopenharmony_ci } else { 227e41f4b71Sopenharmony_ci console.log(`muteRinger success.`); 228e41f4b71Sopenharmony_ci } 229e41f4b71Sopenharmony_ci}); 230e41f4b71Sopenharmony_ci``` 231e41f4b71Sopenharmony_ci 232e41f4b71Sopenharmony_ci 233e41f4b71Sopenharmony_ci## call.muteRinger<sup>8+</sup> 234e41f4b71Sopenharmony_ci 235e41f4b71Sopenharmony_cimuteRinger\(\): Promise\<void\> 236e41f4b71Sopenharmony_ci 237e41f4b71Sopenharmony_ciMutes the ringtone while it is playing. It does not work if the ringtone has been muted. This API uses a promise to return the result. 238e41f4b71Sopenharmony_ci 239e41f4b71Sopenharmony_ci**System API**: This is a system API. 240e41f4b71Sopenharmony_ci 241e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 242e41f4b71Sopenharmony_ci 243e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 244e41f4b71Sopenharmony_ci 245e41f4b71Sopenharmony_ci**Return value** 246e41f4b71Sopenharmony_ci 247e41f4b71Sopenharmony_ci| Type | Description | 248e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 249e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 250e41f4b71Sopenharmony_ci 251e41f4b71Sopenharmony_ci**Error codes** 252e41f4b71Sopenharmony_ci 253e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 254e41f4b71Sopenharmony_ci 255e41f4b71Sopenharmony_ci| ID| Error Message | 256e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 257e41f4b71Sopenharmony_ci| 201 | Permission denied. | 258e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 259e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 260e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 261e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 262e41f4b71Sopenharmony_ci 263e41f4b71Sopenharmony_ci**Example** 264e41f4b71Sopenharmony_ci 265e41f4b71Sopenharmony_ci```ts 266e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 267e41f4b71Sopenharmony_ci 268e41f4b71Sopenharmony_cicall.muteRinger().then(() => { 269e41f4b71Sopenharmony_ci console.log(`muteRinger success.`); 270e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 271e41f4b71Sopenharmony_ci console.error(`muteRinger fail, promise: err->${JSON.stringify(err)}`); 272e41f4b71Sopenharmony_ci}); 273e41f4b71Sopenharmony_ci``` 274e41f4b71Sopenharmony_ci 275e41f4b71Sopenharmony_ci 276e41f4b71Sopenharmony_ci## call.answerCall<sup>9+</sup> 277e41f4b71Sopenharmony_ci 278e41f4b71Sopenharmony_cianswerCall\(callId: number, callback: AsyncCallback\<void\>\): void 279e41f4b71Sopenharmony_ci 280e41f4b71Sopenharmony_ciAnswers a call. This API uses an asynchronous callback to return the result. 281e41f4b71Sopenharmony_ci 282e41f4b71Sopenharmony_ci**System API**: This is a system API. 283e41f4b71Sopenharmony_ci 284e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.ANSWER_CALL 285e41f4b71Sopenharmony_ci 286e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 287e41f4b71Sopenharmony_ci 288e41f4b71Sopenharmony_ci**Parameters** 289e41f4b71Sopenharmony_ci 290e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 291e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ----------------------------------------------- | 292e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. You can obtain the value by subscribing to **callDetailsChange** events.| 293e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result. | 294e41f4b71Sopenharmony_ci 295e41f4b71Sopenharmony_ci**Error codes** 296e41f4b71Sopenharmony_ci 297e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 298e41f4b71Sopenharmony_ci 299e41f4b71Sopenharmony_ci| ID| Error Message | 300e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 301e41f4b71Sopenharmony_ci| 201 | Permission denied. | 302e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 303e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 304e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 305e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 306e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 307e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 308e41f4b71Sopenharmony_ci 309e41f4b71Sopenharmony_ci**Example** 310e41f4b71Sopenharmony_ci 311e41f4b71Sopenharmony_ci```ts 312e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 313e41f4b71Sopenharmony_ci 314e41f4b71Sopenharmony_cicall.answerCall(1, (err: BusinessError) => { 315e41f4b71Sopenharmony_ci if (err) { 316e41f4b71Sopenharmony_ci console.error(`answerCall fail, err->${JSON.stringify(err)}`); 317e41f4b71Sopenharmony_ci } else { 318e41f4b71Sopenharmony_ci console.log(`answerCall success.`); 319e41f4b71Sopenharmony_ci } 320e41f4b71Sopenharmony_ci}); 321e41f4b71Sopenharmony_ci``` 322e41f4b71Sopenharmony_ci 323e41f4b71Sopenharmony_ci 324e41f4b71Sopenharmony_ci## call.answerCall<sup>9+</sup> 325e41f4b71Sopenharmony_ci 326e41f4b71Sopenharmony_cianswerCall(callId?: number\): Promise\<void\> 327e41f4b71Sopenharmony_ci 328e41f4b71Sopenharmony_ciAnswers a call. This API uses a promise to return the result. 329e41f4b71Sopenharmony_ci 330e41f4b71Sopenharmony_ci**System API**: This is a system API. 331e41f4b71Sopenharmony_ci 332e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.ANSWER_CALL 333e41f4b71Sopenharmony_ci 334e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 335e41f4b71Sopenharmony_ci 336e41f4b71Sopenharmony_ci**Parameters** 337e41f4b71Sopenharmony_ci 338e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 339e41f4b71Sopenharmony_ci| ------ | ------ | ---- | ------------------------------------------------------------ | 340e41f4b71Sopenharmony_ci| callId | number | No | Call ID. You can obtain the value by subscribing to **callDetailsChange** events. This field is optional from API version 9.<br>If this field is not set, the latest ringing call will be connected.| 341e41f4b71Sopenharmony_ci 342e41f4b71Sopenharmony_ci**Return value** 343e41f4b71Sopenharmony_ci 344e41f4b71Sopenharmony_ci| Type | Description | 345e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 346e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 347e41f4b71Sopenharmony_ci 348e41f4b71Sopenharmony_ci**Error codes** 349e41f4b71Sopenharmony_ci 350e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 351e41f4b71Sopenharmony_ci 352e41f4b71Sopenharmony_ci| ID| Error Message | 353e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 354e41f4b71Sopenharmony_ci| 201 | Permission denied. | 355e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 356e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 357e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 358e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 359e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 360e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 361e41f4b71Sopenharmony_ci 362e41f4b71Sopenharmony_ci**Example** 363e41f4b71Sopenharmony_ci 364e41f4b71Sopenharmony_ci```ts 365e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 366e41f4b71Sopenharmony_ci 367e41f4b71Sopenharmony_cicall.answerCall(1).then(() => { 368e41f4b71Sopenharmony_ci console.log(`answerCall success.`); 369e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 370e41f4b71Sopenharmony_ci console.error(`answerCall fail, promise: err->${JSON.stringify(err)}`); 371e41f4b71Sopenharmony_ci}); 372e41f4b71Sopenharmony_ci``` 373e41f4b71Sopenharmony_ci 374e41f4b71Sopenharmony_ci 375e41f4b71Sopenharmony_ci## call.answerCall<sup>9+</sup> 376e41f4b71Sopenharmony_ci 377e41f4b71Sopenharmony_cianswerCall\(callback: AsyncCallback\<void\>\): void 378e41f4b71Sopenharmony_ci 379e41f4b71Sopenharmony_ciAnswers a call. This API uses an asynchronous callback to return the result. 380e41f4b71Sopenharmony_ci 381e41f4b71Sopenharmony_ci**System API**: This is a system API. 382e41f4b71Sopenharmony_ci 383e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.ANSWER_CALL 384e41f4b71Sopenharmony_ci 385e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 386e41f4b71Sopenharmony_ci 387e41f4b71Sopenharmony_ci**Parameters** 388e41f4b71Sopenharmony_ci 389e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 390e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ---------- | 391e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 392e41f4b71Sopenharmony_ci 393e41f4b71Sopenharmony_ci**Error codes** 394e41f4b71Sopenharmony_ci 395e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 396e41f4b71Sopenharmony_ci 397e41f4b71Sopenharmony_ci| ID| Error Message | 398e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 399e41f4b71Sopenharmony_ci| 201 | Permission denied. | 400e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 401e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 402e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 403e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 404e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 405e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 406e41f4b71Sopenharmony_ci 407e41f4b71Sopenharmony_ci**Example** 408e41f4b71Sopenharmony_ci 409e41f4b71Sopenharmony_ci```ts 410e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 411e41f4b71Sopenharmony_ci 412e41f4b71Sopenharmony_cicall.answerCall((err: BusinessError) => { 413e41f4b71Sopenharmony_ci if (err) { 414e41f4b71Sopenharmony_ci console.error(`answerCall fail, err->${JSON.stringify(err)}`); 415e41f4b71Sopenharmony_ci } else { 416e41f4b71Sopenharmony_ci console.log(`answerCall success.`); 417e41f4b71Sopenharmony_ci } 418e41f4b71Sopenharmony_ci}); 419e41f4b71Sopenharmony_ci``` 420e41f4b71Sopenharmony_ci 421e41f4b71Sopenharmony_ci 422e41f4b71Sopenharmony_ci## call.hangUpCall<sup>9+</sup> 423e41f4b71Sopenharmony_ci 424e41f4b71Sopenharmony_cihangUpCall\(callId: number, callback: AsyncCallback\<void\>\): void 425e41f4b71Sopenharmony_ci 426e41f4b71Sopenharmony_ciEnds a call. This API uses an asynchronous callback to return the result. 427e41f4b71Sopenharmony_ci 428e41f4b71Sopenharmony_ci**System API**: This is a system API. 429e41f4b71Sopenharmony_ci 430e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.ANSWER_CALL 431e41f4b71Sopenharmony_ci 432e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 433e41f4b71Sopenharmony_ci 434e41f4b71Sopenharmony_ci**Parameters** 435e41f4b71Sopenharmony_ci 436e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 437e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ----------------------------------------------- | 438e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. You can obtain the value by subscribing to **callDetailsChange** events.| 439e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result. | 440e41f4b71Sopenharmony_ci 441e41f4b71Sopenharmony_ci**Error codes** 442e41f4b71Sopenharmony_ci 443e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 444e41f4b71Sopenharmony_ci 445e41f4b71Sopenharmony_ci| ID| Error Message | 446e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 447e41f4b71Sopenharmony_ci| 201 | Permission denied. | 448e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 449e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 450e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 451e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 452e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 453e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 454e41f4b71Sopenharmony_ci 455e41f4b71Sopenharmony_ci**Example** 456e41f4b71Sopenharmony_ci 457e41f4b71Sopenharmony_ci```ts 458e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 459e41f4b71Sopenharmony_ci 460e41f4b71Sopenharmony_cicall.hangUpCall(1, (err: BusinessError) => { 461e41f4b71Sopenharmony_ci if (err) { 462e41f4b71Sopenharmony_ci console.error(`hangUpCall fail, err->${JSON.stringify(err)}`); 463e41f4b71Sopenharmony_ci } else { 464e41f4b71Sopenharmony_ci console.log(`hangUpCall success.`); 465e41f4b71Sopenharmony_ci } 466e41f4b71Sopenharmony_ci}); 467e41f4b71Sopenharmony_ci``` 468e41f4b71Sopenharmony_ci 469e41f4b71Sopenharmony_ci 470e41f4b71Sopenharmony_ci## call.hangUpCall<sup>9+</sup> 471e41f4b71Sopenharmony_ci 472e41f4b71Sopenharmony_cihangUpCall\(callId?: number\): Promise\<void\> 473e41f4b71Sopenharmony_ci 474e41f4b71Sopenharmony_ciEnds a call. This API uses a promise to return the result. 475e41f4b71Sopenharmony_ci 476e41f4b71Sopenharmony_ci**System API**: This is a system API. 477e41f4b71Sopenharmony_ci 478e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.ANSWER_CALL 479e41f4b71Sopenharmony_ci 480e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 481e41f4b71Sopenharmony_ci 482e41f4b71Sopenharmony_ci**Parameters** 483e41f4b71Sopenharmony_ci 484e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 485e41f4b71Sopenharmony_ci| ------ | ------ | ---- | ------------------------------------------------------------ | 486e41f4b71Sopenharmony_ci| callId | number | No | Call ID. You can obtain the value by subscribing to **callDetailsChange** events. This field is optional from API version 9.<br>If this field is not set, the latest ongoing, dialed, or connected call will be ended.| 487e41f4b71Sopenharmony_ci 488e41f4b71Sopenharmony_ci**Return value** 489e41f4b71Sopenharmony_ci 490e41f4b71Sopenharmony_ci| Type | Description | 491e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 492e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 493e41f4b71Sopenharmony_ci 494e41f4b71Sopenharmony_ci**Error codes** 495e41f4b71Sopenharmony_ci 496e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 497e41f4b71Sopenharmony_ci 498e41f4b71Sopenharmony_ci| ID| Error Message | 499e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 500e41f4b71Sopenharmony_ci| 201 | Permission denied. | 501e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 502e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 503e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 504e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 505e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 506e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 507e41f4b71Sopenharmony_ci 508e41f4b71Sopenharmony_ci**Example** 509e41f4b71Sopenharmony_ci 510e41f4b71Sopenharmony_ci```ts 511e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 512e41f4b71Sopenharmony_ci 513e41f4b71Sopenharmony_cicall.hangUpCall(1).then(() => { 514e41f4b71Sopenharmony_ci console.log(`hangUpCall success.`); 515e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 516e41f4b71Sopenharmony_ci console.error(`hangUpCall fail, promise: err->${JSON.stringify(err)}`); 517e41f4b71Sopenharmony_ci}); 518e41f4b71Sopenharmony_ci``` 519e41f4b71Sopenharmony_ci 520e41f4b71Sopenharmony_ci 521e41f4b71Sopenharmony_ci## call.hangUpCall<sup>9+</sup> 522e41f4b71Sopenharmony_ci 523e41f4b71Sopenharmony_cihangUpCall\(callback: AsyncCallback\<void\>\): void 524e41f4b71Sopenharmony_ci 525e41f4b71Sopenharmony_ciEnds a call. This API uses an asynchronous callback to return the result. 526e41f4b71Sopenharmony_ci 527e41f4b71Sopenharmony_ci**System API**: This is a system API. 528e41f4b71Sopenharmony_ci 529e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.ANSWER_CALL 530e41f4b71Sopenharmony_ci 531e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 532e41f4b71Sopenharmony_ci 533e41f4b71Sopenharmony_ci**Parameters** 534e41f4b71Sopenharmony_ci 535e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 536e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ---------- | 537e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 538e41f4b71Sopenharmony_ci 539e41f4b71Sopenharmony_ci**Error codes** 540e41f4b71Sopenharmony_ci 541e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 542e41f4b71Sopenharmony_ci 543e41f4b71Sopenharmony_ci| ID| Error Message | 544e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 545e41f4b71Sopenharmony_ci| 201 | Permission denied. | 546e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 547e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 548e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 549e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 550e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 551e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 552e41f4b71Sopenharmony_ci 553e41f4b71Sopenharmony_ci 554e41f4b71Sopenharmony_ci**Example** 555e41f4b71Sopenharmony_ci 556e41f4b71Sopenharmony_ci```ts 557e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 558e41f4b71Sopenharmony_ci 559e41f4b71Sopenharmony_cicall.hangUpCall((err: BusinessError) => { 560e41f4b71Sopenharmony_ci if (err) { 561e41f4b71Sopenharmony_ci console.error(`hangUpCall fail, err->${JSON.stringify(err)}`); 562e41f4b71Sopenharmony_ci } else { 563e41f4b71Sopenharmony_ci console.log(`hangUpCall success.`); 564e41f4b71Sopenharmony_ci } 565e41f4b71Sopenharmony_ci}); 566e41f4b71Sopenharmony_ci``` 567e41f4b71Sopenharmony_ci 568e41f4b71Sopenharmony_ci 569e41f4b71Sopenharmony_ci## call.rejectCall<sup>9+</sup> 570e41f4b71Sopenharmony_ci 571e41f4b71Sopenharmony_cirejectCall\(callId: number, callback: AsyncCallback\<void\>\): void 572e41f4b71Sopenharmony_ci 573e41f4b71Sopenharmony_ciRejects a call. This API uses an asynchronous callback to return the result. 574e41f4b71Sopenharmony_ci 575e41f4b71Sopenharmony_ci**System API**: This is a system API. 576e41f4b71Sopenharmony_ci 577e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.ANSWER_CALL 578e41f4b71Sopenharmony_ci 579e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 580e41f4b71Sopenharmony_ci 581e41f4b71Sopenharmony_ci**Parameters** 582e41f4b71Sopenharmony_ci 583e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 584e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ----------------------------------------------- | 585e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. You can obtain the value by subscribing to **callDetailsChange** events.| 586e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result. | 587e41f4b71Sopenharmony_ci 588e41f4b71Sopenharmony_ci**Error codes** 589e41f4b71Sopenharmony_ci 590e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 591e41f4b71Sopenharmony_ci 592e41f4b71Sopenharmony_ci| ID| Error Message | 593e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 594e41f4b71Sopenharmony_ci| 201 | Permission denied. | 595e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 596e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 597e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 598e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 599e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 600e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 601e41f4b71Sopenharmony_ci 602e41f4b71Sopenharmony_ci 603e41f4b71Sopenharmony_ci**Example** 604e41f4b71Sopenharmony_ci 605e41f4b71Sopenharmony_ci```ts 606e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 607e41f4b71Sopenharmony_ci 608e41f4b71Sopenharmony_cicall.rejectCall(1, (err: BusinessError) => { 609e41f4b71Sopenharmony_ci if (err) { 610e41f4b71Sopenharmony_ci console.error(`rejectCall fail, err->${JSON.stringify(err)}`); 611e41f4b71Sopenharmony_ci } else { 612e41f4b71Sopenharmony_ci console.log(`rejectCall success.`); 613e41f4b71Sopenharmony_ci } 614e41f4b71Sopenharmony_ci}); 615e41f4b71Sopenharmony_ci``` 616e41f4b71Sopenharmony_ci 617e41f4b71Sopenharmony_ci 618e41f4b71Sopenharmony_ci## call.rejectCall<sup>9+</sup> 619e41f4b71Sopenharmony_ci 620e41f4b71Sopenharmony_cirejectCall\(callId: number, options: RejectMessageOptions, callback: AsyncCallback\<void\>\): void 621e41f4b71Sopenharmony_ci 622e41f4b71Sopenharmony_ciRejects a call. This API uses an asynchronous callback to return the result. 623e41f4b71Sopenharmony_ci 624e41f4b71Sopenharmony_ci**System API**: This is a system API. 625e41f4b71Sopenharmony_ci 626e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.ANSWER_CALL 627e41f4b71Sopenharmony_ci 628e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 629e41f4b71Sopenharmony_ci 630e41f4b71Sopenharmony_ci**Parameters** 631e41f4b71Sopenharmony_ci 632e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 633e41f4b71Sopenharmony_ci| -------- | ---------------------------------------------- | ---- | ----------------------------------------------- | 634e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. You can obtain the value by subscribing to **callDetailsChange** events.| 635e41f4b71Sopenharmony_ci| options | [RejectMessageOptions](#rejectmessageoptions7) | Yes | Options for the call rejection message. | 636e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result. | 637e41f4b71Sopenharmony_ci 638e41f4b71Sopenharmony_ci**Error codes** 639e41f4b71Sopenharmony_ci 640e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 641e41f4b71Sopenharmony_ci 642e41f4b71Sopenharmony_ci| ID| Error Message | 643e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 644e41f4b71Sopenharmony_ci| 201 | Permission denied. | 645e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 646e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 647e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 648e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 649e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 650e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 651e41f4b71Sopenharmony_ci 652e41f4b71Sopenharmony_ci**Example** 653e41f4b71Sopenharmony_ci 654e41f4b71Sopenharmony_ci```ts 655e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 656e41f4b71Sopenharmony_ci 657e41f4b71Sopenharmony_cilet rejectMessageOptions : call.RejectMessageOptions = { 658e41f4b71Sopenharmony_ci messageContent: "Unknown number blocked" 659e41f4b71Sopenharmony_ci} 660e41f4b71Sopenharmony_cicall.rejectCall(1, rejectMessageOptions, (err: BusinessError) => { 661e41f4b71Sopenharmony_ci if (err) { 662e41f4b71Sopenharmony_ci console.error(`rejectCall fail, err->${JSON.stringify(err)}`); 663e41f4b71Sopenharmony_ci } else { 664e41f4b71Sopenharmony_ci console.log(`rejectCall success.`); 665e41f4b71Sopenharmony_ci } 666e41f4b71Sopenharmony_ci}); 667e41f4b71Sopenharmony_ci``` 668e41f4b71Sopenharmony_ci 669e41f4b71Sopenharmony_ci 670e41f4b71Sopenharmony_ci## call.rejectCall<sup>9+</sup> 671e41f4b71Sopenharmony_ci 672e41f4b71Sopenharmony_cirejectCall\(callId?: number, options?: RejectMessageOptions\): Promise\<void\> 673e41f4b71Sopenharmony_ci 674e41f4b71Sopenharmony_ciRejects a call. This API uses a promise to return the result. 675e41f4b71Sopenharmony_ci 676e41f4b71Sopenharmony_ci**System API**: This is a system API. 677e41f4b71Sopenharmony_ci 678e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.ANSWER_CALL 679e41f4b71Sopenharmony_ci 680e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 681e41f4b71Sopenharmony_ci 682e41f4b71Sopenharmony_ci**Parameters** 683e41f4b71Sopenharmony_ci 684e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 685e41f4b71Sopenharmony_ci| ------- | ---------------------------------------------- | ---- | ------------------------------------------------------------ | 686e41f4b71Sopenharmony_ci| callId | number | No | Call ID. You can obtain the value by subscribing to **callDetailsChange** events. This field is optional from API version 9.<br>If this field is not set, the latest ringing call will be rejected.| 687e41f4b71Sopenharmony_ci| options | [RejectMessageOptions](#rejectmessageoptions7) | No | Options for the call rejection message. If this field is not set, no call rejection message will be sent.| 688e41f4b71Sopenharmony_ci 689e41f4b71Sopenharmony_ci**Return value** 690e41f4b71Sopenharmony_ci 691e41f4b71Sopenharmony_ci| Type | Description | 692e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 693e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 694e41f4b71Sopenharmony_ci 695e41f4b71Sopenharmony_ci**Error codes** 696e41f4b71Sopenharmony_ci 697e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 698e41f4b71Sopenharmony_ci 699e41f4b71Sopenharmony_ci| ID| Error Message | 700e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 701e41f4b71Sopenharmony_ci| 201 | Permission denied. | 702e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 703e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 704e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 705e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 706e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 707e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 708e41f4b71Sopenharmony_ci 709e41f4b71Sopenharmony_ci**Example** 710e41f4b71Sopenharmony_ci 711e41f4b71Sopenharmony_ci```ts 712e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 713e41f4b71Sopenharmony_ci 714e41f4b71Sopenharmony_cilet rejectMessageOptions: call.RejectMessageOptions = { 715e41f4b71Sopenharmony_ci messageContent: "Unknown number blocked" 716e41f4b71Sopenharmony_ci} 717e41f4b71Sopenharmony_cicall.rejectCall(1, rejectMessageOptions).then(() => { 718e41f4b71Sopenharmony_ci console.log(`rejectCall success.`); 719e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 720e41f4b71Sopenharmony_ci console.error(`rejectCall fail, promise: err->${JSON.stringify(err)}`); 721e41f4b71Sopenharmony_ci}); 722e41f4b71Sopenharmony_ci``` 723e41f4b71Sopenharmony_ci 724e41f4b71Sopenharmony_ci 725e41f4b71Sopenharmony_ci## call.rejectCall<sup>9+</sup> 726e41f4b71Sopenharmony_ci 727e41f4b71Sopenharmony_cirejectCall\(callback: AsyncCallback\<void\>\): void 728e41f4b71Sopenharmony_ci 729e41f4b71Sopenharmony_ciRejects a call. This API uses an asynchronous callback to return the result. 730e41f4b71Sopenharmony_ci 731e41f4b71Sopenharmony_ci**System API**: This is a system API. 732e41f4b71Sopenharmony_ci 733e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.ANSWER_CALL 734e41f4b71Sopenharmony_ci 735e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 736e41f4b71Sopenharmony_ci 737e41f4b71Sopenharmony_ci**Parameters** 738e41f4b71Sopenharmony_ci 739e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 740e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ---------- | 741e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 742e41f4b71Sopenharmony_ci 743e41f4b71Sopenharmony_ci**Error codes** 744e41f4b71Sopenharmony_ci 745e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 746e41f4b71Sopenharmony_ci 747e41f4b71Sopenharmony_ci| ID| Error Message | 748e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 749e41f4b71Sopenharmony_ci| 201 | Permission denied. | 750e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 751e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 752e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 753e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 754e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 755e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 756e41f4b71Sopenharmony_ci 757e41f4b71Sopenharmony_ci**Example** 758e41f4b71Sopenharmony_ci 759e41f4b71Sopenharmony_ci```ts 760e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 761e41f4b71Sopenharmony_ci 762e41f4b71Sopenharmony_cicall.rejectCall((err: BusinessError) => { 763e41f4b71Sopenharmony_ci if (err) { 764e41f4b71Sopenharmony_ci console.error(`rejectCall fail, err->${JSON.stringify(err)}`); 765e41f4b71Sopenharmony_ci } else { 766e41f4b71Sopenharmony_ci console.log(`rejectCall success.`); 767e41f4b71Sopenharmony_ci } 768e41f4b71Sopenharmony_ci}); 769e41f4b71Sopenharmony_ci``` 770e41f4b71Sopenharmony_ci 771e41f4b71Sopenharmony_ci 772e41f4b71Sopenharmony_ci## call.rejectCall<sup>9+</sup> 773e41f4b71Sopenharmony_ci 774e41f4b71Sopenharmony_cirejectCall\(options: RejectMessageOptions, callback: AsyncCallback\<void\>\): void 775e41f4b71Sopenharmony_ci 776e41f4b71Sopenharmony_ciRejects a call. This API uses an asynchronous callback to return the result. 777e41f4b71Sopenharmony_ci 778e41f4b71Sopenharmony_ci**System API**: This is a system API. 779e41f4b71Sopenharmony_ci 780e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.ANSWER_CALL 781e41f4b71Sopenharmony_ci 782e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 783e41f4b71Sopenharmony_ci 784e41f4b71Sopenharmony_ci**Parameters** 785e41f4b71Sopenharmony_ci 786e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 787e41f4b71Sopenharmony_ci| -------- | ---------------------------------------------- | ---- | -------------- | 788e41f4b71Sopenharmony_ci| options | [RejectMessageOptions](#rejectmessageoptions7) | Yes | Options for the call rejection message.| 789e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result. | 790e41f4b71Sopenharmony_ci 791e41f4b71Sopenharmony_ci**Error codes** 792e41f4b71Sopenharmony_ci 793e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 794e41f4b71Sopenharmony_ci 795e41f4b71Sopenharmony_ci| ID| Error Message | 796e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 797e41f4b71Sopenharmony_ci| 201 | Permission denied. | 798e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 799e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 800e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 801e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 802e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 803e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 804e41f4b71Sopenharmony_ci 805e41f4b71Sopenharmony_ci**Example** 806e41f4b71Sopenharmony_ci 807e41f4b71Sopenharmony_ci```ts 808e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 809e41f4b71Sopenharmony_ci 810e41f4b71Sopenharmony_cilet rejectMessageOptions: call.RejectMessageOptions = { 811e41f4b71Sopenharmony_ci messageContent: "Unknown number blocked" 812e41f4b71Sopenharmony_ci} 813e41f4b71Sopenharmony_cicall.rejectCall(rejectMessageOptions, (err: BusinessError) => { 814e41f4b71Sopenharmony_ci if (err) { 815e41f4b71Sopenharmony_ci console.error(`rejectCall fail, err->${JSON.stringify(err)}`); 816e41f4b71Sopenharmony_ci } else { 817e41f4b71Sopenharmony_ci console.log(`rejectCall success.`); 818e41f4b71Sopenharmony_ci } 819e41f4b71Sopenharmony_ci}); 820e41f4b71Sopenharmony_ci``` 821e41f4b71Sopenharmony_ci 822e41f4b71Sopenharmony_ci 823e41f4b71Sopenharmony_ci## call.holdCall<sup>7+</sup> 824e41f4b71Sopenharmony_ci 825e41f4b71Sopenharmony_ciholdCall\(callId: number, callback: AsyncCallback\<void\>\): void 826e41f4b71Sopenharmony_ci 827e41f4b71Sopenharmony_ciHolds a call based on the specified call ID. This API uses an asynchronous callback to return the result. 828e41f4b71Sopenharmony_ci 829e41f4b71Sopenharmony_ci**System API**: This is a system API. 830e41f4b71Sopenharmony_ci 831e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.ANSWER_CALL 832e41f4b71Sopenharmony_ci 833e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 834e41f4b71Sopenharmony_ci 835e41f4b71Sopenharmony_ci**Parameters** 836e41f4b71Sopenharmony_ci 837e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 838e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ---------- | 839e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 840e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 841e41f4b71Sopenharmony_ci 842e41f4b71Sopenharmony_ci**Error codes** 843e41f4b71Sopenharmony_ci 844e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 845e41f4b71Sopenharmony_ci 846e41f4b71Sopenharmony_ci| ID| Error Message | 847e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 848e41f4b71Sopenharmony_ci| 201 | Permission denied. | 849e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 850e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 851e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 852e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 853e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 854e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 855e41f4b71Sopenharmony_ci 856e41f4b71Sopenharmony_ci**Example** 857e41f4b71Sopenharmony_ci 858e41f4b71Sopenharmony_ci```ts 859e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 860e41f4b71Sopenharmony_ci 861e41f4b71Sopenharmony_cicall.holdCall(1, (err: BusinessError) => { 862e41f4b71Sopenharmony_ci if (err) { 863e41f4b71Sopenharmony_ci console.error(`holdCall fail, err->${JSON.stringify(err)}`); 864e41f4b71Sopenharmony_ci } else { 865e41f4b71Sopenharmony_ci console.log(`holdCall success.`); 866e41f4b71Sopenharmony_ci } 867e41f4b71Sopenharmony_ci}); 868e41f4b71Sopenharmony_ci``` 869e41f4b71Sopenharmony_ci 870e41f4b71Sopenharmony_ci 871e41f4b71Sopenharmony_ci## call.holdCall<sup>7+</sup> 872e41f4b71Sopenharmony_ci 873e41f4b71Sopenharmony_ciholdCall\(callId: number\): Promise\<void\> 874e41f4b71Sopenharmony_ci 875e41f4b71Sopenharmony_ciHolds a call based on the specified call ID. This API uses a promise to return the result. 876e41f4b71Sopenharmony_ci 877e41f4b71Sopenharmony_ci**System API**: This is a system API. 878e41f4b71Sopenharmony_ci 879e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.ANSWER_CALL 880e41f4b71Sopenharmony_ci 881e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 882e41f4b71Sopenharmony_ci 883e41f4b71Sopenharmony_ci**Parameters** 884e41f4b71Sopenharmony_ci 885e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 886e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------- | 887e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID.| 888e41f4b71Sopenharmony_ci 889e41f4b71Sopenharmony_ci**Return value** 890e41f4b71Sopenharmony_ci 891e41f4b71Sopenharmony_ci| Type | Description | 892e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 893e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 894e41f4b71Sopenharmony_ci 895e41f4b71Sopenharmony_ci**Error codes** 896e41f4b71Sopenharmony_ci 897e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 898e41f4b71Sopenharmony_ci 899e41f4b71Sopenharmony_ci| ID| Error Message | 900e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 901e41f4b71Sopenharmony_ci| 201 | Permission denied. | 902e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 903e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 904e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 905e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 906e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 907e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 908e41f4b71Sopenharmony_ci 909e41f4b71Sopenharmony_ci**Example** 910e41f4b71Sopenharmony_ci 911e41f4b71Sopenharmony_ci```ts 912e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 913e41f4b71Sopenharmony_ci 914e41f4b71Sopenharmony_cicall.holdCall(1).then(() => { 915e41f4b71Sopenharmony_ci console.log(`holdCall success.`); 916e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 917e41f4b71Sopenharmony_ci console.error(`holdCall fail, promise: err->${JSON.stringify(err)}`); 918e41f4b71Sopenharmony_ci}); 919e41f4b71Sopenharmony_ci``` 920e41f4b71Sopenharmony_ci 921e41f4b71Sopenharmony_ci## call.unHoldCall<sup>7+</sup> 922e41f4b71Sopenharmony_ci 923e41f4b71Sopenharmony_ciunHoldCall\(callId: number, callback: AsyncCallback\<void\>\): void 924e41f4b71Sopenharmony_ci 925e41f4b71Sopenharmony_ciUnholds a call based on the specified call ID. This API uses an asynchronous callback to return the result. 926e41f4b71Sopenharmony_ci 927e41f4b71Sopenharmony_ci**System API**: This is a system API. 928e41f4b71Sopenharmony_ci 929e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.ANSWER_CALL 930e41f4b71Sopenharmony_ci 931e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 932e41f4b71Sopenharmony_ci 933e41f4b71Sopenharmony_ci**Parameters** 934e41f4b71Sopenharmony_ci 935e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 936e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ---------- | 937e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 938e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 939e41f4b71Sopenharmony_ci 940e41f4b71Sopenharmony_ci**Error codes** 941e41f4b71Sopenharmony_ci 942e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 943e41f4b71Sopenharmony_ci 944e41f4b71Sopenharmony_ci| ID| Error Message | 945e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 946e41f4b71Sopenharmony_ci| 201 | Permission denied. | 947e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 948e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 949e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 950e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 951e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 952e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 953e41f4b71Sopenharmony_ci 954e41f4b71Sopenharmony_ci**Example** 955e41f4b71Sopenharmony_ci 956e41f4b71Sopenharmony_ci```ts 957e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 958e41f4b71Sopenharmony_ci 959e41f4b71Sopenharmony_cicall.unHoldCall(1, (err: BusinessError) => { 960e41f4b71Sopenharmony_ci if (err) { 961e41f4b71Sopenharmony_ci console.error(`unHoldCall fail, err->${JSON.stringify(err)}`); 962e41f4b71Sopenharmony_ci } else { 963e41f4b71Sopenharmony_ci console.log(`unHoldCall success.`); 964e41f4b71Sopenharmony_ci } 965e41f4b71Sopenharmony_ci}); 966e41f4b71Sopenharmony_ci``` 967e41f4b71Sopenharmony_ci 968e41f4b71Sopenharmony_ci 969e41f4b71Sopenharmony_ci## call.unHoldCall<sup>7+</sup> 970e41f4b71Sopenharmony_ci 971e41f4b71Sopenharmony_ciunHoldCall\(callId: number\): Promise\<void\> 972e41f4b71Sopenharmony_ci 973e41f4b71Sopenharmony_ciUnholds a call based on the specified call ID. This API uses a promise to return the result. 974e41f4b71Sopenharmony_ci 975e41f4b71Sopenharmony_ci**System API**: This is a system API. 976e41f4b71Sopenharmony_ci 977e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.ANSWER_CALL 978e41f4b71Sopenharmony_ci 979e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 980e41f4b71Sopenharmony_ci 981e41f4b71Sopenharmony_ci**Parameters** 982e41f4b71Sopenharmony_ci 983e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 984e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------- | 985e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID.| 986e41f4b71Sopenharmony_ci 987e41f4b71Sopenharmony_ci**Return value** 988e41f4b71Sopenharmony_ci 989e41f4b71Sopenharmony_ci| Type | Description | 990e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 991e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 992e41f4b71Sopenharmony_ci 993e41f4b71Sopenharmony_ci**Error codes** 994e41f4b71Sopenharmony_ci 995e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 996e41f4b71Sopenharmony_ci 997e41f4b71Sopenharmony_ci| ID| Error Message | 998e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 999e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1000e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1001e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1002e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1003e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1004e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1005e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 1006e41f4b71Sopenharmony_ci 1007e41f4b71Sopenharmony_ci**Example** 1008e41f4b71Sopenharmony_ci 1009e41f4b71Sopenharmony_ci```ts 1010e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1011e41f4b71Sopenharmony_ci 1012e41f4b71Sopenharmony_cicall.unHoldCall(1).then(() => { 1013e41f4b71Sopenharmony_ci console.log(`unHoldCall success.`); 1014e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 1015e41f4b71Sopenharmony_ci console.error(`unHoldCall fail, promise: err->${JSON.stringify(err)}`); 1016e41f4b71Sopenharmony_ci}); 1017e41f4b71Sopenharmony_ci``` 1018e41f4b71Sopenharmony_ci 1019e41f4b71Sopenharmony_ci## call.switchCall<sup>7+</sup> 1020e41f4b71Sopenharmony_ci 1021e41f4b71Sopenharmony_ciswitchCall\(callId: number, callback: AsyncCallback\<void\>\): void 1022e41f4b71Sopenharmony_ci 1023e41f4b71Sopenharmony_ciSwitches a call. This API uses an asynchronous callback to return the result. 1024e41f4b71Sopenharmony_ci 1025e41f4b71Sopenharmony_ci**System API**: This is a system API. 1026e41f4b71Sopenharmony_ci 1027e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.ANSWER_CALL 1028e41f4b71Sopenharmony_ci 1029e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1030e41f4b71Sopenharmony_ci 1031e41f4b71Sopenharmony_ci**Parameters** 1032e41f4b71Sopenharmony_ci 1033e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1034e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ---------- | 1035e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 1036e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 1037e41f4b71Sopenharmony_ci 1038e41f4b71Sopenharmony_ci**Error codes** 1039e41f4b71Sopenharmony_ci 1040e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1041e41f4b71Sopenharmony_ci 1042e41f4b71Sopenharmony_ci| ID| Error Message | 1043e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1044e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1045e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1046e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1047e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1048e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1049e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1050e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 1051e41f4b71Sopenharmony_ci 1052e41f4b71Sopenharmony_ci**Example** 1053e41f4b71Sopenharmony_ci 1054e41f4b71Sopenharmony_ci```ts 1055e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1056e41f4b71Sopenharmony_ci 1057e41f4b71Sopenharmony_cicall.switchCall(1, (err: BusinessError) => { 1058e41f4b71Sopenharmony_ci if (err) { 1059e41f4b71Sopenharmony_ci console.error(`switchCall fail, err->${JSON.stringify(err)}`); 1060e41f4b71Sopenharmony_ci } else { 1061e41f4b71Sopenharmony_ci console.log(`switchCall success.`); 1062e41f4b71Sopenharmony_ci } 1063e41f4b71Sopenharmony_ci}); 1064e41f4b71Sopenharmony_ci``` 1065e41f4b71Sopenharmony_ci 1066e41f4b71Sopenharmony_ci 1067e41f4b71Sopenharmony_ci## call.switchCall<sup>7+</sup> 1068e41f4b71Sopenharmony_ci 1069e41f4b71Sopenharmony_ciswitchCall\(callId: number\): Promise\<void\> 1070e41f4b71Sopenharmony_ci 1071e41f4b71Sopenharmony_ciSwitches a call. This API uses a promise to return the result. 1072e41f4b71Sopenharmony_ci 1073e41f4b71Sopenharmony_ci**System API**: This is a system API. 1074e41f4b71Sopenharmony_ci 1075e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.ANSWER_CALL 1076e41f4b71Sopenharmony_ci 1077e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1078e41f4b71Sopenharmony_ci 1079e41f4b71Sopenharmony_ci**Parameters** 1080e41f4b71Sopenharmony_ci 1081e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 1082e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------- | 1083e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID.| 1084e41f4b71Sopenharmony_ci 1085e41f4b71Sopenharmony_ci**Return value** 1086e41f4b71Sopenharmony_ci 1087e41f4b71Sopenharmony_ci| Type | Description | 1088e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 1089e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 1090e41f4b71Sopenharmony_ci 1091e41f4b71Sopenharmony_ci**Error codes** 1092e41f4b71Sopenharmony_ci 1093e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1094e41f4b71Sopenharmony_ci 1095e41f4b71Sopenharmony_ci| ID| Error Message | 1096e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1097e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1098e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1099e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1100e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1101e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1102e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1103e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 1104e41f4b71Sopenharmony_ci 1105e41f4b71Sopenharmony_ci**Example** 1106e41f4b71Sopenharmony_ci 1107e41f4b71Sopenharmony_ci```ts 1108e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1109e41f4b71Sopenharmony_ci 1110e41f4b71Sopenharmony_cicall.switchCall(1).then(() => { 1111e41f4b71Sopenharmony_ci console.log(`switchCall success.`); 1112e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 1113e41f4b71Sopenharmony_ci console.error(`switchCall fail, promise: err->${JSON.stringify(err)}`); 1114e41f4b71Sopenharmony_ci}); 1115e41f4b71Sopenharmony_ci``` 1116e41f4b71Sopenharmony_ci 1117e41f4b71Sopenharmony_ci## call.combineConference<sup>11+</sup> 1118e41f4b71Sopenharmony_ci 1119e41f4b71Sopenharmony_cicombineConference\(callId: number, callback: AsyncCallback\<void\>\): void 1120e41f4b71Sopenharmony_ci 1121e41f4b71Sopenharmony_ciCombines two calls into a conference call. This API uses an asynchronous callback to return the result. 1122e41f4b71Sopenharmony_ci 1123e41f4b71Sopenharmony_ci**System API**: This is a system API. 1124e41f4b71Sopenharmony_ci 1125e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1126e41f4b71Sopenharmony_ci 1127e41f4b71Sopenharmony_ci**Parameters** 1128e41f4b71Sopenharmony_ci 1129e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1130e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ---------- | 1131e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 1132e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 1133e41f4b71Sopenharmony_ci 1134e41f4b71Sopenharmony_ci**Error codes** 1135e41f4b71Sopenharmony_ci 1136e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1137e41f4b71Sopenharmony_ci 1138e41f4b71Sopenharmony_ci| ID| Error Message | 1139e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1140e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1141e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1142e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 1143e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1144e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1145e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1146e41f4b71Sopenharmony_ci| 8300007 | The number of conference calls exceeds the limit. | 1147e41f4b71Sopenharmony_ci 1148e41f4b71Sopenharmony_ci**Example** 1149e41f4b71Sopenharmony_ci 1150e41f4b71Sopenharmony_ci```ts 1151e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1152e41f4b71Sopenharmony_ci 1153e41f4b71Sopenharmony_cicall.combineConference(1, (err: BusinessError) => { 1154e41f4b71Sopenharmony_ci if (err) { 1155e41f4b71Sopenharmony_ci console.error(`combineConference fail, err->${JSON.stringify(err)}`); 1156e41f4b71Sopenharmony_ci } else { 1157e41f4b71Sopenharmony_ci console.log(`combineConference success.`); 1158e41f4b71Sopenharmony_ci } 1159e41f4b71Sopenharmony_ci}); 1160e41f4b71Sopenharmony_ci``` 1161e41f4b71Sopenharmony_ci 1162e41f4b71Sopenharmony_ci 1163e41f4b71Sopenharmony_ci## call.combineConference<sup>11+</sup> 1164e41f4b71Sopenharmony_ci 1165e41f4b71Sopenharmony_cicombineConference\(callId: number\): Promise\<void\> 1166e41f4b71Sopenharmony_ci 1167e41f4b71Sopenharmony_ciCombines two calls into a conference call. This API uses a promise to return the result. 1168e41f4b71Sopenharmony_ci 1169e41f4b71Sopenharmony_ci**System API**: This is a system API. 1170e41f4b71Sopenharmony_ci 1171e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1172e41f4b71Sopenharmony_ci 1173e41f4b71Sopenharmony_ci**Parameters** 1174e41f4b71Sopenharmony_ci 1175e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 1176e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------- | 1177e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID.| 1178e41f4b71Sopenharmony_ci 1179e41f4b71Sopenharmony_ci**Return value** 1180e41f4b71Sopenharmony_ci 1181e41f4b71Sopenharmony_ci| Type | Description | 1182e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 1183e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 1184e41f4b71Sopenharmony_ci 1185e41f4b71Sopenharmony_ci**Error codes** 1186e41f4b71Sopenharmony_ci 1187e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1188e41f4b71Sopenharmony_ci 1189e41f4b71Sopenharmony_ci| ID| Error Message | 1190e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1191e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1192e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1193e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 1194e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1195e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1196e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1197e41f4b71Sopenharmony_ci| 8300007 | The number of conference calls exceeds the limit. | 1198e41f4b71Sopenharmony_ci 1199e41f4b71Sopenharmony_ci**Example** 1200e41f4b71Sopenharmony_ci 1201e41f4b71Sopenharmony_ci```ts 1202e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1203e41f4b71Sopenharmony_ci 1204e41f4b71Sopenharmony_cicall.combineConference(1).then(() => { 1205e41f4b71Sopenharmony_ci console.log(`combineConference success.`); 1206e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 1207e41f4b71Sopenharmony_ci console.error(`combineConference fail, promise: err->${JSON.stringify(err)}`); 1208e41f4b71Sopenharmony_ci}); 1209e41f4b71Sopenharmony_ci``` 1210e41f4b71Sopenharmony_ci 1211e41f4b71Sopenharmony_ci## call.kickOutFromConference<sup>10+</sup> 1212e41f4b71Sopenharmony_ci 1213e41f4b71Sopenharmony_cikickOutFromConference\(callId: number, callback: AsyncCallback\<void\>\): void 1214e41f4b71Sopenharmony_ci 1215e41f4b71Sopenharmony_ciRemoves a specified call from a conference call. This API uses an asynchronous callback to return the result. 1216e41f4b71Sopenharmony_ci 1217e41f4b71Sopenharmony_ci**System API**: This is a system API. 1218e41f4b71Sopenharmony_ci 1219e41f4b71Sopenharmony_ci**Required Permissions**: ohos.permission.PLACE_CALL 1220e41f4b71Sopenharmony_ci 1221e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1222e41f4b71Sopenharmony_ci 1223e41f4b71Sopenharmony_ci**Parameters** 1224e41f4b71Sopenharmony_ci 1225e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1226e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ---------- | 1227e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 1228e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 1229e41f4b71Sopenharmony_ci 1230e41f4b71Sopenharmony_ci**Error codes** 1231e41f4b71Sopenharmony_ci 1232e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1233e41f4b71Sopenharmony_ci 1234e41f4b71Sopenharmony_ci| ID| Error Message | 1235e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1236e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1237e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1238e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1239e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1240e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1241e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1242e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 1243e41f4b71Sopenharmony_ci 1244e41f4b71Sopenharmony_ci**Example** 1245e41f4b71Sopenharmony_ci 1246e41f4b71Sopenharmony_ci```ts 1247e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1248e41f4b71Sopenharmony_ci 1249e41f4b71Sopenharmony_cicall.kickOutFromConference(1, (err: BusinessError) => { 1250e41f4b71Sopenharmony_ci if (err) { 1251e41f4b71Sopenharmony_ci console.error(`kickOutFromConference fail, err->${JSON.stringify(err)}`); 1252e41f4b71Sopenharmony_ci } else { 1253e41f4b71Sopenharmony_ci console.log(`kickOutFromConference success.`); 1254e41f4b71Sopenharmony_ci } 1255e41f4b71Sopenharmony_ci}); 1256e41f4b71Sopenharmony_ci``` 1257e41f4b71Sopenharmony_ci 1258e41f4b71Sopenharmony_ci## call.kickOutFromConference<sup>10+</sup> 1259e41f4b71Sopenharmony_ci 1260e41f4b71Sopenharmony_cikickOutFromConference\(callId: number\): Promise\<void\> 1261e41f4b71Sopenharmony_ci 1262e41f4b71Sopenharmony_ciRemoves a specified call from a conference call. This API uses a promise to return the result. 1263e41f4b71Sopenharmony_ci 1264e41f4b71Sopenharmony_ci**System API**: This is a system API. 1265e41f4b71Sopenharmony_ci 1266e41f4b71Sopenharmony_ci**Required Permissions**: ohos.permission.PLACE_CALL 1267e41f4b71Sopenharmony_ci 1268e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1269e41f4b71Sopenharmony_ci 1270e41f4b71Sopenharmony_ci**Parameters** 1271e41f4b71Sopenharmony_ci 1272e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 1273e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------- | 1274e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID.| 1275e41f4b71Sopenharmony_ci 1276e41f4b71Sopenharmony_ci**Return value** 1277e41f4b71Sopenharmony_ci 1278e41f4b71Sopenharmony_ci| Type | Description | 1279e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 1280e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 1281e41f4b71Sopenharmony_ci 1282e41f4b71Sopenharmony_ci**Error codes** 1283e41f4b71Sopenharmony_ci 1284e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1285e41f4b71Sopenharmony_ci 1286e41f4b71Sopenharmony_ci| ID| Error Message | 1287e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1288e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1289e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1290e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1291e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1292e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1293e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1294e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 1295e41f4b71Sopenharmony_ci 1296e41f4b71Sopenharmony_ci**Example** 1297e41f4b71Sopenharmony_ci 1298e41f4b71Sopenharmony_ci```ts 1299e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1300e41f4b71Sopenharmony_ci 1301e41f4b71Sopenharmony_cicall.kickOutFromConference(1).then(() => { 1302e41f4b71Sopenharmony_ci console.log(`kickOutFromConference success.`); 1303e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 1304e41f4b71Sopenharmony_ci console.error(`kickOutFromConference fail, promise: err->${JSON.stringify(err)}`); 1305e41f4b71Sopenharmony_ci}); 1306e41f4b71Sopenharmony_ci``` 1307e41f4b71Sopenharmony_ci 1308e41f4b71Sopenharmony_ci## call.getMainCallId<sup>7+</sup> 1309e41f4b71Sopenharmony_ci 1310e41f4b71Sopenharmony_cigetMainCallId\(callId: number, callback: AsyncCallback\<number\>\): void 1311e41f4b71Sopenharmony_ci 1312e41f4b71Sopenharmony_ciObtains the main call ID. This API uses an asynchronous callback to return the result. 1313e41f4b71Sopenharmony_ci 1314e41f4b71Sopenharmony_ci**System API**: This is a system API. 1315e41f4b71Sopenharmony_ci 1316e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1317e41f4b71Sopenharmony_ci 1318e41f4b71Sopenharmony_ci**Parameters** 1319e41f4b71Sopenharmony_ci 1320e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1321e41f4b71Sopenharmony_ci| -------- | --------------------------- | ---- | ------------------------ | 1322e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 1323e41f4b71Sopenharmony_ci| callback | AsyncCallback<number> | Yes | Callback used to return the result. | 1324e41f4b71Sopenharmony_ci 1325e41f4b71Sopenharmony_ci**Error codes** 1326e41f4b71Sopenharmony_ci 1327e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1328e41f4b71Sopenharmony_ci 1329e41f4b71Sopenharmony_ci| ID| Error Message | 1330e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1331e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1332e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1333e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 1334e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1335e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1336e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1337e41f4b71Sopenharmony_ci 1338e41f4b71Sopenharmony_ci 1339e41f4b71Sopenharmony_ci**Example** 1340e41f4b71Sopenharmony_ci 1341e41f4b71Sopenharmony_ci```ts 1342e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1343e41f4b71Sopenharmony_ci 1344e41f4b71Sopenharmony_cicall.getMainCallId(1, (err: BusinessError, data: number) => { 1345e41f4b71Sopenharmony_ci if (err) { 1346e41f4b71Sopenharmony_ci console.error(`getMainCallId fail, err->${JSON.stringify(err)}`); 1347e41f4b71Sopenharmony_ci } else { 1348e41f4b71Sopenharmony_ci console.log(`getMainCallId success, data->${JSON.stringify(data)}`); 1349e41f4b71Sopenharmony_ci } 1350e41f4b71Sopenharmony_ci}); 1351e41f4b71Sopenharmony_ci``` 1352e41f4b71Sopenharmony_ci 1353e41f4b71Sopenharmony_ci 1354e41f4b71Sopenharmony_ci## call.getMainCallId<sup>7+</sup> 1355e41f4b71Sopenharmony_ci 1356e41f4b71Sopenharmony_cigetMainCallId\(callId: number\): Promise\<number\> 1357e41f4b71Sopenharmony_ci 1358e41f4b71Sopenharmony_ciObtains the main call ID. This API uses a promise to return the result. 1359e41f4b71Sopenharmony_ci 1360e41f4b71Sopenharmony_ci**System API**: This is a system API. 1361e41f4b71Sopenharmony_ci 1362e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1363e41f4b71Sopenharmony_ci 1364e41f4b71Sopenharmony_ci**Parameters** 1365e41f4b71Sopenharmony_ci 1366e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 1367e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------- | 1368e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID.| 1369e41f4b71Sopenharmony_ci 1370e41f4b71Sopenharmony_ci**Return value** 1371e41f4b71Sopenharmony_ci 1372e41f4b71Sopenharmony_ci| Type | Description | 1373e41f4b71Sopenharmony_ci| ------------------- | ------------------------------- | 1374e41f4b71Sopenharmony_ci| Promise<number> | Promise used to return the result.| 1375e41f4b71Sopenharmony_ci 1376e41f4b71Sopenharmony_ci**Error codes** 1377e41f4b71Sopenharmony_ci 1378e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1379e41f4b71Sopenharmony_ci 1380e41f4b71Sopenharmony_ci| ID| Error Message | 1381e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1382e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1383e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1384e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 1385e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1386e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1387e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1388e41f4b71Sopenharmony_ci 1389e41f4b71Sopenharmony_ci 1390e41f4b71Sopenharmony_ci**Example** 1391e41f4b71Sopenharmony_ci 1392e41f4b71Sopenharmony_ci```ts 1393e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1394e41f4b71Sopenharmony_ci 1395e41f4b71Sopenharmony_cicall.getMainCallId(1).then((data: number) => { 1396e41f4b71Sopenharmony_ci console.log(`getMainCallId success, promise: data->${JSON.stringify(data)}`); 1397e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 1398e41f4b71Sopenharmony_ci console.error(`getMainCallId fail, promise: err->${JSON.stringify(err)}`); 1399e41f4b71Sopenharmony_ci}); 1400e41f4b71Sopenharmony_ci``` 1401e41f4b71Sopenharmony_ci 1402e41f4b71Sopenharmony_ci## call.getSubCallIdList<sup>7+</sup> 1403e41f4b71Sopenharmony_ci 1404e41f4b71Sopenharmony_cigetSubCallIdList\(callId: number, callback: AsyncCallback\<Array\<string\>\>\): void 1405e41f4b71Sopenharmony_ci 1406e41f4b71Sopenharmony_ciObtains the list of subcall IDs. This API uses an asynchronous callback to return the result. 1407e41f4b71Sopenharmony_ci 1408e41f4b71Sopenharmony_ci**System API**: This is a system API. 1409e41f4b71Sopenharmony_ci 1410e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1411e41f4b71Sopenharmony_ci 1412e41f4b71Sopenharmony_ci**Parameters** 1413e41f4b71Sopenharmony_ci 1414e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1415e41f4b71Sopenharmony_ci| -------- | ------------------------------ | ---- | ---------------------------- | 1416e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 1417e41f4b71Sopenharmony_ci| callback | AsyncCallback<Array<string\>\> | Yes | Callback used to return the result. | 1418e41f4b71Sopenharmony_ci 1419e41f4b71Sopenharmony_ci**Error codes** 1420e41f4b71Sopenharmony_ci 1421e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1422e41f4b71Sopenharmony_ci 1423e41f4b71Sopenharmony_ci| ID| Error Message | 1424e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1425e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1426e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1427e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 1428e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1429e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1430e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1431e41f4b71Sopenharmony_ci 1432e41f4b71Sopenharmony_ci**Example** 1433e41f4b71Sopenharmony_ci 1434e41f4b71Sopenharmony_ci```ts 1435e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1436e41f4b71Sopenharmony_ci 1437e41f4b71Sopenharmony_cicall.getSubCallIdList(1, (err: BusinessError, data: Array<string>) => { 1438e41f4b71Sopenharmony_ci if (err) { 1439e41f4b71Sopenharmony_ci console.error(`getSubCallIdList fail, err->${JSON.stringify(err)}`); 1440e41f4b71Sopenharmony_ci } else { 1441e41f4b71Sopenharmony_ci console.log(`getSubCallIdList success, data->${JSON.stringify(data)}`); 1442e41f4b71Sopenharmony_ci } 1443e41f4b71Sopenharmony_ci}); 1444e41f4b71Sopenharmony_ci``` 1445e41f4b71Sopenharmony_ci 1446e41f4b71Sopenharmony_ci 1447e41f4b71Sopenharmony_ci## call.getSubCallIdList<sup>7+</sup> 1448e41f4b71Sopenharmony_ci 1449e41f4b71Sopenharmony_cigetSubCallIdList\(callId: number\): Promise\<Array\<string\>\> 1450e41f4b71Sopenharmony_ci 1451e41f4b71Sopenharmony_ciObtains the list of subcall IDs. This API uses a promise to return the result. 1452e41f4b71Sopenharmony_ci 1453e41f4b71Sopenharmony_ci**System API**: This is a system API. 1454e41f4b71Sopenharmony_ci 1455e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1456e41f4b71Sopenharmony_ci 1457e41f4b71Sopenharmony_ci**Parameters** 1458e41f4b71Sopenharmony_ci 1459e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 1460e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------- | 1461e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID.| 1462e41f4b71Sopenharmony_ci 1463e41f4b71Sopenharmony_ci**Return value** 1464e41f4b71Sopenharmony_ci 1465e41f4b71Sopenharmony_ci| Type | Description | 1466e41f4b71Sopenharmony_ci| ----------------------------- | ----------------------------------- | 1467e41f4b71Sopenharmony_ci| Promise<Array<string\>> | Promise used to return the result.| 1468e41f4b71Sopenharmony_ci 1469e41f4b71Sopenharmony_ci**Error codes** 1470e41f4b71Sopenharmony_ci 1471e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1472e41f4b71Sopenharmony_ci 1473e41f4b71Sopenharmony_ci| ID| Error Message | 1474e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1475e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1476e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1477e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 1478e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1479e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1480e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1481e41f4b71Sopenharmony_ci 1482e41f4b71Sopenharmony_ci**Example** 1483e41f4b71Sopenharmony_ci 1484e41f4b71Sopenharmony_ci```ts 1485e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1486e41f4b71Sopenharmony_ci 1487e41f4b71Sopenharmony_cicall.getSubCallIdList(1).then((data: Array<string>) => { 1488e41f4b71Sopenharmony_ci console.log(`getSubCallIdList success, promise: data->${JSON.stringify(data)}`); 1489e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 1490e41f4b71Sopenharmony_ci console.error(`getSubCallIdList fail, promise: err->${JSON.stringify(err)}`); 1491e41f4b71Sopenharmony_ci}); 1492e41f4b71Sopenharmony_ci``` 1493e41f4b71Sopenharmony_ci 1494e41f4b71Sopenharmony_ci## call.getCallIdListForConference<sup>7+</sup> 1495e41f4b71Sopenharmony_ci 1496e41f4b71Sopenharmony_cigetCallIdListForConference\(callId: number, callback: AsyncCallback\<Array\<string\>\>\): void 1497e41f4b71Sopenharmony_ci 1498e41f4b71Sopenharmony_ciObtains the list of call IDs in a conference. This API uses an asynchronous callback to return the result. 1499e41f4b71Sopenharmony_ci 1500e41f4b71Sopenharmony_ci**System API**: This is a system API. 1501e41f4b71Sopenharmony_ci 1502e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1503e41f4b71Sopenharmony_ci 1504e41f4b71Sopenharmony_ci**Parameters** 1505e41f4b71Sopenharmony_ci 1506e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1507e41f4b71Sopenharmony_ci| -------- | ----------------------------------- | ---- | -------------------------------- | 1508e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 1509e41f4b71Sopenharmony_ci| callback | AsyncCallback<Array<string\>> | Yes | Callback used to return the result. | 1510e41f4b71Sopenharmony_ci 1511e41f4b71Sopenharmony_ci**Error codes** 1512e41f4b71Sopenharmony_ci 1513e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1514e41f4b71Sopenharmony_ci 1515e41f4b71Sopenharmony_ci| ID| Error Message | 1516e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1517e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1518e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1519e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 1520e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1521e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1522e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1523e41f4b71Sopenharmony_ci 1524e41f4b71Sopenharmony_ci**Example** 1525e41f4b71Sopenharmony_ci 1526e41f4b71Sopenharmony_ci```ts 1527e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1528e41f4b71Sopenharmony_ci 1529e41f4b71Sopenharmony_cicall.getCallIdListForConference(1, (err: BusinessError, data: Array<string>) => { 1530e41f4b71Sopenharmony_ci if (err) { 1531e41f4b71Sopenharmony_ci console.error(`getCallIdListForConference fail, err->${JSON.stringify(err)}`); 1532e41f4b71Sopenharmony_ci } else { 1533e41f4b71Sopenharmony_ci console.log(`getCallIdListForConference success, data->${JSON.stringify(data)}`); 1534e41f4b71Sopenharmony_ci } 1535e41f4b71Sopenharmony_ci}); 1536e41f4b71Sopenharmony_ci``` 1537e41f4b71Sopenharmony_ci 1538e41f4b71Sopenharmony_ci 1539e41f4b71Sopenharmony_ci## call.getCallIdListForConference<sup>7+</sup> 1540e41f4b71Sopenharmony_ci 1541e41f4b71Sopenharmony_cigetCallIdListForConference\(callId: number\): Promise\<Array\<string\>\> 1542e41f4b71Sopenharmony_ci 1543e41f4b71Sopenharmony_ciObtains the list of call IDs in a conference. This API uses a promise to return the result. 1544e41f4b71Sopenharmony_ci 1545e41f4b71Sopenharmony_ci**System API**: This is a system API. 1546e41f4b71Sopenharmony_ci 1547e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1548e41f4b71Sopenharmony_ci 1549e41f4b71Sopenharmony_ci**Parameters** 1550e41f4b71Sopenharmony_ci 1551e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 1552e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------- | 1553e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID.| 1554e41f4b71Sopenharmony_ci 1555e41f4b71Sopenharmony_ci**Return value** 1556e41f4b71Sopenharmony_ci 1557e41f4b71Sopenharmony_ci| Type | Description | 1558e41f4b71Sopenharmony_ci| ----------------------------- | --------------------------------------- | 1559e41f4b71Sopenharmony_ci| Promise<Array<string\>> | Promise used to return the result.| 1560e41f4b71Sopenharmony_ci 1561e41f4b71Sopenharmony_ci**Error codes** 1562e41f4b71Sopenharmony_ci 1563e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1564e41f4b71Sopenharmony_ci 1565e41f4b71Sopenharmony_ci| ID| Error Message | 1566e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1567e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1568e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1569e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 1570e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1571e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1572e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1573e41f4b71Sopenharmony_ci 1574e41f4b71Sopenharmony_ci**Example** 1575e41f4b71Sopenharmony_ci 1576e41f4b71Sopenharmony_ci```ts 1577e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1578e41f4b71Sopenharmony_ci 1579e41f4b71Sopenharmony_cicall.getCallIdListForConference(1).then((data: Array<string>) => { 1580e41f4b71Sopenharmony_ci console.log(`getCallIdListForConference success, promise: data->${JSON.stringify(data)}`); 1581e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 1582e41f4b71Sopenharmony_ci console.error(`getCallIdListForConference fail, promise: err->${JSON.stringify(err)}`); 1583e41f4b71Sopenharmony_ci}); 1584e41f4b71Sopenharmony_ci``` 1585e41f4b71Sopenharmony_ci 1586e41f4b71Sopenharmony_ci## call.getCallWaitingStatus<sup>7+</sup> 1587e41f4b71Sopenharmony_ci 1588e41f4b71Sopenharmony_cigetCallWaitingStatus\(slotId: number, callback: AsyncCallback\<CallWaitingStatus\>\): void 1589e41f4b71Sopenharmony_ci 1590e41f4b71Sopenharmony_ciObtains the call waiting status. This API uses an asynchronous callback to return the result. 1591e41f4b71Sopenharmony_ci 1592e41f4b71Sopenharmony_ci**System API**: This is a system API. 1593e41f4b71Sopenharmony_ci 1594e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 1595e41f4b71Sopenharmony_ci 1596e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1597e41f4b71Sopenharmony_ci 1598e41f4b71Sopenharmony_ci**Parameters** 1599e41f4b71Sopenharmony_ci 1600e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1601e41f4b71Sopenharmony_ci| -------- | ----------------------------------------------------------- | ---- | ------------------------------------------------------------ | 1602e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2 | 1603e41f4b71Sopenharmony_ci| callback | AsyncCallback<[CallWaitingStatus](#callwaitingstatus7)\> | Yes | Callback used to return the result.<br>The value can be:<br>- **0**: Call waiting is disabled.<br>- **1**: Call waiting is enabled.| 1604e41f4b71Sopenharmony_ci 1605e41f4b71Sopenharmony_ci**Error codes** 1606e41f4b71Sopenharmony_ci 1607e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1608e41f4b71Sopenharmony_ci 1609e41f4b71Sopenharmony_ci| ID| Error Message | 1610e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1611e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1612e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1613e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1614e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 1615e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1616e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1617e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1618e41f4b71Sopenharmony_ci 1619e41f4b71Sopenharmony_ci**Example** 1620e41f4b71Sopenharmony_ci 1621e41f4b71Sopenharmony_ci```ts 1622e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1623e41f4b71Sopenharmony_ci 1624e41f4b71Sopenharmony_cicall.getCallWaitingStatus(0, (err: BusinessError, data: call.CallWaitingStatus) => { 1625e41f4b71Sopenharmony_ci if (err) { 1626e41f4b71Sopenharmony_ci console.error(`getCallWaitingStatus fail, err->${JSON.stringify(err)}`); 1627e41f4b71Sopenharmony_ci } else { 1628e41f4b71Sopenharmony_ci console.log(`getCallWaitingStatus success, data->${JSON.stringify(data)}`); 1629e41f4b71Sopenharmony_ci } 1630e41f4b71Sopenharmony_ci}); 1631e41f4b71Sopenharmony_ci``` 1632e41f4b71Sopenharmony_ci 1633e41f4b71Sopenharmony_ci 1634e41f4b71Sopenharmony_ci## call.getCallWaitingStatus<sup>7+</sup> 1635e41f4b71Sopenharmony_ci 1636e41f4b71Sopenharmony_cigetCallWaitingStatus\(slotId: number\): Promise\<CallWaitingStatus\> 1637e41f4b71Sopenharmony_ci 1638e41f4b71Sopenharmony_ciObtains the call waiting status. This API uses a promise to return the result. 1639e41f4b71Sopenharmony_ci 1640e41f4b71Sopenharmony_ci**System API**: This is a system API. 1641e41f4b71Sopenharmony_ci 1642e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 1643e41f4b71Sopenharmony_ci 1644e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1645e41f4b71Sopenharmony_ci 1646e41f4b71Sopenharmony_ci**Parameters** 1647e41f4b71Sopenharmony_ci 1648e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 1649e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------------------------- | 1650e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 1651e41f4b71Sopenharmony_ci 1652e41f4b71Sopenharmony_ci**Return value** 1653e41f4b71Sopenharmony_ci 1654e41f4b71Sopenharmony_ci| Type | Description | 1655e41f4b71Sopenharmony_ci| ------------------------------------------------------- | ------------------------------------------------------------ | 1656e41f4b71Sopenharmony_ci| Promise<[CallWaitingStatus](#callwaitingstatus7)> | Promise used to return the result.<br>- **0**: Call waiting is disabled.<br>- **1**: Call waiting is enabled.| 1657e41f4b71Sopenharmony_ci 1658e41f4b71Sopenharmony_ci**Error codes** 1659e41f4b71Sopenharmony_ci 1660e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1661e41f4b71Sopenharmony_ci 1662e41f4b71Sopenharmony_ci| ID| Error Message | 1663e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1664e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1665e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1666e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1667e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 1668e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1669e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1670e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1671e41f4b71Sopenharmony_ci 1672e41f4b71Sopenharmony_ci**Example** 1673e41f4b71Sopenharmony_ci 1674e41f4b71Sopenharmony_ci```ts 1675e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1676e41f4b71Sopenharmony_ci 1677e41f4b71Sopenharmony_cicall.getCallWaitingStatus(0).then((data: call.CallWaitingStatus) => { 1678e41f4b71Sopenharmony_ci console.log(`getCallWaitingStatus success, promise: data->${JSON.stringify(data)}`); 1679e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 1680e41f4b71Sopenharmony_ci console.error(`getCallWaitingStatus fail, promise: err->${JSON.stringify(err)}`); 1681e41f4b71Sopenharmony_ci}); 1682e41f4b71Sopenharmony_ci``` 1683e41f4b71Sopenharmony_ci 1684e41f4b71Sopenharmony_ci## call.setCallWaiting<sup>7+</sup> 1685e41f4b71Sopenharmony_ci 1686e41f4b71Sopenharmony_cisetCallWaiting\(slotId: number, activate: boolean, callback: AsyncCallback\<void\>\): void 1687e41f4b71Sopenharmony_ci 1688e41f4b71Sopenharmony_ciSpecifies whether to enable the call waiting service. This API uses an asynchronous callback to return the result. 1689e41f4b71Sopenharmony_ci 1690e41f4b71Sopenharmony_ci**System API**: This is a system API. 1691e41f4b71Sopenharmony_ci 1692e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 1693e41f4b71Sopenharmony_ci 1694e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1695e41f4b71Sopenharmony_ci 1696e41f4b71Sopenharmony_ci**Parameters** 1697e41f4b71Sopenharmony_ci 1698e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1699e41f4b71Sopenharmony_ci| -------- | -------------------- | ---- | ------------------------------------------------------------ | 1700e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2 | 1701e41f4b71Sopenharmony_ci| activate | boolean | Yes | Whether to enable call waiting.<br>- **false**: Disable call waiting.<br>- **true**: Enable call waiting.| 1702e41f4b71Sopenharmony_ci| callback | AsyncCallback<void\> | Yes | Callback used to return the result. | 1703e41f4b71Sopenharmony_ci 1704e41f4b71Sopenharmony_ci**Error codes** 1705e41f4b71Sopenharmony_ci 1706e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1707e41f4b71Sopenharmony_ci 1708e41f4b71Sopenharmony_ci| ID| Error Message | 1709e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1710e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1711e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1712e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1713e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 1714e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1715e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1716e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1717e41f4b71Sopenharmony_ci 1718e41f4b71Sopenharmony_ci**Example** 1719e41f4b71Sopenharmony_ci 1720e41f4b71Sopenharmony_ci```ts 1721e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1722e41f4b71Sopenharmony_ci 1723e41f4b71Sopenharmony_cicall.setCallWaiting(0, true, (err: BusinessError) => { 1724e41f4b71Sopenharmony_ci if (err) { 1725e41f4b71Sopenharmony_ci console.error(`setCallWaiting fail, err->${JSON.stringify(err)}`); 1726e41f4b71Sopenharmony_ci } else { 1727e41f4b71Sopenharmony_ci console.log(`setCallWaiting success.`); 1728e41f4b71Sopenharmony_ci } 1729e41f4b71Sopenharmony_ci}); 1730e41f4b71Sopenharmony_ci``` 1731e41f4b71Sopenharmony_ci 1732e41f4b71Sopenharmony_ci 1733e41f4b71Sopenharmony_ci## call.setCallWaiting<sup>7+</sup> 1734e41f4b71Sopenharmony_ci 1735e41f4b71Sopenharmony_cisetCallWaiting\(slotId: number, activate: boolean\): Promise\<void\> 1736e41f4b71Sopenharmony_ci 1737e41f4b71Sopenharmony_ciSpecifies whether to enable the call waiting service. This API uses a promise to return the result. 1738e41f4b71Sopenharmony_ci 1739e41f4b71Sopenharmony_ci**System API**: This is a system API. 1740e41f4b71Sopenharmony_ci 1741e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 1742e41f4b71Sopenharmony_ci 1743e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1744e41f4b71Sopenharmony_ci 1745e41f4b71Sopenharmony_ci**Parameters** 1746e41f4b71Sopenharmony_ci 1747e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1748e41f4b71Sopenharmony_ci| -------- | ------- | ---- | ------------------------------------------------------------ | 1749e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2 | 1750e41f4b71Sopenharmony_ci| activate | boolean | Yes | Whether to enable call waiting.<br>- **false**: Disable call waiting.<br>- **true**: Enable call waiting.| 1751e41f4b71Sopenharmony_ci 1752e41f4b71Sopenharmony_ci**Return value** 1753e41f4b71Sopenharmony_ci 1754e41f4b71Sopenharmony_ci| Type | Description | 1755e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 1756e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 1757e41f4b71Sopenharmony_ci 1758e41f4b71Sopenharmony_ci**Error codes** 1759e41f4b71Sopenharmony_ci 1760e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1761e41f4b71Sopenharmony_ci 1762e41f4b71Sopenharmony_ci| ID| Error Message | 1763e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1764e41f4b71Sopenharmony_ci| 201 | Permission denied. | 1765e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1766e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1767e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 1768e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1769e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1770e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1771e41f4b71Sopenharmony_ci 1772e41f4b71Sopenharmony_ci**Example** 1773e41f4b71Sopenharmony_ci 1774e41f4b71Sopenharmony_ci```ts 1775e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1776e41f4b71Sopenharmony_ci 1777e41f4b71Sopenharmony_cicall.setCallWaiting(0, true).then(() => { 1778e41f4b71Sopenharmony_ci console.log(`setCallWaiting success.`); 1779e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 1780e41f4b71Sopenharmony_ci console.error(`setCallWaiting fail, promise: err->${JSON.stringify(err)}`); 1781e41f4b71Sopenharmony_ci}); 1782e41f4b71Sopenharmony_ci``` 1783e41f4b71Sopenharmony_ci 1784e41f4b71Sopenharmony_ci## call.startDTMF<sup>7+</sup> 1785e41f4b71Sopenharmony_ci 1786e41f4b71Sopenharmony_cistartDTMF\(callId: number, character: string, callback: AsyncCallback\<void\>\): void 1787e41f4b71Sopenharmony_ci 1788e41f4b71Sopenharmony_ciStarts playing DTMF tones. This API uses an asynchronous callback to return the result. 1789e41f4b71Sopenharmony_ci 1790e41f4b71Sopenharmony_ci**System API**: This is a system API. 1791e41f4b71Sopenharmony_ci 1792e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1793e41f4b71Sopenharmony_ci 1794e41f4b71Sopenharmony_ci**Parameters** 1795e41f4b71Sopenharmony_ci 1796e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1797e41f4b71Sopenharmony_ci| --------- | -------------------- | ---- | ---------- | 1798e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 1799e41f4b71Sopenharmony_ci| character | string | Yes | DTMF string. | 1800e41f4b71Sopenharmony_ci| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| 1801e41f4b71Sopenharmony_ci 1802e41f4b71Sopenharmony_ci**Error codes** 1803e41f4b71Sopenharmony_ci 1804e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1805e41f4b71Sopenharmony_ci 1806e41f4b71Sopenharmony_ci| ID| Error Message | 1807e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1808e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1809e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1810e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 1811e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1812e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1813e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1814e41f4b71Sopenharmony_ci 1815e41f4b71Sopenharmony_ci**Example** 1816e41f4b71Sopenharmony_ci 1817e41f4b71Sopenharmony_ci```ts 1818e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1819e41f4b71Sopenharmony_ci 1820e41f4b71Sopenharmony_cicall.startDTMF(1, "0", (err: BusinessError) => { 1821e41f4b71Sopenharmony_ci if (err) { 1822e41f4b71Sopenharmony_ci console.error(`startDTMF fail, err->${JSON.stringify(err)}`); 1823e41f4b71Sopenharmony_ci } else { 1824e41f4b71Sopenharmony_ci console.log(`startDTMF success.`); 1825e41f4b71Sopenharmony_ci } 1826e41f4b71Sopenharmony_ci}); 1827e41f4b71Sopenharmony_ci``` 1828e41f4b71Sopenharmony_ci 1829e41f4b71Sopenharmony_ci 1830e41f4b71Sopenharmony_ci## call.startDTMF<sup>7+</sup> 1831e41f4b71Sopenharmony_ci 1832e41f4b71Sopenharmony_cistartDTMF\(callId: number, character: string\): Promise\<void\> 1833e41f4b71Sopenharmony_ci 1834e41f4b71Sopenharmony_ciStarts playing DTMF tones. This API uses a promise to return the result. 1835e41f4b71Sopenharmony_ci 1836e41f4b71Sopenharmony_ci**System API**: This is a system API. 1837e41f4b71Sopenharmony_ci 1838e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1839e41f4b71Sopenharmony_ci 1840e41f4b71Sopenharmony_ci**Parameters** 1841e41f4b71Sopenharmony_ci 1842e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1843e41f4b71Sopenharmony_ci| --------- | ------ | ---- | -------- | 1844e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID.| 1845e41f4b71Sopenharmony_ci| character | string | Yes | DTMF string.| 1846e41f4b71Sopenharmony_ci 1847e41f4b71Sopenharmony_ci**Return value** 1848e41f4b71Sopenharmony_ci 1849e41f4b71Sopenharmony_ci| Type | Description | 1850e41f4b71Sopenharmony_ci| ------------------- | ----------------------- | 1851e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 1852e41f4b71Sopenharmony_ci 1853e41f4b71Sopenharmony_ci**Error codes** 1854e41f4b71Sopenharmony_ci 1855e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1856e41f4b71Sopenharmony_ci 1857e41f4b71Sopenharmony_ci| ID| Error Message | 1858e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1859e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1860e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1861e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 1862e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1863e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1864e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1865e41f4b71Sopenharmony_ci 1866e41f4b71Sopenharmony_ci**Example** 1867e41f4b71Sopenharmony_ci 1868e41f4b71Sopenharmony_ci```ts 1869e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1870e41f4b71Sopenharmony_ci 1871e41f4b71Sopenharmony_cicall.startDTMF(1, "0").then(() => { 1872e41f4b71Sopenharmony_ci console.log(`startDTMF success.`); 1873e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 1874e41f4b71Sopenharmony_ci console.error(`startDTMF fail, promise: err->${JSON.stringify(err)}`); 1875e41f4b71Sopenharmony_ci}); 1876e41f4b71Sopenharmony_ci``` 1877e41f4b71Sopenharmony_ci 1878e41f4b71Sopenharmony_ci## call.stopDTMF<sup>7+</sup> 1879e41f4b71Sopenharmony_ci 1880e41f4b71Sopenharmony_cistopDTMF\(callId: number, callback: AsyncCallback\<void\>\): void 1881e41f4b71Sopenharmony_ci 1882e41f4b71Sopenharmony_ciStops playing DTMF tones. This API uses an asynchronous callback to return the result. 1883e41f4b71Sopenharmony_ci 1884e41f4b71Sopenharmony_ci**System API**: This is a system API. 1885e41f4b71Sopenharmony_ci 1886e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1887e41f4b71Sopenharmony_ci 1888e41f4b71Sopenharmony_ci**Parameters** 1889e41f4b71Sopenharmony_ci 1890e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1891e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ---------- | 1892e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 1893e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 1894e41f4b71Sopenharmony_ci 1895e41f4b71Sopenharmony_ci**Error codes** 1896e41f4b71Sopenharmony_ci 1897e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1898e41f4b71Sopenharmony_ci 1899e41f4b71Sopenharmony_ci| ID| Error Message | 1900e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1901e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1902e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1903e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 1904e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1905e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1906e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1907e41f4b71Sopenharmony_ci 1908e41f4b71Sopenharmony_ci**Example** 1909e41f4b71Sopenharmony_ci 1910e41f4b71Sopenharmony_ci```ts 1911e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1912e41f4b71Sopenharmony_ci 1913e41f4b71Sopenharmony_cicall.stopDTMF(1, (err: BusinessError) => { 1914e41f4b71Sopenharmony_ci if (err) { 1915e41f4b71Sopenharmony_ci console.error(`stopDTMF fail, err->${JSON.stringify(err)}`); 1916e41f4b71Sopenharmony_ci } else { 1917e41f4b71Sopenharmony_ci console.log(`stopDTMF success.`); 1918e41f4b71Sopenharmony_ci } 1919e41f4b71Sopenharmony_ci}); 1920e41f4b71Sopenharmony_ci``` 1921e41f4b71Sopenharmony_ci 1922e41f4b71Sopenharmony_ci 1923e41f4b71Sopenharmony_ci## call.stopDTMF<sup>7+</sup> 1924e41f4b71Sopenharmony_ci 1925e41f4b71Sopenharmony_cistopDTMF\(callId: number\): Promise\<void\> 1926e41f4b71Sopenharmony_ci 1927e41f4b71Sopenharmony_ciStops playing DTMF tones. This API uses a promise to return the result. 1928e41f4b71Sopenharmony_ci 1929e41f4b71Sopenharmony_ci**System API**: This is a system API. 1930e41f4b71Sopenharmony_ci 1931e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1932e41f4b71Sopenharmony_ci 1933e41f4b71Sopenharmony_ci**Parameters** 1934e41f4b71Sopenharmony_ci 1935e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 1936e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------- | 1937e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID.| 1938e41f4b71Sopenharmony_ci 1939e41f4b71Sopenharmony_ci**Return value** 1940e41f4b71Sopenharmony_ci 1941e41f4b71Sopenharmony_ci| Type | Description | 1942e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 1943e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 1944e41f4b71Sopenharmony_ci 1945e41f4b71Sopenharmony_ci**Error codes** 1946e41f4b71Sopenharmony_ci 1947e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1948e41f4b71Sopenharmony_ci 1949e41f4b71Sopenharmony_ci| ID| Error Message | 1950e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1951e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 1952e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 1953e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 1954e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 1955e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 1956e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 1957e41f4b71Sopenharmony_ci 1958e41f4b71Sopenharmony_ci**Example** 1959e41f4b71Sopenharmony_ci 1960e41f4b71Sopenharmony_ci```ts 1961e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 1962e41f4b71Sopenharmony_ci 1963e41f4b71Sopenharmony_cicall.stopDTMF(1).then(() => { 1964e41f4b71Sopenharmony_ci console.log(`stopDTMF success.`); 1965e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 1966e41f4b71Sopenharmony_ci console.error(`stopDTMF fail, promise: err->${JSON.stringify(err)}`); 1967e41f4b71Sopenharmony_ci}); 1968e41f4b71Sopenharmony_ci``` 1969e41f4b71Sopenharmony_ci 1970e41f4b71Sopenharmony_ci## call.postDialProceed<sup>11+</sup> 1971e41f4b71Sopenharmony_ci 1972e41f4b71Sopenharmony_cipostDialProceed\(callId: number, proceed: boolean, callback: AsyncCallback\<void\>\): void 1973e41f4b71Sopenharmony_ci 1974e41f4b71Sopenharmony_ciContinues a call by playing a post-dial DTMF string. This API uses an asynchronous callback to return the result. 1975e41f4b71Sopenharmony_ci 1976e41f4b71Sopenharmony_ciIf the called number is in the format of "common phone number + semicolon (;) + DTMF string", for example, **400xxxxxxx;123**, and the listening for **postDialDelay** events is enabled, 1977e41f4b71Sopenharmony_cithe system reports a **postDialDelay** event when the call is connected. The application can then call this API to send DTMF tones. 1978e41f4b71Sopenharmony_ci 1979e41f4b71Sopenharmony_ci**System API**: This is a system API. 1980e41f4b71Sopenharmony_ci 1981e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 1982e41f4b71Sopenharmony_ci 1983e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 1984e41f4b71Sopenharmony_ci 1985e41f4b71Sopenharmony_ci**Parameters** 1986e41f4b71Sopenharmony_ci 1987e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 1988e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | -------------------------------------------------------------- | 1989e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 1990e41f4b71Sopenharmony_ci| proceed | boolean | Yes | Whether to send DTMF tones.| 1991e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result. | 1992e41f4b71Sopenharmony_ci 1993e41f4b71Sopenharmony_ci**Error codes** 1994e41f4b71Sopenharmony_ci 1995e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 1996e41f4b71Sopenharmony_ci 1997e41f4b71Sopenharmony_ci| ID| Error Message | 1998e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 1999e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2000e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2001e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2002e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 2003e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2004e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2005e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2006e41f4b71Sopenharmony_ci 2007e41f4b71Sopenharmony_ci**Example** 2008e41f4b71Sopenharmony_ci 2009e41f4b71Sopenharmony_ci```ts 2010e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2011e41f4b71Sopenharmony_ci 2012e41f4b71Sopenharmony_cicall.postDialProceed(1, true, (err: BusinessError) => { 2013e41f4b71Sopenharmony_ci console.log(`callback: err->${JSON.stringify(err)}`); 2014e41f4b71Sopenharmony_ci}); 2015e41f4b71Sopenharmony_ci``` 2016e41f4b71Sopenharmony_ci 2017e41f4b71Sopenharmony_ci 2018e41f4b71Sopenharmony_ci## call.postDialProceed<sup>11+</sup> 2019e41f4b71Sopenharmony_ci 2020e41f4b71Sopenharmony_cipostDialProceed\(callId: number, proceed: boolean\): Promise\<void\> 2021e41f4b71Sopenharmony_ci 2022e41f4b71Sopenharmony_ciContinues a call by playing a post-dial DTMF string. This API uses a promise to return the result. 2023e41f4b71Sopenharmony_ci 2024e41f4b71Sopenharmony_ciIf the called number is in the format of "common phone number + semicolon (;) + DTMF string", for example, **400xxxxxxx;123**, and the listening for **postDialDelay** events is enabled, 2025e41f4b71Sopenharmony_cithe system reports a **postDialDelay** event when the call is connected. The application can then call this API to send DTMF tones. 2026e41f4b71Sopenharmony_ci 2027e41f4b71Sopenharmony_ci**System API**: This is a system API. 2028e41f4b71Sopenharmony_ci 2029e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2030e41f4b71Sopenharmony_ci 2031e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2032e41f4b71Sopenharmony_ci 2033e41f4b71Sopenharmony_ci**Parameters** 2034e41f4b71Sopenharmony_ci 2035e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2036e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ----------------------- | 2037e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 2038e41f4b71Sopenharmony_ci| proceed | boolean | Yes | Whether to send DTMF tones.| 2039e41f4b71Sopenharmony_ci 2040e41f4b71Sopenharmony_ci**Return value** 2041e41f4b71Sopenharmony_ci 2042e41f4b71Sopenharmony_ci| Type | Description | 2043e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 2044e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 2045e41f4b71Sopenharmony_ci 2046e41f4b71Sopenharmony_ci**Error codes** 2047e41f4b71Sopenharmony_ci 2048e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2049e41f4b71Sopenharmony_ci 2050e41f4b71Sopenharmony_ci| ID| Error Message | 2051e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2052e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2053e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2054e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2055e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 2056e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2057e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2058e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2059e41f4b71Sopenharmony_ci 2060e41f4b71Sopenharmony_ci**Example** 2061e41f4b71Sopenharmony_ci 2062e41f4b71Sopenharmony_ci```ts 2063e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2064e41f4b71Sopenharmony_ci 2065e41f4b71Sopenharmony_cicall.postDialProceed(1, true).then(() => { 2066e41f4b71Sopenharmony_ci console.log(`postDialProceed success.`); 2067e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 2068e41f4b71Sopenharmony_ci console.error(`postDialProceed fail, promise: err->${JSON.stringify(err)}`); 2069e41f4b71Sopenharmony_ci}); 2070e41f4b71Sopenharmony_ci``` 2071e41f4b71Sopenharmony_ci 2072e41f4b71Sopenharmony_ci## call.isInEmergencyCall<sup>7+</sup> 2073e41f4b71Sopenharmony_ci 2074e41f4b71Sopenharmony_ciisInEmergencyCall\(callback: AsyncCallback\<boolean\>\): void 2075e41f4b71Sopenharmony_ci 2076e41f4b71Sopenharmony_ciChecks whether a call is an emergency call. This API uses an asynchronous callback to return the result. 2077e41f4b71Sopenharmony_ci 2078e41f4b71Sopenharmony_ci**System API**: This is a system API. 2079e41f4b71Sopenharmony_ci 2080e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2081e41f4b71Sopenharmony_ci 2082e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2083e41f4b71Sopenharmony_ci 2084e41f4b71Sopenharmony_ci**Parameters** 2085e41f4b71Sopenharmony_ci 2086e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2087e41f4b71Sopenharmony_ci| -------- | ---------------------------- | ---- | ---------- | 2088e41f4b71Sopenharmony_ci| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. The value **true** indicates an emergency number, and the value **false** indicates a non-emergency number.| 2089e41f4b71Sopenharmony_ci 2090e41f4b71Sopenharmony_ci**Error codes** 2091e41f4b71Sopenharmony_ci 2092e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2093e41f4b71Sopenharmony_ci 2094e41f4b71Sopenharmony_ci| ID| Error Message | 2095e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2096e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2097e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2098e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2099e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2100e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2101e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2102e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 2103e41f4b71Sopenharmony_ci 2104e41f4b71Sopenharmony_ci**Example** 2105e41f4b71Sopenharmony_ci 2106e41f4b71Sopenharmony_ci```ts 2107e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2108e41f4b71Sopenharmony_ci 2109e41f4b71Sopenharmony_cicall.isInEmergencyCall((err: BusinessError, data: boolean) => { 2110e41f4b71Sopenharmony_ci if (err) { 2111e41f4b71Sopenharmony_ci console.error(`isInEmergencyCall fail, err->${JSON.stringify(err)}`); 2112e41f4b71Sopenharmony_ci } else { 2113e41f4b71Sopenharmony_ci console.log(`isInEmergencyCall success, data->${JSON.stringify(data)}`); 2114e41f4b71Sopenharmony_ci } 2115e41f4b71Sopenharmony_ci}); 2116e41f4b71Sopenharmony_ci``` 2117e41f4b71Sopenharmony_ci 2118e41f4b71Sopenharmony_ci 2119e41f4b71Sopenharmony_ci## call.isInEmergencyCall<sup>7+</sup> 2120e41f4b71Sopenharmony_ci 2121e41f4b71Sopenharmony_ciisInEmergencyCall\(\): Promise\<boolean\> 2122e41f4b71Sopenharmony_ci 2123e41f4b71Sopenharmony_ciChecks whether a call is an emergency call. This API uses a promise to return the result. 2124e41f4b71Sopenharmony_ci 2125e41f4b71Sopenharmony_ci**System API**: This is a system API. 2126e41f4b71Sopenharmony_ci 2127e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2128e41f4b71Sopenharmony_ci 2129e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2130e41f4b71Sopenharmony_ci 2131e41f4b71Sopenharmony_ci**Return value** 2132e41f4b71Sopenharmony_ci 2133e41f4b71Sopenharmony_ci| Type | Description | 2134e41f4b71Sopenharmony_ci| ---------------------- | --------------------------- | 2135e41f4b71Sopenharmony_ci| Promise<boolean> | Promise used to return the result. The value **true** indicates an emergency number, and the value **false** indicates a non-emergency number.| 2136e41f4b71Sopenharmony_ci 2137e41f4b71Sopenharmony_ci**Error codes** 2138e41f4b71Sopenharmony_ci 2139e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2140e41f4b71Sopenharmony_ci 2141e41f4b71Sopenharmony_ci| ID| Error Message | 2142e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2143e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2144e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2145e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2146e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2147e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 2148e41f4b71Sopenharmony_ci 2149e41f4b71Sopenharmony_ci**Example** 2150e41f4b71Sopenharmony_ci 2151e41f4b71Sopenharmony_ci```ts 2152e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2153e41f4b71Sopenharmony_ci 2154e41f4b71Sopenharmony_cicall.isInEmergencyCall().then((data: boolean) => { 2155e41f4b71Sopenharmony_ci console.log(`isInEmergencyCall success, promise: data->${JSON.stringify(data)}`); 2156e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 2157e41f4b71Sopenharmony_ci console.error(`isInEmergencyCall fail, promise: err->${JSON.stringify(err)}`); 2158e41f4b71Sopenharmony_ci}); 2159e41f4b71Sopenharmony_ci``` 2160e41f4b71Sopenharmony_ci 2161e41f4b71Sopenharmony_ci## call.on('callDetailsChange')<sup>7+</sup> 2162e41f4b71Sopenharmony_ci 2163e41f4b71Sopenharmony_cion\(type: 'callDetailsChange', callback: Callback\<CallAttributeOptions\>\): void 2164e41f4b71Sopenharmony_ci 2165e41f4b71Sopenharmony_ciSubscribes to **callDetailsChange** events. This API uses an asynchronous callback to return the result. 2166e41f4b71Sopenharmony_ci 2167e41f4b71Sopenharmony_ci**System API**: This is a system API. 2168e41f4b71Sopenharmony_ci 2169e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2170e41f4b71Sopenharmony_ci 2171e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2172e41f4b71Sopenharmony_ci 2173e41f4b71Sopenharmony_ci**Parameters** 2174e41f4b71Sopenharmony_ci 2175e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2176e41f4b71Sopenharmony_ci| -------- | ------------------------------------------------------- | ---- | -------------------------- | 2177e41f4b71Sopenharmony_ci| type | string | Yes | Call event change. This field has a fixed value of **callDetailsChange**.| 2178e41f4b71Sopenharmony_ci| callback | Callback<[CallAttributeOptions](#callattributeoptions7)> | Yes | Callback used to return the result. | 2179e41f4b71Sopenharmony_ci 2180e41f4b71Sopenharmony_ci**Error codes** 2181e41f4b71Sopenharmony_ci 2182e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2183e41f4b71Sopenharmony_ci 2184e41f4b71Sopenharmony_ci| ID| Error Message | 2185e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2186e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2187e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2188e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2189e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2190e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2191e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2192e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 2193e41f4b71Sopenharmony_ci 2194e41f4b71Sopenharmony_ci**Example** 2195e41f4b71Sopenharmony_ci 2196e41f4b71Sopenharmony_ci```ts 2197e41f4b71Sopenharmony_cicall.on('callDetailsChange', (data: call.CallAttributeOptions) => { 2198e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 2199e41f4b71Sopenharmony_ci}); 2200e41f4b71Sopenharmony_ci``` 2201e41f4b71Sopenharmony_ci 2202e41f4b71Sopenharmony_ci## call.on('callEventChange')<sup>8+</sup> 2203e41f4b71Sopenharmony_ci 2204e41f4b71Sopenharmony_cion\(type: 'callEventChange', callback: Callback\<CallEventOptions\>\): void 2205e41f4b71Sopenharmony_ci 2206e41f4b71Sopenharmony_ciSubscribes to **callEventChange** events. This API uses an asynchronous callback to return the result. 2207e41f4b71Sopenharmony_ci 2208e41f4b71Sopenharmony_ci**System API**: This is a system API. 2209e41f4b71Sopenharmony_ci 2210e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2211e41f4b71Sopenharmony_ci 2212e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2213e41f4b71Sopenharmony_ci 2214e41f4b71Sopenharmony_ci**Parameters** 2215e41f4b71Sopenharmony_ci 2216e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2217e41f4b71Sopenharmony_ci| -------- | ------------------------------------------------ | ---- | -------------------------- | 2218e41f4b71Sopenharmony_ci| type | string | Yes | Call event change. This field has a fixed value of **callEventChange**.| 2219e41f4b71Sopenharmony_ci| callback | Callback<[CallEventOptions](#calleventoptions8)> | Yes | Callback used to return the result. | 2220e41f4b71Sopenharmony_ci 2221e41f4b71Sopenharmony_ci**Error codes** 2222e41f4b71Sopenharmony_ci 2223e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2224e41f4b71Sopenharmony_ci 2225e41f4b71Sopenharmony_ci| ID| Error Message | 2226e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2227e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2228e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2229e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2230e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2231e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2232e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2233e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 2234e41f4b71Sopenharmony_ci 2235e41f4b71Sopenharmony_ci**Example** 2236e41f4b71Sopenharmony_ci 2237e41f4b71Sopenharmony_ci```ts 2238e41f4b71Sopenharmony_cicall.on('callEventChange', (data: call.CallEventOptions) => { 2239e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 2240e41f4b71Sopenharmony_ci}); 2241e41f4b71Sopenharmony_ci``` 2242e41f4b71Sopenharmony_ci 2243e41f4b71Sopenharmony_ci## call.on('callDisconnectedCause')<sup>8+</sup> 2244e41f4b71Sopenharmony_ci 2245e41f4b71Sopenharmony_cion\(type: 'callDisconnectedCause', callback: Callback\<DisconnectedDetails\>\): void 2246e41f4b71Sopenharmony_ci 2247e41f4b71Sopenharmony_ciSubscribes to **callDisconnectedCause** events. This API uses an asynchronous callback to return the result. 2248e41f4b71Sopenharmony_ci 2249e41f4b71Sopenharmony_ci**System API**: This is a system API. 2250e41f4b71Sopenharmony_ci 2251e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2252e41f4b71Sopenharmony_ci 2253e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2254e41f4b71Sopenharmony_ci 2255e41f4b71Sopenharmony_ci**Parameters** 2256e41f4b71Sopenharmony_ci 2257e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2258e41f4b71Sopenharmony_ci| -------- | ------------------------------------------------------ | ---- | -------------------------- | 2259e41f4b71Sopenharmony_ci| type | string | Yes | Call disconnection cause. This field has a fixed value of **callDisconnectedCause**.| 2260e41f4b71Sopenharmony_ci| callback | Callback<[DisconnectedDetails](#disconnecteddetails9)> | Yes | Callback used to return the result. | 2261e41f4b71Sopenharmony_ci 2262e41f4b71Sopenharmony_ci**Error codes** 2263e41f4b71Sopenharmony_ci 2264e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2265e41f4b71Sopenharmony_ci 2266e41f4b71Sopenharmony_ci| ID| Error Message | 2267e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2268e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2269e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2270e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2271e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2272e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2273e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2274e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 2275e41f4b71Sopenharmony_ci 2276e41f4b71Sopenharmony_ci**Example** 2277e41f4b71Sopenharmony_ci 2278e41f4b71Sopenharmony_ci```ts 2279e41f4b71Sopenharmony_cicall.on('callDisconnectedCause', (data: call.DisconnectedDetails) => { 2280e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 2281e41f4b71Sopenharmony_ci}); 2282e41f4b71Sopenharmony_ci``` 2283e41f4b71Sopenharmony_ci 2284e41f4b71Sopenharmony_ci## call.on('mmiCodeResult')<sup>9+</sup> 2285e41f4b71Sopenharmony_ci 2286e41f4b71Sopenharmony_cion\(type: 'mmiCodeResult', callback: Callback\<MmiCodeResults\>\): void 2287e41f4b71Sopenharmony_ci 2288e41f4b71Sopenharmony_ciSubscribes to **mmiCodeResult** events. This API uses an asynchronous callback to return the result. 2289e41f4b71Sopenharmony_ci 2290e41f4b71Sopenharmony_ci**System API**: This is a system API. 2291e41f4b71Sopenharmony_ci 2292e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2293e41f4b71Sopenharmony_ci 2294e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2295e41f4b71Sopenharmony_ci 2296e41f4b71Sopenharmony_ci**Parameters** 2297e41f4b71Sopenharmony_ci 2298e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2299e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | ---- | --------------------- | 2300e41f4b71Sopenharmony_ci| type | string | Yes | MMI code result. This field has a fixed value of **mmiCodeResult**.| 2301e41f4b71Sopenharmony_ci| callback | Callback<[MmiCodeResults](#mmicoderesults9)> | Yes | Callback used to return the result.| 2302e41f4b71Sopenharmony_ci 2303e41f4b71Sopenharmony_ci**Error codes** 2304e41f4b71Sopenharmony_ci 2305e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2306e41f4b71Sopenharmony_ci 2307e41f4b71Sopenharmony_ci| ID| Error Message | 2308e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2309e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2310e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2311e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2312e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2313e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2314e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2315e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 2316e41f4b71Sopenharmony_ci 2317e41f4b71Sopenharmony_ci**Example** 2318e41f4b71Sopenharmony_ci 2319e41f4b71Sopenharmony_ci```ts 2320e41f4b71Sopenharmony_cicall.on('mmiCodeResult', (data: call.MmiCodeResults) => { 2321e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 2322e41f4b71Sopenharmony_ci}); 2323e41f4b71Sopenharmony_ci``` 2324e41f4b71Sopenharmony_ci 2325e41f4b71Sopenharmony_ci## call.off('callDetailsChange')<sup>7+</sup> 2326e41f4b71Sopenharmony_ci 2327e41f4b71Sopenharmony_cioff\(type: 'callDetailsChange', callback?: Callback\<CallAttributeOptions\>\): void 2328e41f4b71Sopenharmony_ci 2329e41f4b71Sopenharmony_ciUnsubscribes from **callDetailsChange** events. This API uses an asynchronous callback to return the result. 2330e41f4b71Sopenharmony_ci 2331e41f4b71Sopenharmony_ci**System API**: This is a system API. 2332e41f4b71Sopenharmony_ci 2333e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2334e41f4b71Sopenharmony_ci 2335e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2336e41f4b71Sopenharmony_ci 2337e41f4b71Sopenharmony_ci**Parameters** 2338e41f4b71Sopenharmony_ci 2339e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2340e41f4b71Sopenharmony_ci| -------- | -------------------------------------------------------- | ---- | ---------------------------------- | 2341e41f4b71Sopenharmony_ci| type | string | Yes | Call details change. This field has a fixed value of **callDetailsChange**.| 2342e41f4b71Sopenharmony_ci| callback | Callback<[CallAttributeOptions](#callattributeoptions7)> | No | Callback used to return the result. If this field is not set, no subscription cancellation result will be received.| 2343e41f4b71Sopenharmony_ci 2344e41f4b71Sopenharmony_ci**Error codes** 2345e41f4b71Sopenharmony_ci 2346e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2347e41f4b71Sopenharmony_ci 2348e41f4b71Sopenharmony_ci| ID| Error Message | 2349e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2350e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2351e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2352e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2353e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2354e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2355e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2356e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 2357e41f4b71Sopenharmony_ci 2358e41f4b71Sopenharmony_ci**Example** 2359e41f4b71Sopenharmony_ci 2360e41f4b71Sopenharmony_ci```ts 2361e41f4b71Sopenharmony_cicall.off('callDetailsChange', (data: call.CallAttributeOptions) => { 2362e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 2363e41f4b71Sopenharmony_ci}); 2364e41f4b71Sopenharmony_ci``` 2365e41f4b71Sopenharmony_ci 2366e41f4b71Sopenharmony_ci## call.off('callEventChange')<sup>8+</sup> 2367e41f4b71Sopenharmony_ci 2368e41f4b71Sopenharmony_cioff\(type: 'callEventChange', callback?: Callback\<CallEventOptions\>\): void 2369e41f4b71Sopenharmony_ci 2370e41f4b71Sopenharmony_ciUnsubscribes from **callEventChange** events. This API uses an asynchronous callback to return the result. 2371e41f4b71Sopenharmony_ci 2372e41f4b71Sopenharmony_ci**System API**: This is a system API. 2373e41f4b71Sopenharmony_ci 2374e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2375e41f4b71Sopenharmony_ci 2376e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2377e41f4b71Sopenharmony_ci 2378e41f4b71Sopenharmony_ci**Parameters** 2379e41f4b71Sopenharmony_ci 2380e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2381e41f4b71Sopenharmony_ci| -------- | ------------------------------------------------ | ---- | ---------------------------------- | 2382e41f4b71Sopenharmony_ci| type | string | Yes | Call event change. This field has a fixed value of **callEventChange**.| 2383e41f4b71Sopenharmony_ci| callback | Callback<[CallEventOptions](#calleventoptions8)> | No | Callback used to return the result. If this field is not set, no subscription cancellation result will be received.| 2384e41f4b71Sopenharmony_ci 2385e41f4b71Sopenharmony_ci**Error codes** 2386e41f4b71Sopenharmony_ci 2387e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2388e41f4b71Sopenharmony_ci 2389e41f4b71Sopenharmony_ci| ID| Error Message | 2390e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2391e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2392e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2393e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2394e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2395e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2396e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2397e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 2398e41f4b71Sopenharmony_ci 2399e41f4b71Sopenharmony_ci**Example** 2400e41f4b71Sopenharmony_ci 2401e41f4b71Sopenharmony_ci```ts 2402e41f4b71Sopenharmony_cicall.off('callEventChange', (data: call.CallEventOptions) => { 2403e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 2404e41f4b71Sopenharmony_ci}); 2405e41f4b71Sopenharmony_ci``` 2406e41f4b71Sopenharmony_ci 2407e41f4b71Sopenharmony_ci## call.off('callDisconnectedCause')<sup>8+</sup> 2408e41f4b71Sopenharmony_ci 2409e41f4b71Sopenharmony_cioff\(type: 'callDisconnectedCause', callback?: Callback\<DisconnectedDetails\>\): void 2410e41f4b71Sopenharmony_ci 2411e41f4b71Sopenharmony_ciUnsubscribes from **callDisconnectedCause** events. This API uses an asynchronous callback to return the result. 2412e41f4b71Sopenharmony_ci 2413e41f4b71Sopenharmony_ci**System API**: This is a system API. 2414e41f4b71Sopenharmony_ci 2415e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2416e41f4b71Sopenharmony_ci 2417e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2418e41f4b71Sopenharmony_ci 2419e41f4b71Sopenharmony_ci**Parameters** 2420e41f4b71Sopenharmony_ci 2421e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2422e41f4b71Sopenharmony_ci| -------- | ---------------------------------------------------------- | ---- | ------------------- | 2423e41f4b71Sopenharmony_ci| type | string | Yes | Call disconnection cause. This field has a fixed value of **callDisconnectedCause**.| 2424e41f4b71Sopenharmony_ci| callback | Callback<[DisconnectedDetails](#disconnecteddetails9)> | No | Callback used to return the result. If this field is not set, no subscription cancellation result will be received.| 2425e41f4b71Sopenharmony_ci 2426e41f4b71Sopenharmony_ci**Error codes** 2427e41f4b71Sopenharmony_ci 2428e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2429e41f4b71Sopenharmony_ci 2430e41f4b71Sopenharmony_ci| ID| Error Message | 2431e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2432e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2433e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2434e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2435e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2436e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2437e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2438e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 2439e41f4b71Sopenharmony_ci 2440e41f4b71Sopenharmony_ci**Example** 2441e41f4b71Sopenharmony_ci 2442e41f4b71Sopenharmony_ci```ts 2443e41f4b71Sopenharmony_cicall.off('callDisconnectedCause', (data: call.DisconnectedDetails) => { 2444e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 2445e41f4b71Sopenharmony_ci}); 2446e41f4b71Sopenharmony_ci``` 2447e41f4b71Sopenharmony_ci 2448e41f4b71Sopenharmony_ci## call.off('mmiCodeResult')<sup>9+</sup> 2449e41f4b71Sopenharmony_ci 2450e41f4b71Sopenharmony_cioff\(type: 'mmiCodeResult', callback?: Callback\<MmiCodeResults\>\): void 2451e41f4b71Sopenharmony_ci 2452e41f4b71Sopenharmony_ciUnsubscribes from **mmiCodeResult** events. This API uses an asynchronous callback to return the result. 2453e41f4b71Sopenharmony_ci 2454e41f4b71Sopenharmony_ci**System API**: This is a system API. 2455e41f4b71Sopenharmony_ci 2456e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2457e41f4b71Sopenharmony_ci 2458e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2459e41f4b71Sopenharmony_ci 2460e41f4b71Sopenharmony_ci**Parameters** 2461e41f4b71Sopenharmony_ci 2462e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2463e41f4b71Sopenharmony_ci| -------- | ------------------------------------------------ | ---- | ----------- | 2464e41f4b71Sopenharmony_ci| type | string | Yes | MMI code result. This field has a fixed value of **mmiCodeResult**.| 2465e41f4b71Sopenharmony_ci| callback | Callback<[MmiCodeResults](#mmicoderesults9)> | No | Callback used to return the result. If this field is not set, no subscription cancellation result will be received.| 2466e41f4b71Sopenharmony_ci 2467e41f4b71Sopenharmony_ci**Error codes** 2468e41f4b71Sopenharmony_ci 2469e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2470e41f4b71Sopenharmony_ci 2471e41f4b71Sopenharmony_ci| ID| Error Message | 2472e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2473e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2474e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2475e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2476e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2477e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2478e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2479e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 2480e41f4b71Sopenharmony_ci 2481e41f4b71Sopenharmony_ci**Example** 2482e41f4b71Sopenharmony_ci 2483e41f4b71Sopenharmony_ci```ts 2484e41f4b71Sopenharmony_cicall.off('mmiCodeResult', (data: call.MmiCodeResults) => { 2485e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 2486e41f4b71Sopenharmony_ci}); 2487e41f4b71Sopenharmony_ci``` 2488e41f4b71Sopenharmony_ci 2489e41f4b71Sopenharmony_ci 2490e41f4b71Sopenharmony_ci## call.on('audioDeviceChange')<sup>10+</sup> 2491e41f4b71Sopenharmony_ci 2492e41f4b71Sopenharmony_cion\(type: 'audioDeviceChange', callback: Callback\<AudioDeviceCallbackInfo\>\): void 2493e41f4b71Sopenharmony_ci 2494e41f4b71Sopenharmony_ciSubscribes to audio device change events. This API uses an asynchronous callback to return the result. 2495e41f4b71Sopenharmony_ci 2496e41f4b71Sopenharmony_ci**System API**: This is a system API. 2497e41f4b71Sopenharmony_ci 2498e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2499e41f4b71Sopenharmony_ci 2500e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2501e41f4b71Sopenharmony_ci 2502e41f4b71Sopenharmony_ci**Parameters** 2503e41f4b71Sopenharmony_ci 2504e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2505e41f4b71Sopenharmony_ci| -------- | ----------------------------------------------- | ---- | --------------------------------------------------- | 2506e41f4b71Sopenharmony_ci| type | string | Yes | Audio device change. This field has a fixed value of **audioDeviceChange**.| 2507e41f4b71Sopenharmony_ci| callback | Callback<[AudioDeviceCallbackInfo](#audiodevicecallbackinfo10)> | Yes | Callback used to return the result. | 2508e41f4b71Sopenharmony_ci 2509e41f4b71Sopenharmony_ci**Error codes** 2510e41f4b71Sopenharmony_ci 2511e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2512e41f4b71Sopenharmony_ci 2513e41f4b71Sopenharmony_ci| ID| Error Message | 2514e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2515e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2516e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2517e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2518e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2519e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2520e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2521e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 2522e41f4b71Sopenharmony_ci 2523e41f4b71Sopenharmony_ci**Example** 2524e41f4b71Sopenharmony_ci 2525e41f4b71Sopenharmony_ci```ts 2526e41f4b71Sopenharmony_cicall.on('audioDeviceChange', (data: call.AudioDeviceCallbackInfo) => { 2527e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 2528e41f4b71Sopenharmony_ci}); 2529e41f4b71Sopenharmony_ci``` 2530e41f4b71Sopenharmony_ci 2531e41f4b71Sopenharmony_ci 2532e41f4b71Sopenharmony_ci## call.off('audioDeviceChange')<sup>10+</sup> 2533e41f4b71Sopenharmony_ci 2534e41f4b71Sopenharmony_cioff\(type: 'audioDeviceChange', callback?: Callback\<AudioDeviceCallbackInfo\>\): void 2535e41f4b71Sopenharmony_ci 2536e41f4b71Sopenharmony_ciUnsubscribes from **audioDeviceChange** events. This API uses an asynchronous callback to return the result. 2537e41f4b71Sopenharmony_ci 2538e41f4b71Sopenharmony_ci**System API**: This is a system API. 2539e41f4b71Sopenharmony_ci 2540e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2541e41f4b71Sopenharmony_ci 2542e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2543e41f4b71Sopenharmony_ci 2544e41f4b71Sopenharmony_ci**Parameters** 2545e41f4b71Sopenharmony_ci 2546e41f4b71Sopenharmony_ci| Name | Type | Mandatory | Description | 2547e41f4b71Sopenharmony_ci| -------- | ---------------------------------------------------------- | ---- | --------------------------------------------------- | 2548e41f4b71Sopenharmony_ci| type | string | Yes | Audio device change. This field has a fixed value of **audioDeviceChange**.| 2549e41f4b71Sopenharmony_ci| callback | Callback<[AudioDeviceCallbackInfo](#audiodevicecallbackinfo10)> | No | Callback used to return the result. If this field is not set, no subscription cancellation result will be received. | 2550e41f4b71Sopenharmony_ci 2551e41f4b71Sopenharmony_ci**Error codes** 2552e41f4b71Sopenharmony_ci 2553e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2554e41f4b71Sopenharmony_ci 2555e41f4b71Sopenharmony_ci| ID| Error Message | 2556e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2557e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2558e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2559e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2560e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2561e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2562e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2563e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 2564e41f4b71Sopenharmony_ci 2565e41f4b71Sopenharmony_ci**Example** 2566e41f4b71Sopenharmony_ci 2567e41f4b71Sopenharmony_ci```ts 2568e41f4b71Sopenharmony_cicall.off('audioDeviceChange', (data: call.AudioDeviceCallbackInfo) => { 2569e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 2570e41f4b71Sopenharmony_ci}); 2571e41f4b71Sopenharmony_ci``` 2572e41f4b71Sopenharmony_ci 2573e41f4b71Sopenharmony_ci## call.on('postDialDelay')<sup>11+</sup> 2574e41f4b71Sopenharmony_ci 2575e41f4b71Sopenharmony_cion\(type: 'postDialDelay', callback: Callback\<string\>\): void 2576e41f4b71Sopenharmony_ci 2577e41f4b71Sopenharmony_ciSubscribes to **postDialDelay** events. This API uses an asynchronous callback to return the result. 2578e41f4b71Sopenharmony_ci 2579e41f4b71Sopenharmony_ci**System API**: This is a system API. 2580e41f4b71Sopenharmony_ci 2581e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2582e41f4b71Sopenharmony_ci 2583e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2584e41f4b71Sopenharmony_ci 2585e41f4b71Sopenharmony_ci**Parameters** 2586e41f4b71Sopenharmony_ci 2587e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2588e41f4b71Sopenharmony_ci| -------- | ----------------------------------------------- | ---- | --------------------------------------------------- | 2589e41f4b71Sopenharmony_ci| type | string | Yes | Post-dial delay. This field has a fixed value of **postDialDelay**. | 2590e41f4b71Sopenharmony_ci| callback | Callback<string> | Yes |Callback used to return the result. | 2591e41f4b71Sopenharmony_ci 2592e41f4b71Sopenharmony_ci**Error codes** 2593e41f4b71Sopenharmony_ci 2594e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2595e41f4b71Sopenharmony_ci 2596e41f4b71Sopenharmony_ci| ID| Error Message | 2597e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2598e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2599e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2600e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2601e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2602e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2603e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2604e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 2605e41f4b71Sopenharmony_ci 2606e41f4b71Sopenharmony_ci**Example** 2607e41f4b71Sopenharmony_ci 2608e41f4b71Sopenharmony_ci```ts 2609e41f4b71Sopenharmony_cicall.on('postDialDelay', (data: string) => { 2610e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 2611e41f4b71Sopenharmony_ci}); 2612e41f4b71Sopenharmony_ci``` 2613e41f4b71Sopenharmony_ci 2614e41f4b71Sopenharmony_ci## call.off('postDialDelay')<sup>11+</sup> 2615e41f4b71Sopenharmony_ci 2616e41f4b71Sopenharmony_cioff\(type: 'postDialDelay', callback?: Callback\<string\>\): void 2617e41f4b71Sopenharmony_ci 2618e41f4b71Sopenharmony_ciUnsubscribes from **postDialDelay** events. This API uses an asynchronous callback to return the result. 2619e41f4b71Sopenharmony_ci 2620e41f4b71Sopenharmony_ci**System API**: This is a system API. 2621e41f4b71Sopenharmony_ci 2622e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2623e41f4b71Sopenharmony_ci 2624e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2625e41f4b71Sopenharmony_ci 2626e41f4b71Sopenharmony_ci**Parameters** 2627e41f4b71Sopenharmony_ci 2628e41f4b71Sopenharmony_ci| Name | Type | Mandatory | Description | 2629e41f4b71Sopenharmony_ci| -------- | ---------------------------------------------------------- | ---- | --------------------------------------------------- | 2630e41f4b71Sopenharmony_ci| type | string | Yes | Post-dial delay. This field has a fixed value of **postDialDelay**. | 2631e41f4b71Sopenharmony_ci| callback | Callback<string> | No | Callback used to return the result. If this field is not set, no subscription cancellation result will be received. | 2632e41f4b71Sopenharmony_ci 2633e41f4b71Sopenharmony_ci**Error codes** 2634e41f4b71Sopenharmony_ci 2635e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2636e41f4b71Sopenharmony_ci 2637e41f4b71Sopenharmony_ci| ID| Error Message | 2638e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2639e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2640e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2641e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2642e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2643e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2644e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2645e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 2646e41f4b71Sopenharmony_ci 2647e41f4b71Sopenharmony_ci**Example** 2648e41f4b71Sopenharmony_ci 2649e41f4b71Sopenharmony_ci```ts 2650e41f4b71Sopenharmony_cicall.off('postDialDelay', (data: string) => { 2651e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 2652e41f4b71Sopenharmony_ci}); 2653e41f4b71Sopenharmony_ci``` 2654e41f4b71Sopenharmony_ci 2655e41f4b71Sopenharmony_ci## call.isNewCallAllowed<sup>8+</sup> 2656e41f4b71Sopenharmony_ci 2657e41f4b71Sopenharmony_ciisNewCallAllowed\(callback: AsyncCallback\<boolean\>\): void 2658e41f4b71Sopenharmony_ci 2659e41f4b71Sopenharmony_ciChecks whether a new call is allowed. This API uses an asynchronous callback to return the result. 2660e41f4b71Sopenharmony_ci 2661e41f4b71Sopenharmony_ci**System API**: This is a system API. 2662e41f4b71Sopenharmony_ci 2663e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2664e41f4b71Sopenharmony_ci 2665e41f4b71Sopenharmony_ci**Parameters** 2666e41f4b71Sopenharmony_ci 2667e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2668e41f4b71Sopenharmony_ci| -------- | ---------------------------- | ---- | ---------- | 2669e41f4b71Sopenharmony_ci| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. The value **true** indicates that the call is allowed, and the value **false** indicates the opposite.| 2670e41f4b71Sopenharmony_ci 2671e41f4b71Sopenharmony_ci**Error codes** 2672e41f4b71Sopenharmony_ci 2673e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2674e41f4b71Sopenharmony_ci 2675e41f4b71Sopenharmony_ci| ID| Error Message | 2676e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2677e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2678e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2679e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2680e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2681e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2682e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 2683e41f4b71Sopenharmony_ci 2684e41f4b71Sopenharmony_ci**Example** 2685e41f4b71Sopenharmony_ci 2686e41f4b71Sopenharmony_ci```ts 2687e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2688e41f4b71Sopenharmony_ci 2689e41f4b71Sopenharmony_cicall.isNewCallAllowed((err: BusinessError, data: boolean) => { 2690e41f4b71Sopenharmony_ci if (err) { 2691e41f4b71Sopenharmony_ci console.error(`isNewCallAllowed fail, err->${JSON.stringify(err)}`); 2692e41f4b71Sopenharmony_ci } else { 2693e41f4b71Sopenharmony_ci console.log(`isNewCallAllowed success, data->${JSON.stringify(data)}`); 2694e41f4b71Sopenharmony_ci } 2695e41f4b71Sopenharmony_ci}); 2696e41f4b71Sopenharmony_ci``` 2697e41f4b71Sopenharmony_ci 2698e41f4b71Sopenharmony_ci 2699e41f4b71Sopenharmony_ci## call.isNewCallAllowed<sup>8+</sup> 2700e41f4b71Sopenharmony_ci 2701e41f4b71Sopenharmony_ciisNewCallAllowed\(\): Promise\<boolean\> 2702e41f4b71Sopenharmony_ci 2703e41f4b71Sopenharmony_ciChecks whether a new call is allowed. This API uses a promise to return the result. 2704e41f4b71Sopenharmony_ci 2705e41f4b71Sopenharmony_ci**System API**: This is a system API. 2706e41f4b71Sopenharmony_ci 2707e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2708e41f4b71Sopenharmony_ci 2709e41f4b71Sopenharmony_ci**Return value** 2710e41f4b71Sopenharmony_ci 2711e41f4b71Sopenharmony_ci| Type | Description | 2712e41f4b71Sopenharmony_ci| ---------------------- | --------------------------- | 2713e41f4b71Sopenharmony_ci| Promise<boolean> | Promise used to return the result. The value **true** indicates that the call is allowed, and the value **false** indicates the opposite.| 2714e41f4b71Sopenharmony_ci 2715e41f4b71Sopenharmony_ci**Error codes** 2716e41f4b71Sopenharmony_ci 2717e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2718e41f4b71Sopenharmony_ci 2719e41f4b71Sopenharmony_ci| ID| Error Message | 2720e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2721e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2722e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2723e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2724e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 2725e41f4b71Sopenharmony_ci 2726e41f4b71Sopenharmony_ci**Example** 2727e41f4b71Sopenharmony_ci 2728e41f4b71Sopenharmony_ci```ts 2729e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2730e41f4b71Sopenharmony_ci 2731e41f4b71Sopenharmony_cicall.isNewCallAllowed().then((data: boolean) => { 2732e41f4b71Sopenharmony_ci console.log(`isNewCallAllowed success, promise: data->${JSON.stringify(data)}`); 2733e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 2734e41f4b71Sopenharmony_ci console.error(`isNewCallAllowed fail, promise: err->${JSON.stringify(err)}`); 2735e41f4b71Sopenharmony_ci}); 2736e41f4b71Sopenharmony_ci``` 2737e41f4b71Sopenharmony_ci 2738e41f4b71Sopenharmony_ci## call.separateConference<sup>11+</sup> 2739e41f4b71Sopenharmony_ci 2740e41f4b71Sopenharmony_ciseparateConference\(callId: number, callback: AsyncCallback\<void\>\): void 2741e41f4b71Sopenharmony_ci 2742e41f4b71Sopenharmony_ciSeparates calls from a conference call. This API uses an asynchronous callback to return the result. 2743e41f4b71Sopenharmony_ci 2744e41f4b71Sopenharmony_ci**System API**: This is a system API. 2745e41f4b71Sopenharmony_ci 2746e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2747e41f4b71Sopenharmony_ci 2748e41f4b71Sopenharmony_ci**Parameters** 2749e41f4b71Sopenharmony_ci 2750e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2751e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ---------- | 2752e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 2753e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 2754e41f4b71Sopenharmony_ci 2755e41f4b71Sopenharmony_ci**Error codes** 2756e41f4b71Sopenharmony_ci 2757e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2758e41f4b71Sopenharmony_ci 2759e41f4b71Sopenharmony_ci| ID| Error Message | 2760e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2761e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2762e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2763e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2764e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2765e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2766e41f4b71Sopenharmony_ci| 8300008 | Conference call is not active. | 2767e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 2768e41f4b71Sopenharmony_ci 2769e41f4b71Sopenharmony_ci**Example** 2770e41f4b71Sopenharmony_ci 2771e41f4b71Sopenharmony_ci```ts 2772e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2773e41f4b71Sopenharmony_ci 2774e41f4b71Sopenharmony_cicall.separateConference(1, (err: BusinessError) => { 2775e41f4b71Sopenharmony_ci if (err) { 2776e41f4b71Sopenharmony_ci console.error(`separateConference fail, err->${JSON.stringify(err)}`); 2777e41f4b71Sopenharmony_ci } else { 2778e41f4b71Sopenharmony_ci console.log(`separateConference success.`); 2779e41f4b71Sopenharmony_ci } 2780e41f4b71Sopenharmony_ci}); 2781e41f4b71Sopenharmony_ci``` 2782e41f4b71Sopenharmony_ci 2783e41f4b71Sopenharmony_ci 2784e41f4b71Sopenharmony_ci## call.separateConference<sup>11+</sup> 2785e41f4b71Sopenharmony_ci 2786e41f4b71Sopenharmony_ciseparateConference\(callId: number\): Promise\<void\> 2787e41f4b71Sopenharmony_ci 2788e41f4b71Sopenharmony_ciSeparates calls from a conference call. This API uses a promise to return the result. 2789e41f4b71Sopenharmony_ci 2790e41f4b71Sopenharmony_ci**System API**: This is a system API. 2791e41f4b71Sopenharmony_ci 2792e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2793e41f4b71Sopenharmony_ci 2794e41f4b71Sopenharmony_ci**Parameters** 2795e41f4b71Sopenharmony_ci 2796e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 2797e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------- | 2798e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID.| 2799e41f4b71Sopenharmony_ci 2800e41f4b71Sopenharmony_ci**Return value** 2801e41f4b71Sopenharmony_ci 2802e41f4b71Sopenharmony_ci| Type | Description | 2803e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 2804e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 2805e41f4b71Sopenharmony_ci 2806e41f4b71Sopenharmony_ci**Error codes** 2807e41f4b71Sopenharmony_ci 2808e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2809e41f4b71Sopenharmony_ci 2810e41f4b71Sopenharmony_ci| ID| Error Message | 2811e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2812e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2813e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2814e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2815e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2816e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2817e41f4b71Sopenharmony_ci| 8300008 | Conference call is not active. | 2818e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 2819e41f4b71Sopenharmony_ci 2820e41f4b71Sopenharmony_ci**Example** 2821e41f4b71Sopenharmony_ci 2822e41f4b71Sopenharmony_ci```ts 2823e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2824e41f4b71Sopenharmony_ci 2825e41f4b71Sopenharmony_cicall.separateConference(1).then(() => { 2826e41f4b71Sopenharmony_ci console.log(`separateConference success.`); 2827e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 2828e41f4b71Sopenharmony_ci console.error(`separateConference fail, promise: err->${JSON.stringify(err)}`); 2829e41f4b71Sopenharmony_ci}); 2830e41f4b71Sopenharmony_ci``` 2831e41f4b71Sopenharmony_ci 2832e41f4b71Sopenharmony_ci## call.getCallRestrictionStatus<sup>8+</sup> 2833e41f4b71Sopenharmony_ci 2834e41f4b71Sopenharmony_cigetCallRestrictionStatus\(slotId: number, type: CallRestrictionType, callback: AsyncCallback\<RestrictionStatus\>\): void 2835e41f4b71Sopenharmony_ci 2836e41f4b71Sopenharmony_ciObtains the call restriction status. This API uses an asynchronous callback to return the result. 2837e41f4b71Sopenharmony_ci 2838e41f4b71Sopenharmony_ci**System API**: This is a system API. 2839e41f4b71Sopenharmony_ci 2840e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 2841e41f4b71Sopenharmony_ci 2842e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2843e41f4b71Sopenharmony_ci 2844e41f4b71Sopenharmony_ci**Parameters** 2845e41f4b71Sopenharmony_ci 2846e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2847e41f4b71Sopenharmony_ci| -------- | ------------------------------------------------------------ | ---- | -------------------------------------- | 2848e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 2849e41f4b71Sopenharmony_ci| type | [CallRestrictionType](#callrestrictiontype8) | Yes | Call restriction type. | 2850e41f4b71Sopenharmony_ci| callback | AsyncCallback<[RestrictionStatus](#restrictionstatus8)> | Yes | Callback used to return the result. | 2851e41f4b71Sopenharmony_ci 2852e41f4b71Sopenharmony_ci**Error codes** 2853e41f4b71Sopenharmony_ci 2854e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2855e41f4b71Sopenharmony_ci 2856e41f4b71Sopenharmony_ci| ID| Error Message | 2857e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2858e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2859e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2860e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2861e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 2862e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2863e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2864e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2865e41f4b71Sopenharmony_ci 2866e41f4b71Sopenharmony_ci**Example** 2867e41f4b71Sopenharmony_ci 2868e41f4b71Sopenharmony_ci```ts 2869e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2870e41f4b71Sopenharmony_ci 2871e41f4b71Sopenharmony_cicall.getCallRestrictionStatus(0, 1, (err: BusinessError, data: call.RestrictionStatus) => { 2872e41f4b71Sopenharmony_ci if (err) { 2873e41f4b71Sopenharmony_ci console.error(`getCallRestrictionStatus fail, err->${JSON.stringify(err)}`); 2874e41f4b71Sopenharmony_ci } else { 2875e41f4b71Sopenharmony_ci console.log(`getCallRestrictionStatus success, data->${JSON.stringify(data)}`); 2876e41f4b71Sopenharmony_ci } 2877e41f4b71Sopenharmony_ci}); 2878e41f4b71Sopenharmony_ci``` 2879e41f4b71Sopenharmony_ci 2880e41f4b71Sopenharmony_ci 2881e41f4b71Sopenharmony_ci## call.getCallRestrictionStatus<sup>8+</sup> 2882e41f4b71Sopenharmony_ci 2883e41f4b71Sopenharmony_cigetCallRestrictionStatus\(slotId: number, type: CallRestrictionType\): Promise\<RestrictionStatus\> 2884e41f4b71Sopenharmony_ci 2885e41f4b71Sopenharmony_ciObtains the call restriction status. This API uses a promise to return the result. 2886e41f4b71Sopenharmony_ci 2887e41f4b71Sopenharmony_ci**System API**: This is a system API. 2888e41f4b71Sopenharmony_ci 2889e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 2890e41f4b71Sopenharmony_ci 2891e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2892e41f4b71Sopenharmony_ci 2893e41f4b71Sopenharmony_ci**Parameters** 2894e41f4b71Sopenharmony_ci 2895e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 2896e41f4b71Sopenharmony_ci| ------ | -------------------------------------------- | ---- | -------------------------------------- | 2897e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 2898e41f4b71Sopenharmony_ci| type | [CallRestrictionType](#callrestrictiontype8) | Yes | Call restriction type. | 2899e41f4b71Sopenharmony_ci 2900e41f4b71Sopenharmony_ci**Return value** 2901e41f4b71Sopenharmony_ci 2902e41f4b71Sopenharmony_ci| Type | Description | 2903e41f4b71Sopenharmony_ci| ------------------------------------------------------- | --------------------------- | 2904e41f4b71Sopenharmony_ci| Promise<[RestrictionStatus](#restrictionstatus8)> | Promise used to return the result.| 2905e41f4b71Sopenharmony_ci 2906e41f4b71Sopenharmony_ci**Error codes** 2907e41f4b71Sopenharmony_ci 2908e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2909e41f4b71Sopenharmony_ci 2910e41f4b71Sopenharmony_ci| ID| Error Message | 2911e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2912e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2913e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2914e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2915e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 2916e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2917e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2918e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2919e41f4b71Sopenharmony_ci 2920e41f4b71Sopenharmony_ci**Example** 2921e41f4b71Sopenharmony_ci 2922e41f4b71Sopenharmony_ci```ts 2923e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2924e41f4b71Sopenharmony_ci 2925e41f4b71Sopenharmony_cicall.getCallRestrictionStatus(0, 1).then((data: call.RestrictionStatus) => { 2926e41f4b71Sopenharmony_ci console.log(`getCallRestrictionStatus success, promise: data->${JSON.stringify(data)}`); 2927e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 2928e41f4b71Sopenharmony_ci console.error(`getCallRestrictionStatus fail, promise: err->${JSON.stringify(err)}`); 2929e41f4b71Sopenharmony_ci}); 2930e41f4b71Sopenharmony_ci``` 2931e41f4b71Sopenharmony_ci 2932e41f4b71Sopenharmony_ci## call.setCallRestriction<sup>8+</sup> 2933e41f4b71Sopenharmony_ci 2934e41f4b71Sopenharmony_cisetCallRestriction\(slotId: number, info: CallRestrictionInfo, callback: AsyncCallback\<void\>\): void 2935e41f4b71Sopenharmony_ci 2936e41f4b71Sopenharmony_ciSets the call restriction status. This API uses an asynchronous callback to return the result. 2937e41f4b71Sopenharmony_ci 2938e41f4b71Sopenharmony_ci**System API**: This is a system API. 2939e41f4b71Sopenharmony_ci 2940e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2941e41f4b71Sopenharmony_ci 2942e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2943e41f4b71Sopenharmony_ci 2944e41f4b71Sopenharmony_ci**Parameters** 2945e41f4b71Sopenharmony_ci 2946e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 2947e41f4b71Sopenharmony_ci| -------- | ------------------------------------------- | ---- | -------------------------------------- | 2948e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 2949e41f4b71Sopenharmony_ci| info | [CallRestrictionInfo](#callrestrictioninfo8) | Yes | Call restriction information. | 2950e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 2951e41f4b71Sopenharmony_ci 2952e41f4b71Sopenharmony_ci**Error codes** 2953e41f4b71Sopenharmony_ci 2954e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 2955e41f4b71Sopenharmony_ci 2956e41f4b71Sopenharmony_ci| ID| Error Message | 2957e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 2958e41f4b71Sopenharmony_ci| 201 | Permission denied. | 2959e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 2960e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 2961e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 2962e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 2963e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 2964e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 2965e41f4b71Sopenharmony_ci 2966e41f4b71Sopenharmony_ci**Example** 2967e41f4b71Sopenharmony_ci 2968e41f4b71Sopenharmony_ci```ts 2969e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 2970e41f4b71Sopenharmony_ci 2971e41f4b71Sopenharmony_cilet callRestrictionInfo: call.CallRestrictionInfo = { 2972e41f4b71Sopenharmony_ci type: call.CallRestrictionType.RESTRICTION_TYPE_ALL_OUTGOING, 2973e41f4b71Sopenharmony_ci password: "123456", 2974e41f4b71Sopenharmony_ci mode: call.CallRestrictionMode.RESTRICTION_MODE_ACTIVATION 2975e41f4b71Sopenharmony_ci} 2976e41f4b71Sopenharmony_cicall.setCallRestriction(0, callRestrictionInfo, (err: BusinessError) => { 2977e41f4b71Sopenharmony_ci if (err) { 2978e41f4b71Sopenharmony_ci console.error(`setCallRestriction fail, err->${JSON.stringify(err)}`); 2979e41f4b71Sopenharmony_ci } else { 2980e41f4b71Sopenharmony_ci console.log(`setCallRestriction success.`); 2981e41f4b71Sopenharmony_ci } 2982e41f4b71Sopenharmony_ci}); 2983e41f4b71Sopenharmony_ci``` 2984e41f4b71Sopenharmony_ci 2985e41f4b71Sopenharmony_ci 2986e41f4b71Sopenharmony_ci## call.setCallRestriction<sup>8+</sup> 2987e41f4b71Sopenharmony_ci 2988e41f4b71Sopenharmony_cisetCallRestriction\(slotId: number, info: CallRestrictionInfo\): Promise\<void\> 2989e41f4b71Sopenharmony_ci 2990e41f4b71Sopenharmony_ciSets the call restriction status. This API uses a promise to return the result. 2991e41f4b71Sopenharmony_ci 2992e41f4b71Sopenharmony_ci**System API**: This is a system API. 2993e41f4b71Sopenharmony_ci 2994e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 2995e41f4b71Sopenharmony_ci 2996e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 2997e41f4b71Sopenharmony_ci 2998e41f4b71Sopenharmony_ci**Parameters** 2999e41f4b71Sopenharmony_ci 3000e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 3001e41f4b71Sopenharmony_ci| ------ | -------------------------------------------- | ---- | -------------------------------------- | 3002e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 3003e41f4b71Sopenharmony_ci| info | [CallRestrictionInfo](#callrestrictioninfo8) | Yes | Call restriction information. | 3004e41f4b71Sopenharmony_ci 3005e41f4b71Sopenharmony_ci**Return value** 3006e41f4b71Sopenharmony_ci 3007e41f4b71Sopenharmony_ci| Type | Description | 3008e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 3009e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 3010e41f4b71Sopenharmony_ci 3011e41f4b71Sopenharmony_ci**Error codes** 3012e41f4b71Sopenharmony_ci 3013e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3014e41f4b71Sopenharmony_ci 3015e41f4b71Sopenharmony_ci| ID| Error Message | 3016e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3017e41f4b71Sopenharmony_ci| 201 | Permission denied. | 3018e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3019e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 3020e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 3021e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 3022e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3023e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3024e41f4b71Sopenharmony_ci 3025e41f4b71Sopenharmony_ci**Example** 3026e41f4b71Sopenharmony_ci 3027e41f4b71Sopenharmony_ci```ts 3028e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3029e41f4b71Sopenharmony_ci 3030e41f4b71Sopenharmony_cilet callRestrictionInfo: call.CallRestrictionInfo = { 3031e41f4b71Sopenharmony_ci type: call.CallRestrictionType.RESTRICTION_TYPE_ALL_INCOMING, 3032e41f4b71Sopenharmony_ci password: "123456", 3033e41f4b71Sopenharmony_ci mode: call.CallRestrictionMode.RESTRICTION_MODE_ACTIVATION 3034e41f4b71Sopenharmony_ci} 3035e41f4b71Sopenharmony_cicall.setCallRestriction(0, callRestrictionInfo).then(() => { 3036e41f4b71Sopenharmony_ci console.log(`setCallRestriction success.`); 3037e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 3038e41f4b71Sopenharmony_ci console.error(`setCallRestriction fail, promise: err->${JSON.stringify(err)}`); 3039e41f4b71Sopenharmony_ci}); 3040e41f4b71Sopenharmony_ci``` 3041e41f4b71Sopenharmony_ci 3042e41f4b71Sopenharmony_ci## call.setCallRestrictionPassword<sup>10+</sup> 3043e41f4b71Sopenharmony_ci 3044e41f4b71Sopenharmony_cisetCallRestrictionPassword\(slotId: number, oldPassword: string, newPassword: string, callback: AsyncCallback\<void\>\): void 3045e41f4b71Sopenharmony_ci 3046e41f4b71Sopenharmony_ciChanges the call barring password. This API uses an asynchronous callback to return the result. 3047e41f4b71Sopenharmony_ci 3048e41f4b71Sopenharmony_ci**System API**: This is a system API. 3049e41f4b71Sopenharmony_ci 3050e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 3051e41f4b71Sopenharmony_ci 3052e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3053e41f4b71Sopenharmony_ci 3054e41f4b71Sopenharmony_ci**Parameters** 3055e41f4b71Sopenharmony_ci 3056e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 3057e41f4b71Sopenharmony_ci| --------------- | ------------------------------------------- | ---- | ------------------------------------ | 3058e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 3059e41f4b71Sopenharmony_ci| oldPassword | string | Yes | Old password for call barring. | 3060e41f4b71Sopenharmony_ci| newPassword | string | Yes | New password for call barring. | 3061e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result. | 3062e41f4b71Sopenharmony_ci 3063e41f4b71Sopenharmony_ci**Error codes** 3064e41f4b71Sopenharmony_ci 3065e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3066e41f4b71Sopenharmony_ci 3067e41f4b71Sopenharmony_ci| ID| Error Message | 3068e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3069e41f4b71Sopenharmony_ci| 201 | Permission denied. | 3070e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3071e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 3072e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 3073e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 3074e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3075e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3076e41f4b71Sopenharmony_ci 3077e41f4b71Sopenharmony_ci**Example** 3078e41f4b71Sopenharmony_ci 3079e41f4b71Sopenharmony_ci```ts 3080e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3081e41f4b71Sopenharmony_ci 3082e41f4b71Sopenharmony_cicall.setCallRestrictionPassword(0, "123456", "654321", (err: BusinessError) => { 3083e41f4b71Sopenharmony_ci if (err) { 3084e41f4b71Sopenharmony_ci console.error(`setCallRestrictionPassword fail, err->${JSON.stringify(err)}`); 3085e41f4b71Sopenharmony_ci } else { 3086e41f4b71Sopenharmony_ci console.log(`setCallRestrictionPassword success.`); 3087e41f4b71Sopenharmony_ci } 3088e41f4b71Sopenharmony_ci}); 3089e41f4b71Sopenharmony_ci``` 3090e41f4b71Sopenharmony_ci 3091e41f4b71Sopenharmony_ci## call.setCallRestrictionPassword<sup>10+</sup> 3092e41f4b71Sopenharmony_ci 3093e41f4b71Sopenharmony_cisetCallRestrictionPassword\(slotId: number, oldPassword: string, newPassword: string\): Promise\<void\> 3094e41f4b71Sopenharmony_ci 3095e41f4b71Sopenharmony_ciChanges the call barring password. This API uses a promise to return the result. 3096e41f4b71Sopenharmony_ci 3097e41f4b71Sopenharmony_ci**System API**: This is a system API. 3098e41f4b71Sopenharmony_ci 3099e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 3100e41f4b71Sopenharmony_ci 3101e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3102e41f4b71Sopenharmony_ci 3103e41f4b71Sopenharmony_ci**Parameters** 3104e41f4b71Sopenharmony_ci 3105e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 3106e41f4b71Sopenharmony_ci| --------------- | ------------------------------------------- | ---- | ------------------------------------ | 3107e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 3108e41f4b71Sopenharmony_ci| oldPassword | string | Yes | Old password for call barring. | 3109e41f4b71Sopenharmony_ci| newPassword | string | Yes | New password for call barring. | 3110e41f4b71Sopenharmony_ci 3111e41f4b71Sopenharmony_ci**Return value** 3112e41f4b71Sopenharmony_ci 3113e41f4b71Sopenharmony_ci| Type | Description | 3114e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 3115e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 3116e41f4b71Sopenharmony_ci 3117e41f4b71Sopenharmony_ci**Error codes** 3118e41f4b71Sopenharmony_ci 3119e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3120e41f4b71Sopenharmony_ci 3121e41f4b71Sopenharmony_ci| ID| Error Message | 3122e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3123e41f4b71Sopenharmony_ci| 201 | Permission denied. | 3124e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3125e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 3126e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 3127e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 3128e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3129e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3130e41f4b71Sopenharmony_ci 3131e41f4b71Sopenharmony_ci**Example** 3132e41f4b71Sopenharmony_ci 3133e41f4b71Sopenharmony_ci```ts 3134e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3135e41f4b71Sopenharmony_ci 3136e41f4b71Sopenharmony_cicall.setCallRestrictionPassword(0, "123456", "654321").then(() => { 3137e41f4b71Sopenharmony_ci console.log(`setCallRestrictionPassword success.`); 3138e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 3139e41f4b71Sopenharmony_ci console.error(`setCallRestrictionPassword fail, promise: err->${JSON.stringify(err)}`); 3140e41f4b71Sopenharmony_ci}); 3141e41f4b71Sopenharmony_ci``` 3142e41f4b71Sopenharmony_ci 3143e41f4b71Sopenharmony_ci## call.getCallTransferInfo<sup>8+</sup> 3144e41f4b71Sopenharmony_ci 3145e41f4b71Sopenharmony_cigetCallTransferInfo\(slotId: number, type: CallTransferType, callback: AsyncCallback\<CallTransferResult\>\): void 3146e41f4b71Sopenharmony_ci 3147e41f4b71Sopenharmony_ciObtains call transfer information. This API uses an asynchronous callback to return the result. 3148e41f4b71Sopenharmony_ci 3149e41f4b71Sopenharmony_ci**System API**: This is a system API. 3150e41f4b71Sopenharmony_ci 3151e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 3152e41f4b71Sopenharmony_ci 3153e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3154e41f4b71Sopenharmony_ci 3155e41f4b71Sopenharmony_ci**Parameters** 3156e41f4b71Sopenharmony_ci 3157e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 3158e41f4b71Sopenharmony_ci| -------- | ------------------------------------------------------------ | ---- | -------------------------------------- | 3159e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 3160e41f4b71Sopenharmony_ci| type | [CallTransferType](#calltransfertype8) | Yes | Call transfer type. | 3161e41f4b71Sopenharmony_ci| callback | AsyncCallback<[CallTransferResult](#calltransferresult8)> | Yes | Callback used to return the result. | 3162e41f4b71Sopenharmony_ci 3163e41f4b71Sopenharmony_ci**Error codes** 3164e41f4b71Sopenharmony_ci 3165e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3166e41f4b71Sopenharmony_ci 3167e41f4b71Sopenharmony_ci| ID| Error Message | 3168e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3169e41f4b71Sopenharmony_ci| 201 | Permission denied. | 3170e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3171e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 3172e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 3173e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 3174e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3175e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3176e41f4b71Sopenharmony_ci 3177e41f4b71Sopenharmony_ci**Example** 3178e41f4b71Sopenharmony_ci 3179e41f4b71Sopenharmony_ci```ts 3180e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3181e41f4b71Sopenharmony_ci 3182e41f4b71Sopenharmony_cicall.getCallTransferInfo(0, call.CallTransferType.TRANSFER_TYPE_BUSY, (err: BusinessError, data: call.CallTransferResult) => { 3183e41f4b71Sopenharmony_ci if (err) { 3184e41f4b71Sopenharmony_ci console.error(`getCallTransferInfo fail, err->${JSON.stringify(err)}`); 3185e41f4b71Sopenharmony_ci } else { 3186e41f4b71Sopenharmony_ci console.log(`getCallTransferInfo success, data->${JSON.stringify(data)}`); 3187e41f4b71Sopenharmony_ci } 3188e41f4b71Sopenharmony_ci}); 3189e41f4b71Sopenharmony_ci``` 3190e41f4b71Sopenharmony_ci 3191e41f4b71Sopenharmony_ci 3192e41f4b71Sopenharmony_ci## call.getCallTransferInfo<sup>8+</sup> 3193e41f4b71Sopenharmony_ci 3194e41f4b71Sopenharmony_cigetCallTransferInfo\(slotId: number, type: CallTransferType\): Promise\<CallTransferResult\> 3195e41f4b71Sopenharmony_ci 3196e41f4b71Sopenharmony_ciObtains call transfer information. This API uses a promise to return the result. 3197e41f4b71Sopenharmony_ci 3198e41f4b71Sopenharmony_ci**System API**: This is a system API. 3199e41f4b71Sopenharmony_ci 3200e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 3201e41f4b71Sopenharmony_ci 3202e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3203e41f4b71Sopenharmony_ci 3204e41f4b71Sopenharmony_ci**Parameters** 3205e41f4b71Sopenharmony_ci 3206e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 3207e41f4b71Sopenharmony_ci| ------ | -------------------------------------- | ---- | -------------------------------------- | 3208e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 3209e41f4b71Sopenharmony_ci| type | [CallTransferType](#calltransfertype8) | Yes | Call transfer type. | 3210e41f4b71Sopenharmony_ci 3211e41f4b71Sopenharmony_ci**Return value** 3212e41f4b71Sopenharmony_ci 3213e41f4b71Sopenharmony_ci| Type | Description | 3214e41f4b71Sopenharmony_ci| --------------------------------------------------------- | --------------------------- | 3215e41f4b71Sopenharmony_ci| Promise<[CallTransferResult](#calltransferresult8)> | Promise used to return the result.| 3216e41f4b71Sopenharmony_ci 3217e41f4b71Sopenharmony_ci**Error codes** 3218e41f4b71Sopenharmony_ci 3219e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3220e41f4b71Sopenharmony_ci 3221e41f4b71Sopenharmony_ci| ID| Error Message | 3222e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3223e41f4b71Sopenharmony_ci| 201 | Permission denied. | 3224e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3225e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 3226e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 3227e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 3228e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3229e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3230e41f4b71Sopenharmony_ci 3231e41f4b71Sopenharmony_ci**Example** 3232e41f4b71Sopenharmony_ci 3233e41f4b71Sopenharmony_ci```ts 3234e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3235e41f4b71Sopenharmony_ci 3236e41f4b71Sopenharmony_cicall.getCallTransferInfo(0, call.CallTransferType.TRANSFER_TYPE_BUSY).then((data: call.CallTransferResult) => { 3237e41f4b71Sopenharmony_ci console.log(`getCallTransferInfo success, promise: data->${JSON.stringify(data)}`); 3238e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 3239e41f4b71Sopenharmony_ci console.error(`getCallTransferInfo fail, promise: err->${JSON.stringify(err)}`); 3240e41f4b71Sopenharmony_ci}); 3241e41f4b71Sopenharmony_ci``` 3242e41f4b71Sopenharmony_ci 3243e41f4b71Sopenharmony_ci## call.setCallTransfer<sup>8+</sup> 3244e41f4b71Sopenharmony_ci 3245e41f4b71Sopenharmony_cisetCallTransfer\(slotId: number, info: CallTransferInfo, callback: AsyncCallback\<void\>\): void 3246e41f4b71Sopenharmony_ci 3247e41f4b71Sopenharmony_ciSets call transfer information. This API uses an asynchronous callback to return the result. 3248e41f4b71Sopenharmony_ci 3249e41f4b71Sopenharmony_ci**System API**: This is a system API. 3250e41f4b71Sopenharmony_ci 3251e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 3252e41f4b71Sopenharmony_ci 3253e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3254e41f4b71Sopenharmony_ci 3255e41f4b71Sopenharmony_ci**Parameters** 3256e41f4b71Sopenharmony_ci 3257e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 3258e41f4b71Sopenharmony_ci| -------- | ------------------------------------- | ---- | -------------------------------------- | 3259e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 3260e41f4b71Sopenharmony_ci| info | [CallTransferInfo](#calltransferinfo8) | Yes | Call transfer information. | 3261e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result. | 3262e41f4b71Sopenharmony_ci 3263e41f4b71Sopenharmony_ci**Error codes** 3264e41f4b71Sopenharmony_ci 3265e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3266e41f4b71Sopenharmony_ci 3267e41f4b71Sopenharmony_ci| ID| Error Message | 3268e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3269e41f4b71Sopenharmony_ci| 201 | Permission denied. | 3270e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3271e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 3272e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 3273e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 3274e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3275e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3276e41f4b71Sopenharmony_ci 3277e41f4b71Sopenharmony_ci**Example** 3278e41f4b71Sopenharmony_ci 3279e41f4b71Sopenharmony_ci```ts 3280e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3281e41f4b71Sopenharmony_ci 3282e41f4b71Sopenharmony_cilet callTransferInfo: call.CallTransferInfo = { 3283e41f4b71Sopenharmony_ci transferNum: "111", 3284e41f4b71Sopenharmony_ci type: call.CallTransferType.TRANSFER_TYPE_BUSY, 3285e41f4b71Sopenharmony_ci settingType: call.CallTransferSettingType.CALL_TRANSFER_ENABLE 3286e41f4b71Sopenharmony_ci} 3287e41f4b71Sopenharmony_cicall.setCallTransfer(0, callTransferInfo, (err: BusinessError) => { 3288e41f4b71Sopenharmony_ci if (err) { 3289e41f4b71Sopenharmony_ci console.error(`setCallTransfer fail, err->${JSON.stringify(err)}`); 3290e41f4b71Sopenharmony_ci } else { 3291e41f4b71Sopenharmony_ci console.log(`setCallTransfer success.`); 3292e41f4b71Sopenharmony_ci } 3293e41f4b71Sopenharmony_ci}); 3294e41f4b71Sopenharmony_ci``` 3295e41f4b71Sopenharmony_ci 3296e41f4b71Sopenharmony_ci 3297e41f4b71Sopenharmony_ci## call.setCallTransfer<sup>8+</sup> 3298e41f4b71Sopenharmony_ci 3299e41f4b71Sopenharmony_cisetCallTransfer\(slotId: number, info: CallTransferInfo\): Promise\<void\> 3300e41f4b71Sopenharmony_ci 3301e41f4b71Sopenharmony_ciSets call transfer information. This API uses a promise to return the result. 3302e41f4b71Sopenharmony_ci 3303e41f4b71Sopenharmony_ci**System API**: This is a system API. 3304e41f4b71Sopenharmony_ci 3305e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 3306e41f4b71Sopenharmony_ci 3307e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3308e41f4b71Sopenharmony_ci 3309e41f4b71Sopenharmony_ci**Parameters** 3310e41f4b71Sopenharmony_ci 3311e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 3312e41f4b71Sopenharmony_ci| ------ | ------------------------------------- | ---- | -------------------------------------- | 3313e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 3314e41f4b71Sopenharmony_ci| info | [CallTransferInfo](#calltransferinfo8) | Yes | Call transfer information. | 3315e41f4b71Sopenharmony_ci 3316e41f4b71Sopenharmony_ci**Return value** 3317e41f4b71Sopenharmony_ci 3318e41f4b71Sopenharmony_ci| Type | Description | 3319e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 3320e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 3321e41f4b71Sopenharmony_ci 3322e41f4b71Sopenharmony_ci**Error codes** 3323e41f4b71Sopenharmony_ci 3324e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3325e41f4b71Sopenharmony_ci 3326e41f4b71Sopenharmony_ci| ID| Error Message | 3327e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3328e41f4b71Sopenharmony_ci| 201 | Permission denied. | 3329e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3330e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 3331e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 3332e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 3333e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3334e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3335e41f4b71Sopenharmony_ci 3336e41f4b71Sopenharmony_ci**Example** 3337e41f4b71Sopenharmony_ci 3338e41f4b71Sopenharmony_ci```ts 3339e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3340e41f4b71Sopenharmony_ci 3341e41f4b71Sopenharmony_cilet callTransferInfo: call.CallTransferInfo = { 3342e41f4b71Sopenharmony_ci transferNum: "111", 3343e41f4b71Sopenharmony_ci type: call.CallTransferType.TRANSFER_TYPE_BUSY, 3344e41f4b71Sopenharmony_ci settingType: call.CallTransferSettingType.CALL_TRANSFER_ENABLE 3345e41f4b71Sopenharmony_ci} 3346e41f4b71Sopenharmony_cicall.setCallTransfer(0, callTransferInfo).then(() => { 3347e41f4b71Sopenharmony_ci console.log(`setCallTransfer success.`); 3348e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 3349e41f4b71Sopenharmony_ci console.error(`setCallTransfer fail, promise: err->${JSON.stringify(err)}`); 3350e41f4b71Sopenharmony_ci}); 3351e41f4b71Sopenharmony_ci``` 3352e41f4b71Sopenharmony_ci 3353e41f4b71Sopenharmony_ci## call.isRinging<sup>8+</sup> 3354e41f4b71Sopenharmony_ci 3355e41f4b71Sopenharmony_ciisRinging\(callback: AsyncCallback\<boolean\>\): void 3356e41f4b71Sopenharmony_ci 3357e41f4b71Sopenharmony_ciChecks whether the ringtone is playing. This API uses an asynchronous callback to return the result. 3358e41f4b71Sopenharmony_ci 3359e41f4b71Sopenharmony_ci**System API**: This is a system API. 3360e41f4b71Sopenharmony_ci 3361e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 3362e41f4b71Sopenharmony_ci 3363e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3364e41f4b71Sopenharmony_ci 3365e41f4b71Sopenharmony_ci**Parameters** 3366e41f4b71Sopenharmony_ci 3367e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 3368e41f4b71Sopenharmony_ci| -------- | ---------------------------- | ---- | ---------- | 3369e41f4b71Sopenharmony_ci| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. The value **true** indicates that the ringtone is playing, and the value **false** indicates the opposite.| 3370e41f4b71Sopenharmony_ci 3371e41f4b71Sopenharmony_ci**Error codes** 3372e41f4b71Sopenharmony_ci 3373e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3374e41f4b71Sopenharmony_ci 3375e41f4b71Sopenharmony_ci| ID| Error Message | 3376e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3377e41f4b71Sopenharmony_ci| 201 | Permission denied. | 3378e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3379e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 3380e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 3381e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3382e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3383e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 3384e41f4b71Sopenharmony_ci 3385e41f4b71Sopenharmony_ci**Example** 3386e41f4b71Sopenharmony_ci 3387e41f4b71Sopenharmony_ci```ts 3388e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3389e41f4b71Sopenharmony_ci 3390e41f4b71Sopenharmony_cicall.isRinging((err: BusinessError, data: boolean) => { 3391e41f4b71Sopenharmony_ci if (err) { 3392e41f4b71Sopenharmony_ci console.error(`isRinging fail, err->${JSON.stringify(err)}`); 3393e41f4b71Sopenharmony_ci } else { 3394e41f4b71Sopenharmony_ci console.log(`isRinging success, data->${JSON.stringify(data)}`); 3395e41f4b71Sopenharmony_ci } 3396e41f4b71Sopenharmony_ci}); 3397e41f4b71Sopenharmony_ci``` 3398e41f4b71Sopenharmony_ci 3399e41f4b71Sopenharmony_ci 3400e41f4b71Sopenharmony_ci## call.isRinging<sup>8+</sup> 3401e41f4b71Sopenharmony_ci 3402e41f4b71Sopenharmony_ciisRinging\(\): Promise\<boolean\> 3403e41f4b71Sopenharmony_ci 3404e41f4b71Sopenharmony_ciChecks whether the ringtone is playing. This API uses a promise to return the result. 3405e41f4b71Sopenharmony_ci 3406e41f4b71Sopenharmony_ci**System API**: This is a system API. 3407e41f4b71Sopenharmony_ci 3408e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 3409e41f4b71Sopenharmony_ci 3410e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3411e41f4b71Sopenharmony_ci 3412e41f4b71Sopenharmony_ci**Return value** 3413e41f4b71Sopenharmony_ci 3414e41f4b71Sopenharmony_ci| Type | Description | 3415e41f4b71Sopenharmony_ci| ---------------------- | --------------------------- | 3416e41f4b71Sopenharmony_ci| Promise<boolean> | Promise used to return the result. The value **true** indicates that the ringtone is playing, and the value **false** indicates the opposite.| 3417e41f4b71Sopenharmony_ci 3418e41f4b71Sopenharmony_ci**Error codes** 3419e41f4b71Sopenharmony_ci 3420e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3421e41f4b71Sopenharmony_ci 3422e41f4b71Sopenharmony_ci| ID| Error Message | 3423e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3424e41f4b71Sopenharmony_ci| 201 | Permission denied. | 3425e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3426e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3427e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3428e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 3429e41f4b71Sopenharmony_ci 3430e41f4b71Sopenharmony_ci**Example** 3431e41f4b71Sopenharmony_ci 3432e41f4b71Sopenharmony_ci```ts 3433e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3434e41f4b71Sopenharmony_ci 3435e41f4b71Sopenharmony_cicall.isRinging().then((data: boolean) => { 3436e41f4b71Sopenharmony_ci console.log(`isRinging success, promise: data->${JSON.stringify(data)}`); 3437e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 3438e41f4b71Sopenharmony_ci console.error(`isRinging fail, promise: err->${JSON.stringify(err)}`); 3439e41f4b71Sopenharmony_ci}); 3440e41f4b71Sopenharmony_ci``` 3441e41f4b71Sopenharmony_ci 3442e41f4b71Sopenharmony_ci## call.setMuted<sup>8+</sup> 3443e41f4b71Sopenharmony_ci 3444e41f4b71Sopenharmony_cisetMuted\(callback: AsyncCallback\<void\>\): void 3445e41f4b71Sopenharmony_ci 3446e41f4b71Sopenharmony_ciSets call muting. This API uses an asynchronous callback to return the result. 3447e41f4b71Sopenharmony_ci 3448e41f4b71Sopenharmony_ci**System API**: This is a system API. 3449e41f4b71Sopenharmony_ci 3450e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3451e41f4b71Sopenharmony_ci 3452e41f4b71Sopenharmony_ci**Parameters** 3453e41f4b71Sopenharmony_ci 3454e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 3455e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ---------- | 3456e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 3457e41f4b71Sopenharmony_ci 3458e41f4b71Sopenharmony_ci**Error codes** 3459e41f4b71Sopenharmony_ci 3460e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3461e41f4b71Sopenharmony_ci 3462e41f4b71Sopenharmony_ci| ID| Error Message | 3463e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3464e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3465e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 3466e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 3467e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3468e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3469e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 3470e41f4b71Sopenharmony_ci 3471e41f4b71Sopenharmony_ci**Example** 3472e41f4b71Sopenharmony_ci 3473e41f4b71Sopenharmony_ci```ts 3474e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3475e41f4b71Sopenharmony_ci 3476e41f4b71Sopenharmony_cicall.setMuted((err: BusinessError) => { 3477e41f4b71Sopenharmony_ci if (err) { 3478e41f4b71Sopenharmony_ci console.error(`setMuted fail, err->${JSON.stringify(err)}`); 3479e41f4b71Sopenharmony_ci } else { 3480e41f4b71Sopenharmony_ci console.log(`setMuted success.`); 3481e41f4b71Sopenharmony_ci } 3482e41f4b71Sopenharmony_ci}); 3483e41f4b71Sopenharmony_ci``` 3484e41f4b71Sopenharmony_ci 3485e41f4b71Sopenharmony_ci 3486e41f4b71Sopenharmony_ci## call.setMuted<sup>8+</sup> 3487e41f4b71Sopenharmony_ci 3488e41f4b71Sopenharmony_cisetMuted\(\): Promise\<void\> 3489e41f4b71Sopenharmony_ci 3490e41f4b71Sopenharmony_ciSets call muting. This API uses a promise to return the result. 3491e41f4b71Sopenharmony_ci 3492e41f4b71Sopenharmony_ci**System API**: This is a system API. 3493e41f4b71Sopenharmony_ci 3494e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3495e41f4b71Sopenharmony_ci 3496e41f4b71Sopenharmony_ci**Return value** 3497e41f4b71Sopenharmony_ci 3498e41f4b71Sopenharmony_ci| Type | Description | 3499e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 3500e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 3501e41f4b71Sopenharmony_ci 3502e41f4b71Sopenharmony_ci**Error codes** 3503e41f4b71Sopenharmony_ci 3504e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3505e41f4b71Sopenharmony_ci 3506e41f4b71Sopenharmony_ci| ID| Error Message | 3507e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3508e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3509e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3510e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3511e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 3512e41f4b71Sopenharmony_ci 3513e41f4b71Sopenharmony_ci**Example** 3514e41f4b71Sopenharmony_ci 3515e41f4b71Sopenharmony_ci```ts 3516e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3517e41f4b71Sopenharmony_ci 3518e41f4b71Sopenharmony_cicall.setMuted().then(() => { 3519e41f4b71Sopenharmony_ci console.log(`setMuted success.`); 3520e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 3521e41f4b71Sopenharmony_ci console.error(`setMuted fail, promise: err->${JSON.stringify(err)}`); 3522e41f4b71Sopenharmony_ci}); 3523e41f4b71Sopenharmony_ci``` 3524e41f4b71Sopenharmony_ci 3525e41f4b71Sopenharmony_ci## call.cancelMuted<sup>8+</sup> 3526e41f4b71Sopenharmony_ci 3527e41f4b71Sopenharmony_cicancelMuted\(callback: AsyncCallback\<void\>\): void 3528e41f4b71Sopenharmony_ci 3529e41f4b71Sopenharmony_ciCancels call muting. This API uses an asynchronous callback to return the result. 3530e41f4b71Sopenharmony_ci 3531e41f4b71Sopenharmony_ci**System API**: This is a system API. 3532e41f4b71Sopenharmony_ci 3533e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3534e41f4b71Sopenharmony_ci 3535e41f4b71Sopenharmony_ci**Parameters** 3536e41f4b71Sopenharmony_ci 3537e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 3538e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | ---------- | 3539e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 3540e41f4b71Sopenharmony_ci 3541e41f4b71Sopenharmony_ci**Error codes** 3542e41f4b71Sopenharmony_ci 3543e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3544e41f4b71Sopenharmony_ci 3545e41f4b71Sopenharmony_ci| ID| Error Message | 3546e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3547e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3548e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 3549e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 3550e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3551e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3552e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 3553e41f4b71Sopenharmony_ci 3554e41f4b71Sopenharmony_ci**Example** 3555e41f4b71Sopenharmony_ci 3556e41f4b71Sopenharmony_ci```ts 3557e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3558e41f4b71Sopenharmony_ci 3559e41f4b71Sopenharmony_cicall.cancelMuted((err: BusinessError) => { 3560e41f4b71Sopenharmony_ci if (err) { 3561e41f4b71Sopenharmony_ci console.error(`cancelMuted fail, err->${JSON.stringify(err)}`); 3562e41f4b71Sopenharmony_ci } else { 3563e41f4b71Sopenharmony_ci console.log(`cancelMuted success.`); 3564e41f4b71Sopenharmony_ci } 3565e41f4b71Sopenharmony_ci}); 3566e41f4b71Sopenharmony_ci``` 3567e41f4b71Sopenharmony_ci 3568e41f4b71Sopenharmony_ci 3569e41f4b71Sopenharmony_ci## call.cancelMuted<sup>8+</sup> 3570e41f4b71Sopenharmony_ci 3571e41f4b71Sopenharmony_cicancelMuted\(\): Promise\<void\> 3572e41f4b71Sopenharmony_ci 3573e41f4b71Sopenharmony_ciCancels call muting. This API uses a promise to return the result. 3574e41f4b71Sopenharmony_ci 3575e41f4b71Sopenharmony_ci**System API**: This is a system API. 3576e41f4b71Sopenharmony_ci 3577e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3578e41f4b71Sopenharmony_ci 3579e41f4b71Sopenharmony_ci**Return value** 3580e41f4b71Sopenharmony_ci 3581e41f4b71Sopenharmony_ci| Type | Description | 3582e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 3583e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 3584e41f4b71Sopenharmony_ci 3585e41f4b71Sopenharmony_ci**Error codes** 3586e41f4b71Sopenharmony_ci 3587e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3588e41f4b71Sopenharmony_ci 3589e41f4b71Sopenharmony_ci| ID| Error Message | 3590e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3591e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3592e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3593e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3594e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 3595e41f4b71Sopenharmony_ci 3596e41f4b71Sopenharmony_ci**Example** 3597e41f4b71Sopenharmony_ci 3598e41f4b71Sopenharmony_ci```ts 3599e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3600e41f4b71Sopenharmony_ci 3601e41f4b71Sopenharmony_cicall.cancelMuted().then(() => { 3602e41f4b71Sopenharmony_ci console.log(`cancelMuted success.`); 3603e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 3604e41f4b71Sopenharmony_ci console.error(`cancelMuted fail, promise: err->${JSON.stringify(err)}`); 3605e41f4b71Sopenharmony_ci}); 3606e41f4b71Sopenharmony_ci``` 3607e41f4b71Sopenharmony_ci 3608e41f4b71Sopenharmony_ci## call.setAudioDevice<sup>8+</sup> 3609e41f4b71Sopenharmony_ci 3610e41f4b71Sopenharmony_cisetAudioDevice\(device: AudioDevice, callback: AsyncCallback\<void\>\): void 3611e41f4b71Sopenharmony_ci 3612e41f4b71Sopenharmony_ciSets the audio device for a call. This API uses an asynchronous callback to return the result. 3613e41f4b71Sopenharmony_ci 3614e41f4b71Sopenharmony_ci**System API**: This is a system API. 3615e41f4b71Sopenharmony_ci 3616e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 3617e41f4b71Sopenharmony_ci 3618e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3619e41f4b71Sopenharmony_ci 3620e41f4b71Sopenharmony_ci**Parameters** 3621e41f4b71Sopenharmony_ci 3622e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 3623e41f4b71Sopenharmony_ci| -------- | ---------------------------- | ---- | ---------- | 3624e41f4b71Sopenharmony_ci| device | [AudioDevice](#audiodevice10)| Yes | Audio device.| 3625e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 3626e41f4b71Sopenharmony_ci 3627e41f4b71Sopenharmony_ci**Error codes** 3628e41f4b71Sopenharmony_ci 3629e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3630e41f4b71Sopenharmony_ci 3631e41f4b71Sopenharmony_ci| ID| Error Message | 3632e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3633e41f4b71Sopenharmony_ci| 201 | Permission denied. | 3634e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3635e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 3636e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 3637e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3638e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3639e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 3640e41f4b71Sopenharmony_ci 3641e41f4b71Sopenharmony_ci**Example** 3642e41f4b71Sopenharmony_ci 3643e41f4b71Sopenharmony_ci```ts 3644e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3645e41f4b71Sopenharmony_ci 3646e41f4b71Sopenharmony_cilet audioDevice: call.AudioDevice = { 3647e41f4b71Sopenharmony_ci deviceType: call.AudioDeviceType.DEVICE_EARPIECE 3648e41f4b71Sopenharmony_ci} 3649e41f4b71Sopenharmony_cicall.setAudioDevice(audioDevice, (err: BusinessError) => { 3650e41f4b71Sopenharmony_ci if (err) { 3651e41f4b71Sopenharmony_ci console.error(`setAudioDevice fail, err->${JSON.stringify(err)}`); 3652e41f4b71Sopenharmony_ci } else { 3653e41f4b71Sopenharmony_ci console.log(`setAudioDevice success.`); 3654e41f4b71Sopenharmony_ci } 3655e41f4b71Sopenharmony_ci}); 3656e41f4b71Sopenharmony_ci``` 3657e41f4b71Sopenharmony_ci 3658e41f4b71Sopenharmony_ci## call.setAudioDevice<sup>10+</sup> 3659e41f4b71Sopenharmony_ci 3660e41f4b71Sopenharmony_cisetAudioDevice\(device: AudioDevice): Promise\<void\> 3661e41f4b71Sopenharmony_ci 3662e41f4b71Sopenharmony_ciSets the audio device for a call. This API uses a promise to return the result. 3663e41f4b71Sopenharmony_ci 3664e41f4b71Sopenharmony_ci**System API**: This is a system API. 3665e41f4b71Sopenharmony_ci 3666e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 3667e41f4b71Sopenharmony_ci 3668e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3669e41f4b71Sopenharmony_ci 3670e41f4b71Sopenharmony_ci**Parameters** 3671e41f4b71Sopenharmony_ci 3672e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 3673e41f4b71Sopenharmony_ci| -------- | ---------------------------- | ---- | ---------- | 3674e41f4b71Sopenharmony_ci| device | [AudioDevice](#audiodevice10)| Yes | Audio device.| 3675e41f4b71Sopenharmony_ci 3676e41f4b71Sopenharmony_ci**Return value** 3677e41f4b71Sopenharmony_ci 3678e41f4b71Sopenharmony_ci| Type | Description | 3679e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 3680e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 3681e41f4b71Sopenharmony_ci 3682e41f4b71Sopenharmony_ci**Error codes** 3683e41f4b71Sopenharmony_ci 3684e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3685e41f4b71Sopenharmony_ci 3686e41f4b71Sopenharmony_ci| ID| Error Message | 3687e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3688e41f4b71Sopenharmony_ci| 201 | Permission denied. | 3689e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3690e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 3691e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 3692e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3693e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3694e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 3695e41f4b71Sopenharmony_ci 3696e41f4b71Sopenharmony_ci**Example** 3697e41f4b71Sopenharmony_ci 3698e41f4b71Sopenharmony_ci```ts 3699e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3700e41f4b71Sopenharmony_ci 3701e41f4b71Sopenharmony_cilet audioDevice: call.AudioDevice = { 3702e41f4b71Sopenharmony_ci deviceType: call.AudioDeviceType.DEVICE_EARPIECE 3703e41f4b71Sopenharmony_ci} 3704e41f4b71Sopenharmony_cicall.setAudioDevice(audioDevice).then(() => { 3705e41f4b71Sopenharmony_ci console.log(`setAudioDevice success.`); 3706e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 3707e41f4b71Sopenharmony_ci console.error(`setAudioDevice fail, promise: err->${JSON.stringify(err)}`); 3708e41f4b71Sopenharmony_ci}); 3709e41f4b71Sopenharmony_ci``` 3710e41f4b71Sopenharmony_ci 3711e41f4b71Sopenharmony_ci## call.joinConference<sup>8+</sup> 3712e41f4b71Sopenharmony_ci 3713e41f4b71Sopenharmony_cijoinConference\(mainCallId: number, callNumberList: Array\<string\>, callback: AsyncCallback\<void\>\): void 3714e41f4b71Sopenharmony_ci 3715e41f4b71Sopenharmony_ciJoins a conference call. This API uses an asynchronous callback to return the result. 3716e41f4b71Sopenharmony_ci 3717e41f4b71Sopenharmony_ci**System API**: This is a system API. 3718e41f4b71Sopenharmony_ci 3719e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3720e41f4b71Sopenharmony_ci 3721e41f4b71Sopenharmony_ci**Parameters** 3722e41f4b71Sopenharmony_ci 3723e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 3724e41f4b71Sopenharmony_ci| -------------- | ------------------------- | ---- | --------------- | 3725e41f4b71Sopenharmony_ci| mainCallId | number | Yes | Main call ID. | 3726e41f4b71Sopenharmony_ci| callNumberList | Array<string\> | Yes | List of call numbers.| 3727e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result. | 3728e41f4b71Sopenharmony_ci 3729e41f4b71Sopenharmony_ci**Error codes** 3730e41f4b71Sopenharmony_ci 3731e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3732e41f4b71Sopenharmony_ci 3733e41f4b71Sopenharmony_ci| ID| Error Message | 3734e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3735e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3736e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 3737e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 3738e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3739e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3740e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 3741e41f4b71Sopenharmony_ci 3742e41f4b71Sopenharmony_ci**Example** 3743e41f4b71Sopenharmony_ci 3744e41f4b71Sopenharmony_ci```ts 3745e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3746e41f4b71Sopenharmony_ci 3747e41f4b71Sopenharmony_cilet callNumberList: Array<string> = [ 3748e41f4b71Sopenharmony_ci "138XXXXXXXX" 3749e41f4b71Sopenharmony_ci]; 3750e41f4b71Sopenharmony_cicall.joinConference(1, callNumberList, (err: BusinessError) => { 3751e41f4b71Sopenharmony_ci if (err) { 3752e41f4b71Sopenharmony_ci console.error(`joinConference fail, err->${JSON.stringify(err)}`); 3753e41f4b71Sopenharmony_ci } else { 3754e41f4b71Sopenharmony_ci console.log(`joinConference success.`); 3755e41f4b71Sopenharmony_ci } 3756e41f4b71Sopenharmony_ci}); 3757e41f4b71Sopenharmony_ci``` 3758e41f4b71Sopenharmony_ci 3759e41f4b71Sopenharmony_ci## call.joinConference<sup>8+</sup> 3760e41f4b71Sopenharmony_ci 3761e41f4b71Sopenharmony_cijoinConference\(mainCallId: number, callNumberList: Array\<string\>\): Promise\<void\> 3762e41f4b71Sopenharmony_ci 3763e41f4b71Sopenharmony_ciJoins a conference call. This API uses a promise to return the result. 3764e41f4b71Sopenharmony_ci 3765e41f4b71Sopenharmony_ci**System API**: This is a system API. 3766e41f4b71Sopenharmony_ci 3767e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3768e41f4b71Sopenharmony_ci 3769e41f4b71Sopenharmony_ci**Parameters** 3770e41f4b71Sopenharmony_ci 3771e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 3772e41f4b71Sopenharmony_ci| -------------- | -------------- | ---- | --------------- | 3773e41f4b71Sopenharmony_ci| mainCallId | number | Yes | Main call ID. | 3774e41f4b71Sopenharmony_ci| callNumberList | Array<string\> | Yes | List of call numbers.| 3775e41f4b71Sopenharmony_ci 3776e41f4b71Sopenharmony_ci**Return value** 3777e41f4b71Sopenharmony_ci 3778e41f4b71Sopenharmony_ci| Type | Description | 3779e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 3780e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 3781e41f4b71Sopenharmony_ci 3782e41f4b71Sopenharmony_ci**Error codes** 3783e41f4b71Sopenharmony_ci 3784e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3785e41f4b71Sopenharmony_ci 3786e41f4b71Sopenharmony_ci| ID| Error Message | 3787e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3788e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3789e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 3790e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 3791e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3792e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3793e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 3794e41f4b71Sopenharmony_ci 3795e41f4b71Sopenharmony_ci**Example** 3796e41f4b71Sopenharmony_ci 3797e41f4b71Sopenharmony_ci```ts 3798e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3799e41f4b71Sopenharmony_ci 3800e41f4b71Sopenharmony_cilet callNumberList: Array<string> = [ 3801e41f4b71Sopenharmony_ci "138XXXXXXXX" 3802e41f4b71Sopenharmony_ci]; 3803e41f4b71Sopenharmony_cicall.joinConference(1, callNumberList).then(() => { 3804e41f4b71Sopenharmony_ci console.log(`joinConference success.`); 3805e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 3806e41f4b71Sopenharmony_ci console.error(`joinConference fail, promise: err->${JSON.stringify(err)}`); 3807e41f4b71Sopenharmony_ci}); 3808e41f4b71Sopenharmony_ci``` 3809e41f4b71Sopenharmony_ci 3810e41f4b71Sopenharmony_ci## call.updateImsCallMode<sup>8+</sup> 3811e41f4b71Sopenharmony_ci 3812e41f4b71Sopenharmony_ciupdateImsCallMode\(callId: number, mode: ImsCallMode, callback: AsyncCallback\<void\>\): void 3813e41f4b71Sopenharmony_ci 3814e41f4b71Sopenharmony_ciUpdates the IMS call mode. This API uses an asynchronous callback to return the result. 3815e41f4b71Sopenharmony_ci 3816e41f4b71Sopenharmony_ci**System API**: This is a system API. 3817e41f4b71Sopenharmony_ci 3818e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3819e41f4b71Sopenharmony_ci 3820e41f4b71Sopenharmony_ci**Parameters** 3821e41f4b71Sopenharmony_ci 3822e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 3823e41f4b71Sopenharmony_ci| -------- | ---------------------------- | ---- | -------------- | 3824e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 3825e41f4b71Sopenharmony_ci| mode | [ImsCallMode](#imscallmode8) | Yes | IMS call mode.| 3826e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result. | 3827e41f4b71Sopenharmony_ci 3828e41f4b71Sopenharmony_ci**Error codes** 3829e41f4b71Sopenharmony_ci 3830e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3831e41f4b71Sopenharmony_ci 3832e41f4b71Sopenharmony_ci| ID| Error Message | 3833e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3834e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3835e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 3836e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 3837e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3838e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3839e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 3840e41f4b71Sopenharmony_ci 3841e41f4b71Sopenharmony_ci**Example** 3842e41f4b71Sopenharmony_ci 3843e41f4b71Sopenharmony_ci```ts 3844e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3845e41f4b71Sopenharmony_ci 3846e41f4b71Sopenharmony_cicall.updateImsCallMode(1, 1, (err: BusinessError) => { 3847e41f4b71Sopenharmony_ci if (err) { 3848e41f4b71Sopenharmony_ci console.error(`updateImsCallMode fail, err->${JSON.stringify(err)}`); 3849e41f4b71Sopenharmony_ci } else { 3850e41f4b71Sopenharmony_ci console.log(`updateImsCallMode success.`); 3851e41f4b71Sopenharmony_ci } 3852e41f4b71Sopenharmony_ci}); 3853e41f4b71Sopenharmony_ci``` 3854e41f4b71Sopenharmony_ci 3855e41f4b71Sopenharmony_ci## call.updateImsCallMode<sup>8+</sup> 3856e41f4b71Sopenharmony_ci 3857e41f4b71Sopenharmony_ciupdateImsCallMode\(callId: number, mode: ImsCallMode\): Promise\<void\> 3858e41f4b71Sopenharmony_ci 3859e41f4b71Sopenharmony_ciUpdates the IMS call mode. This API uses a promise to return the result. 3860e41f4b71Sopenharmony_ci 3861e41f4b71Sopenharmony_ci**System API**: This is a system API. 3862e41f4b71Sopenharmony_ci 3863e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3864e41f4b71Sopenharmony_ci 3865e41f4b71Sopenharmony_ci**Parameters** 3866e41f4b71Sopenharmony_ci 3867e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 3868e41f4b71Sopenharmony_ci| ------ | ---------------------------- | ---- | -------------- | 3869e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 3870e41f4b71Sopenharmony_ci| mode | [ImsCallMode](#imscallmode8) | Yes | IMS call mode.| 3871e41f4b71Sopenharmony_ci 3872e41f4b71Sopenharmony_ci**Return value** 3873e41f4b71Sopenharmony_ci 3874e41f4b71Sopenharmony_ci| Type | Description | 3875e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 3876e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 3877e41f4b71Sopenharmony_ci 3878e41f4b71Sopenharmony_ci**Error codes** 3879e41f4b71Sopenharmony_ci 3880e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3881e41f4b71Sopenharmony_ci 3882e41f4b71Sopenharmony_ci| ID| Error Message | 3883e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3884e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3885e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 3886e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 3887e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3888e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3889e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 3890e41f4b71Sopenharmony_ci 3891e41f4b71Sopenharmony_ci**Example** 3892e41f4b71Sopenharmony_ci 3893e41f4b71Sopenharmony_ci```ts 3894e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3895e41f4b71Sopenharmony_ci 3896e41f4b71Sopenharmony_cicall.updateImsCallMode(1, 1).then(() => { 3897e41f4b71Sopenharmony_ci console.log(`updateImsCallMode success.`); 3898e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 3899e41f4b71Sopenharmony_ci console.error(`updateImsCallMode fail, promise: err->${JSON.stringify(err)}`); 3900e41f4b71Sopenharmony_ci}); 3901e41f4b71Sopenharmony_ci``` 3902e41f4b71Sopenharmony_ci 3903e41f4b71Sopenharmony_ci## call.enableImsSwitch<sup>8+</sup> 3904e41f4b71Sopenharmony_ci 3905e41f4b71Sopenharmony_cienableImsSwitch\(slotId: number, callback: AsyncCallback\<void\>\): void 3906e41f4b71Sopenharmony_ci 3907e41f4b71Sopenharmony_ciEnables the IMS service. This API uses an asynchronous callback to return the result. 3908e41f4b71Sopenharmony_ci 3909e41f4b71Sopenharmony_ci**System API**: This is a system API. 3910e41f4b71Sopenharmony_ci 3911e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 3912e41f4b71Sopenharmony_ci 3913e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3914e41f4b71Sopenharmony_ci 3915e41f4b71Sopenharmony_ci**Parameters** 3916e41f4b71Sopenharmony_ci 3917e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 3918e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | -------------------------------------- | 3919e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 3920e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result. | 3921e41f4b71Sopenharmony_ci 3922e41f4b71Sopenharmony_ci**Error codes** 3923e41f4b71Sopenharmony_ci 3924e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3925e41f4b71Sopenharmony_ci 3926e41f4b71Sopenharmony_ci| ID| Error Message | 3927e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3928e41f4b71Sopenharmony_ci| 201 | Permission denied. | 3929e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3930e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 3931e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 3932e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3933e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3934e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 3935e41f4b71Sopenharmony_ci 3936e41f4b71Sopenharmony_ci**Example** 3937e41f4b71Sopenharmony_ci 3938e41f4b71Sopenharmony_ci```ts 3939e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3940e41f4b71Sopenharmony_ci 3941e41f4b71Sopenharmony_cicall.enableImsSwitch(0, (err: BusinessError) => { 3942e41f4b71Sopenharmony_ci if (err) { 3943e41f4b71Sopenharmony_ci console.error(`enableImsSwitch fail, err->${JSON.stringify(err)}`); 3944e41f4b71Sopenharmony_ci } else { 3945e41f4b71Sopenharmony_ci console.log(`enableImsSwitch success.`); 3946e41f4b71Sopenharmony_ci } 3947e41f4b71Sopenharmony_ci}); 3948e41f4b71Sopenharmony_ci``` 3949e41f4b71Sopenharmony_ci 3950e41f4b71Sopenharmony_ci## call.enableImsSwitch<sup>8+</sup> 3951e41f4b71Sopenharmony_ci 3952e41f4b71Sopenharmony_cienableImsSwitch\(slotId: number\): Promise\<void\> 3953e41f4b71Sopenharmony_ci 3954e41f4b71Sopenharmony_ciEnables the IMS service. This API uses a promise to return the result. 3955e41f4b71Sopenharmony_ci 3956e41f4b71Sopenharmony_ci**System API**: This is a system API. 3957e41f4b71Sopenharmony_ci 3958e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 3959e41f4b71Sopenharmony_ci 3960e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 3961e41f4b71Sopenharmony_ci 3962e41f4b71Sopenharmony_ci**Parameters** 3963e41f4b71Sopenharmony_ci 3964e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 3965e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------------------------- | 3966e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 3967e41f4b71Sopenharmony_ci 3968e41f4b71Sopenharmony_ci**Return value** 3969e41f4b71Sopenharmony_ci 3970e41f4b71Sopenharmony_ci| Type | Description | 3971e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 3972e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 3973e41f4b71Sopenharmony_ci 3974e41f4b71Sopenharmony_ci**Error codes** 3975e41f4b71Sopenharmony_ci 3976e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 3977e41f4b71Sopenharmony_ci 3978e41f4b71Sopenharmony_ci| ID| Error Message | 3979e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 3980e41f4b71Sopenharmony_ci| 201 | Permission denied. | 3981e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 3982e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 3983e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 3984e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 3985e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 3986e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 3987e41f4b71Sopenharmony_ci 3988e41f4b71Sopenharmony_ci**Example** 3989e41f4b71Sopenharmony_ci 3990e41f4b71Sopenharmony_ci```ts 3991e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 3992e41f4b71Sopenharmony_ci 3993e41f4b71Sopenharmony_cicall.enableImsSwitch(0).then(() => { 3994e41f4b71Sopenharmony_ci console.log(`enableImsSwitch success.`); 3995e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 3996e41f4b71Sopenharmony_ci console.error(`enableImsSwitch fail, promise: err->${JSON.stringify(err)}`); 3997e41f4b71Sopenharmony_ci}); 3998e41f4b71Sopenharmony_ci``` 3999e41f4b71Sopenharmony_ci 4000e41f4b71Sopenharmony_ci## call.disableImsSwitch<sup>8+</sup> 4001e41f4b71Sopenharmony_ci 4002e41f4b71Sopenharmony_cidisableImsSwitch\(slotId: number, callback: AsyncCallback\<void\>\): void 4003e41f4b71Sopenharmony_ci 4004e41f4b71Sopenharmony_ciDisables the IMS service. This API uses an asynchronous callback to return the result. 4005e41f4b71Sopenharmony_ci 4006e41f4b71Sopenharmony_ci**System API**: This is a system API. 4007e41f4b71Sopenharmony_ci 4008e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 4009e41f4b71Sopenharmony_ci 4010e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4011e41f4b71Sopenharmony_ci 4012e41f4b71Sopenharmony_ci**Parameters** 4013e41f4b71Sopenharmony_ci 4014e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 4015e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | -------------------------------------- | 4016e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 4017e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result. | 4018e41f4b71Sopenharmony_ci 4019e41f4b71Sopenharmony_ci**Error codes** 4020e41f4b71Sopenharmony_ci 4021e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 4022e41f4b71Sopenharmony_ci 4023e41f4b71Sopenharmony_ci| ID| Error Message | 4024e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 4025e41f4b71Sopenharmony_ci| 201 | Permission denied. | 4026e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 4027e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 4028e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 4029e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 4030e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 4031e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 4032e41f4b71Sopenharmony_ci 4033e41f4b71Sopenharmony_ci**Example** 4034e41f4b71Sopenharmony_ci 4035e41f4b71Sopenharmony_ci```ts 4036e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 4037e41f4b71Sopenharmony_ci 4038e41f4b71Sopenharmony_cicall.disableImsSwitch(0, (err: BusinessError) => { 4039e41f4b71Sopenharmony_ci if (err) { 4040e41f4b71Sopenharmony_ci console.error(`disableImsSwitch fail, err->${JSON.stringify(err)}`); 4041e41f4b71Sopenharmony_ci } else { 4042e41f4b71Sopenharmony_ci console.log(`disableImsSwitch success.`); 4043e41f4b71Sopenharmony_ci } 4044e41f4b71Sopenharmony_ci}); 4045e41f4b71Sopenharmony_ci``` 4046e41f4b71Sopenharmony_ci 4047e41f4b71Sopenharmony_ci## call.disableImsSwitch<sup>8+</sup> 4048e41f4b71Sopenharmony_ci 4049e41f4b71Sopenharmony_cidisableImsSwitch\(slotId: number\): Promise\<void\> 4050e41f4b71Sopenharmony_ci 4051e41f4b71Sopenharmony_ciDisables the IMS service. This API uses a promise to return the result. 4052e41f4b71Sopenharmony_ci 4053e41f4b71Sopenharmony_ci**System API**: This is a system API. 4054e41f4b71Sopenharmony_ci 4055e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 4056e41f4b71Sopenharmony_ci 4057e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4058e41f4b71Sopenharmony_ci 4059e41f4b71Sopenharmony_ci**Parameters** 4060e41f4b71Sopenharmony_ci 4061e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 4062e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------------------------- | 4063e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2 | 4064e41f4b71Sopenharmony_ci 4065e41f4b71Sopenharmony_ci**Return value** 4066e41f4b71Sopenharmony_ci 4067e41f4b71Sopenharmony_ci| Type | Description | 4068e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 4069e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result. | 4070e41f4b71Sopenharmony_ci 4071e41f4b71Sopenharmony_ci**Error codes** 4072e41f4b71Sopenharmony_ci 4073e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 4074e41f4b71Sopenharmony_ci 4075e41f4b71Sopenharmony_ci| ID| Error Message | 4076e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 4077e41f4b71Sopenharmony_ci| 201 | Permission denied. | 4078e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 4079e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 4080e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 4081e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 4082e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 4083e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 4084e41f4b71Sopenharmony_ci 4085e41f4b71Sopenharmony_ci**Example** 4086e41f4b71Sopenharmony_ci 4087e41f4b71Sopenharmony_ci```ts 4088e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 4089e41f4b71Sopenharmony_ci 4090e41f4b71Sopenharmony_cicall.disableImsSwitch(0).then(() => { 4091e41f4b71Sopenharmony_ci console.log(`disableImsSwitch success.`); 4092e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 4093e41f4b71Sopenharmony_ci console.error(`disableImsSwitch fail, promise: err->${JSON.stringify(err)}`); 4094e41f4b71Sopenharmony_ci}); 4095e41f4b71Sopenharmony_ci``` 4096e41f4b71Sopenharmony_ci 4097e41f4b71Sopenharmony_ci## call.isImsSwitchEnabled<sup>8+</sup> 4098e41f4b71Sopenharmony_ci 4099e41f4b71Sopenharmony_ciisImsSwitchEnabled\(slotId: number, callback: AsyncCallback\<boolean\>\): void 4100e41f4b71Sopenharmony_ci 4101e41f4b71Sopenharmony_ciChecks whether the IMS service is enabled. This API uses an asynchronous callback to return the result. 4102e41f4b71Sopenharmony_ci 4103e41f4b71Sopenharmony_ci**System API**: This is a system API. 4104e41f4b71Sopenharmony_ci 4105e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4106e41f4b71Sopenharmony_ci 4107e41f4b71Sopenharmony_ci**Parameters** 4108e41f4b71Sopenharmony_ci 4109e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 4110e41f4b71Sopenharmony_ci| -------- | ---------------------------- | ---- | -------------------------------------- | 4111e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 4112e41f4b71Sopenharmony_ci| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. The value **true** indicates that the IMS service is enabled, and the value **false** indicates the opposite. The value **true** indicates that the IMS service is enabled, and the value **false** indicates the opposite.| 4113e41f4b71Sopenharmony_ci 4114e41f4b71Sopenharmony_ci**Error codes** 4115e41f4b71Sopenharmony_ci 4116e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 4117e41f4b71Sopenharmony_ci 4118e41f4b71Sopenharmony_ci| ID| Error Message | 4119e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 4120e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 4121e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 4122e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 4123e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 4124e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 4125e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 4126e41f4b71Sopenharmony_ci 4127e41f4b71Sopenharmony_ci**Example** 4128e41f4b71Sopenharmony_ci 4129e41f4b71Sopenharmony_ci```ts 4130e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 4131e41f4b71Sopenharmony_ci 4132e41f4b71Sopenharmony_cicall.isImsSwitchEnabled(0, (err: BusinessError, data: boolean) => { 4133e41f4b71Sopenharmony_ci if (err) { 4134e41f4b71Sopenharmony_ci console.error(`isImsSwitchEnabled fail, err->${JSON.stringify(err)}`); 4135e41f4b71Sopenharmony_ci } else { 4136e41f4b71Sopenharmony_ci console.log(`isImsSwitchEnabled success, data->${JSON.stringify(data)}`); 4137e41f4b71Sopenharmony_ci } 4138e41f4b71Sopenharmony_ci}); 4139e41f4b71Sopenharmony_ci``` 4140e41f4b71Sopenharmony_ci 4141e41f4b71Sopenharmony_ci## call.isImsSwitchEnabled<sup>8+</sup> 4142e41f4b71Sopenharmony_ci 4143e41f4b71Sopenharmony_ciisImsSwitchEnabled\(slotId: number\): Promise\<boolean\> 4144e41f4b71Sopenharmony_ci 4145e41f4b71Sopenharmony_ciChecks whether the IMS service is enabled. This API uses a promise to return the result. 4146e41f4b71Sopenharmony_ci 4147e41f4b71Sopenharmony_ci**System API**: This is a system API. 4148e41f4b71Sopenharmony_ci 4149e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4150e41f4b71Sopenharmony_ci 4151e41f4b71Sopenharmony_ci**Parameters** 4152e41f4b71Sopenharmony_ci 4153e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 4154e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------------------------- | 4155e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 4156e41f4b71Sopenharmony_ci 4157e41f4b71Sopenharmony_ci**Return value** 4158e41f4b71Sopenharmony_ci 4159e41f4b71Sopenharmony_ci| Type | Description | 4160e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 4161e41f4b71Sopenharmony_ci| Promise<boolean> | Promise used to return the result. The value **true** indicates that the IMS service is enabled, and the value **false** indicates the opposite.| 4162e41f4b71Sopenharmony_ci 4163e41f4b71Sopenharmony_ci**Error codes** 4164e41f4b71Sopenharmony_ci 4165e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 4166e41f4b71Sopenharmony_ci 4167e41f4b71Sopenharmony_ci| ID| Error Message | 4168e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 4169e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 4170e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 4171e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 4172e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 4173e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 4174e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 4175e41f4b71Sopenharmony_ci 4176e41f4b71Sopenharmony_ci**Example** 4177e41f4b71Sopenharmony_ci 4178e41f4b71Sopenharmony_ci```ts 4179e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 4180e41f4b71Sopenharmony_ci 4181e41f4b71Sopenharmony_cicall.isImsSwitchEnabled(0).then((data: boolean) => { 4182e41f4b71Sopenharmony_ci console.log(`isImsSwitchEnabled success, promise: data->${JSON.stringify(data)}`); 4183e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 4184e41f4b71Sopenharmony_ci console.error(`isImsSwitchEnabled fail, promise: err->${JSON.stringify(err)}`); 4185e41f4b71Sopenharmony_ci}); 4186e41f4b71Sopenharmony_ci``` 4187e41f4b71Sopenharmony_ci 4188e41f4b71Sopenharmony_ci## call.isImsSwitchEnabledSync<sup>12+</sup> 4189e41f4b71Sopenharmony_ci 4190e41f4b71Sopenharmony_ciisImsSwitchEnabledSync\(slotId: number\): boolean 4191e41f4b71Sopenharmony_ci 4192e41f4b71Sopenharmony_ciChecks whether the IMS service is enabled. This API returns the result synchronously. 4193e41f4b71Sopenharmony_ci 4194e41f4b71Sopenharmony_ci**System API**: This is a system API. 4195e41f4b71Sopenharmony_ci 4196e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4197e41f4b71Sopenharmony_ci 4198e41f4b71Sopenharmony_ci**Parameters** 4199e41f4b71Sopenharmony_ci 4200e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 4201e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------------------------- | 4202e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2| 4203e41f4b71Sopenharmony_ci 4204e41f4b71Sopenharmony_ci**Return value** 4205e41f4b71Sopenharmony_ci 4206e41f4b71Sopenharmony_ci| Type | Description | 4207e41f4b71Sopenharmony_ci| ------- | ---------------------------------------------------- | 4208e41f4b71Sopenharmony_ci| boolean | Whether the IMS service is enabled. The value **true** indicates that the IMS service is enabled, and the value **false** indicates the opposite.| 4209e41f4b71Sopenharmony_ci 4210e41f4b71Sopenharmony_ci**Error codes** 4211e41f4b71Sopenharmony_ci 4212e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 4213e41f4b71Sopenharmony_ci 4214e41f4b71Sopenharmony_ci| ID| Error Message | 4215e41f4b71Sopenharmony_ci| -------- | ------------------------------------------------------------ | 4216e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 4217e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types; | 4218e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 4219e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 4220e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 4221e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 4222e41f4b71Sopenharmony_ci 4223e41f4b71Sopenharmony_ci**Example** 4224e41f4b71Sopenharmony_ci 4225e41f4b71Sopenharmony_ci<!--code_no_check--> 4226e41f4b71Sopenharmony_ci 4227e41f4b71Sopenharmony_ci```ts 4228e41f4b71Sopenharmony_cilet slotId: number = 0; 4229e41f4b71Sopenharmony_citry { 4230e41f4b71Sopenharmony_ci let isEnabled: boolean = call.isImsSwitchEnabledSync(slotId); 4231e41f4b71Sopenharmony_ci console.log(`isImsSwitchEnabledSync success : ${isEnabled}`); 4232e41f4b71Sopenharmony_ci} catch (error) { 4233e41f4b71Sopenharmony_ci console.error(`isImsSwitchEnabledSync fail : err->${JSON.stringify(error)}`); 4234e41f4b71Sopenharmony_ci} 4235e41f4b71Sopenharmony_ci``` 4236e41f4b71Sopenharmony_ci 4237e41f4b71Sopenharmony_ci## call.closeUnfinishedUssd<sup>10+</sup> 4238e41f4b71Sopenharmony_ci 4239e41f4b71Sopenharmony_cicloseUnfinishedUssd\(slotId: number, callback: AsyncCallback\<void\>\): void 4240e41f4b71Sopenharmony_ci 4241e41f4b71Sopenharmony_ciCancels the unfinished USSD services. This API uses an asynchronous callback to return the result. 4242e41f4b71Sopenharmony_ci 4243e41f4b71Sopenharmony_ci**System API**: This is a system API. 4244e41f4b71Sopenharmony_ci 4245e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 4246e41f4b71Sopenharmony_ci 4247e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4248e41f4b71Sopenharmony_ci 4249e41f4b71Sopenharmony_ci**Parameters** 4250e41f4b71Sopenharmony_ci 4251e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 4252e41f4b71Sopenharmony_ci| -------- | ------------------------- | ---- | -------------------------------------- | 4253e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2 | 4254e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result. | 4255e41f4b71Sopenharmony_ci 4256e41f4b71Sopenharmony_ci**Error codes** 4257e41f4b71Sopenharmony_ci 4258e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 4259e41f4b71Sopenharmony_ci 4260e41f4b71Sopenharmony_ci| ID| Error Message | 4261e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 4262e41f4b71Sopenharmony_ci| 201 | Permission denied. | 4263e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 4264e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 4265e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 4266e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 4267e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 4268e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 4269e41f4b71Sopenharmony_ci 4270e41f4b71Sopenharmony_ci**Example** 4271e41f4b71Sopenharmony_ci 4272e41f4b71Sopenharmony_ci```ts 4273e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 4274e41f4b71Sopenharmony_ci 4275e41f4b71Sopenharmony_cilet slotId: number = 0; 4276e41f4b71Sopenharmony_cicall.closeUnfinishedUssd(slotId, (err: BusinessError) => { 4277e41f4b71Sopenharmony_ci if (err) { 4278e41f4b71Sopenharmony_ci console.error(`closeUnfinishedUssd fail, err->${JSON.stringify(err)}`); 4279e41f4b71Sopenharmony_ci } else { 4280e41f4b71Sopenharmony_ci console.log(`closeUnfinishedUssd success.`); 4281e41f4b71Sopenharmony_ci } 4282e41f4b71Sopenharmony_ci}); 4283e41f4b71Sopenharmony_ci``` 4284e41f4b71Sopenharmony_ci 4285e41f4b71Sopenharmony_ci## call.closeUnfinishedUssd<sup>10+</sup> 4286e41f4b71Sopenharmony_ci 4287e41f4b71Sopenharmony_cicloseUnfinishedUssd\(slotId: number\): Promise\<void\> 4288e41f4b71Sopenharmony_ci 4289e41f4b71Sopenharmony_ciCancels the unfinished USSD services. This API uses a promise to return the result. 4290e41f4b71Sopenharmony_ci 4291e41f4b71Sopenharmony_ci**System API**: This is a system API. 4292e41f4b71Sopenharmony_ci 4293e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 4294e41f4b71Sopenharmony_ci 4295e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4296e41f4b71Sopenharmony_ci 4297e41f4b71Sopenharmony_ci**Parameters** 4298e41f4b71Sopenharmony_ci 4299e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 4300e41f4b71Sopenharmony_ci| ------ | ------ | ---- | -------------------------------------- | 4301e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2 | 4302e41f4b71Sopenharmony_ci 4303e41f4b71Sopenharmony_ci**Return value** 4304e41f4b71Sopenharmony_ci 4305e41f4b71Sopenharmony_ci| Type | Description | 4306e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 4307e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result. | 4308e41f4b71Sopenharmony_ci 4309e41f4b71Sopenharmony_ci**Error codes** 4310e41f4b71Sopenharmony_ci 4311e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 4312e41f4b71Sopenharmony_ci 4313e41f4b71Sopenharmony_ci| ID| Error Message | 4314e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 4315e41f4b71Sopenharmony_ci| 201 | Permission denied. | 4316e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 4317e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 4318e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 4319e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 4320e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 4321e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 4322e41f4b71Sopenharmony_ci 4323e41f4b71Sopenharmony_ci**Example** 4324e41f4b71Sopenharmony_ci 4325e41f4b71Sopenharmony_ci```ts 4326e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 4327e41f4b71Sopenharmony_ci 4328e41f4b71Sopenharmony_cilet slotId: number = 0; 4329e41f4b71Sopenharmony_cicall.closeUnfinishedUssd(slotId).then(() => { 4330e41f4b71Sopenharmony_ci console.log(`closeUnfinishedUssd success.`); 4331e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 4332e41f4b71Sopenharmony_ci console.error(`closeUnfinishedUssd fail, promise: err->${JSON.stringify(err)}`); 4333e41f4b71Sopenharmony_ci}); 4334e41f4b71Sopenharmony_ci``` 4335e41f4b71Sopenharmony_ci 4336e41f4b71Sopenharmony_ci 4337e41f4b71Sopenharmony_ci## call.setVoNRState<sup>10+</sup> 4338e41f4b71Sopenharmony_ci 4339e41f4b71Sopenharmony_cisetVoNRState\(slotId: number, state: VoNRState, callback: AsyncCallback\<void\>\): void 4340e41f4b71Sopenharmony_ci 4341e41f4b71Sopenharmony_ciSets the status of the VoNR switch. This API uses an asynchronous callback to return the result. 4342e41f4b71Sopenharmony_ci 4343e41f4b71Sopenharmony_ci**System API**: This is a system API. 4344e41f4b71Sopenharmony_ci 4345e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 4346e41f4b71Sopenharmony_ci 4347e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4348e41f4b71Sopenharmony_ci 4349e41f4b71Sopenharmony_ci**Parameters** 4350e41f4b71Sopenharmony_ci 4351e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 4352e41f4b71Sopenharmony_ci| ----------- | ----------------------------- | ---- | ---------------------------------------------------- | 4353e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2 | 4354e41f4b71Sopenharmony_ci| state | [VoNRState](#vonrstate10) | Yes | Status of the VoNR switch. | 4355e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result.| 4356e41f4b71Sopenharmony_ci 4357e41f4b71Sopenharmony_ci**Error codes** 4358e41f4b71Sopenharmony_ci 4359e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 4360e41f4b71Sopenharmony_ci 4361e41f4b71Sopenharmony_ci| ID| Error Message | 4362e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 4363e41f4b71Sopenharmony_ci| 201 | Permission denied. | 4364e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 4365e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 4366e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 4367e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 4368e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 4369e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 4370e41f4b71Sopenharmony_ci 4371e41f4b71Sopenharmony_ci**Example** 4372e41f4b71Sopenharmony_ci 4373e41f4b71Sopenharmony_ci```ts 4374e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 4375e41f4b71Sopenharmony_ci 4376e41f4b71Sopenharmony_cilet slotId: number = 0; 4377e41f4b71Sopenharmony_cilet state: call.VoNRState = call.VoNRState.VONR_STATE_ON; 4378e41f4b71Sopenharmony_cicall.setVoNRState(slotId, state, (err: BusinessError) => { 4379e41f4b71Sopenharmony_ci if (err) { 4380e41f4b71Sopenharmony_ci console.error(`setVoNRState fail, err->${JSON.stringify(err)}`); 4381e41f4b71Sopenharmony_ci } else { 4382e41f4b71Sopenharmony_ci console.log(`setVoNRState success`); 4383e41f4b71Sopenharmony_ci } 4384e41f4b71Sopenharmony_ci}); 4385e41f4b71Sopenharmony_ci``` 4386e41f4b71Sopenharmony_ci 4387e41f4b71Sopenharmony_ci 4388e41f4b71Sopenharmony_ci## call.setVoNRState<sup>10+</sup> 4389e41f4b71Sopenharmony_ci 4390e41f4b71Sopenharmony_cisetVoNRState\(slotId: number, state: VoNRState\): Promise\<void\> 4391e41f4b71Sopenharmony_ci 4392e41f4b71Sopenharmony_ciSets the status of the VoNR switch. This API uses a promise to return the result. 4393e41f4b71Sopenharmony_ci 4394e41f4b71Sopenharmony_ci**System API**: This is a system API. 4395e41f4b71Sopenharmony_ci 4396e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 4397e41f4b71Sopenharmony_ci 4398e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4399e41f4b71Sopenharmony_ci 4400e41f4b71Sopenharmony_ci**Parameters** 4401e41f4b71Sopenharmony_ci 4402e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 4403e41f4b71Sopenharmony_ci| ----------- | ----------------------------- | ---- | ------------------------------------------- | 4404e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2 | 4405e41f4b71Sopenharmony_ci| state | [VoNRState](#vonrstate10) | Yes | Status of the VoNR switch. | 4406e41f4b71Sopenharmony_ci 4407e41f4b71Sopenharmony_ci**Return value** 4408e41f4b71Sopenharmony_ci 4409e41f4b71Sopenharmony_ci| Type | Description | 4410e41f4b71Sopenharmony_ci| ---------------------- | --------------------------------------------- | 4411e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result. | 4412e41f4b71Sopenharmony_ci 4413e41f4b71Sopenharmony_ci**Error codes** 4414e41f4b71Sopenharmony_ci 4415e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 4416e41f4b71Sopenharmony_ci 4417e41f4b71Sopenharmony_ci| ID| Error Message | 4418e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 4419e41f4b71Sopenharmony_ci| 201 | Permission denied. | 4420e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 4421e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 4422e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 4423e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 4424e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 4425e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 4426e41f4b71Sopenharmony_ci 4427e41f4b71Sopenharmony_ci**Example** 4428e41f4b71Sopenharmony_ci 4429e41f4b71Sopenharmony_ci```ts 4430e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 4431e41f4b71Sopenharmony_ci 4432e41f4b71Sopenharmony_cilet slotId: number = 0; 4433e41f4b71Sopenharmony_cilet state: call.VoNRState = call.VoNRState.VONR_STATE_ON; 4434e41f4b71Sopenharmony_cicall.setVoNRState(slotId, state).then(() => { 4435e41f4b71Sopenharmony_ci console.log(`setVoNRState success`); 4436e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 4437e41f4b71Sopenharmony_ci console.error(`setVoNRState fail, promise: err->${JSON.stringify(err)}`); 4438e41f4b71Sopenharmony_ci}); 4439e41f4b71Sopenharmony_ci``` 4440e41f4b71Sopenharmony_ci 4441e41f4b71Sopenharmony_ci 4442e41f4b71Sopenharmony_ci## call.getVoNRState<sup>10+</sup> 4443e41f4b71Sopenharmony_ci 4444e41f4b71Sopenharmony_cigetVoNRState\(slotId: number, callback: AsyncCallback\<VoNRState\>\): void 4445e41f4b71Sopenharmony_ci 4446e41f4b71Sopenharmony_ciObtains the status of the VoNR switch. This API uses an asynchronous callback to return the result. 4447e41f4b71Sopenharmony_ci 4448e41f4b71Sopenharmony_ci**System API**: This is a system API. 4449e41f4b71Sopenharmony_ci 4450e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 4451e41f4b71Sopenharmony_ci 4452e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4453e41f4b71Sopenharmony_ci 4454e41f4b71Sopenharmony_ci**Parameters** 4455e41f4b71Sopenharmony_ci 4456e41f4b71Sopenharmony_ci| Name | Type | Mandatory | Description | 4457e41f4b71Sopenharmony_ci| ----------- | --------------------------------------------- | ---- | ------------------------------------------------------ | 4458e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2 | 4459e41f4b71Sopenharmony_ci| callback | AsyncCallback<[VoNRState](#vonrstate10)>| Yes | Callback used to return the result. | 4460e41f4b71Sopenharmony_ci 4461e41f4b71Sopenharmony_ci**Error codes** 4462e41f4b71Sopenharmony_ci 4463e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 4464e41f4b71Sopenharmony_ci 4465e41f4b71Sopenharmony_ci| ID| Error Message | 4466e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 4467e41f4b71Sopenharmony_ci| 201 | Permission denied. | 4468e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 4469e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 4470e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 4471e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 4472e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 4473e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 4474e41f4b71Sopenharmony_ci 4475e41f4b71Sopenharmony_ci**Example** 4476e41f4b71Sopenharmony_ci 4477e41f4b71Sopenharmony_ci```ts 4478e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 4479e41f4b71Sopenharmony_ci 4480e41f4b71Sopenharmony_cilet slotId: number = 0; 4481e41f4b71Sopenharmony_cicall.getVoNRState(slotId, (err: BusinessError, data: call.VoNRState) => { 4482e41f4b71Sopenharmony_ci if (err) { 4483e41f4b71Sopenharmony_ci console.error(`getVoNRState fail, err->${JSON.stringify(err)}`); 4484e41f4b71Sopenharmony_ci } else { 4485e41f4b71Sopenharmony_ci console.log(`getVoNRState success, data->${JSON.stringify(data)}`); 4486e41f4b71Sopenharmony_ci } 4487e41f4b71Sopenharmony_ci}); 4488e41f4b71Sopenharmony_ci``` 4489e41f4b71Sopenharmony_ci 4490e41f4b71Sopenharmony_ci 4491e41f4b71Sopenharmony_ci## call.getVoNRState<sup>10+</sup> 4492e41f4b71Sopenharmony_ci 4493e41f4b71Sopenharmony_cigetVoNRState\(slotId: number\): Promise\<VoNRState\> 4494e41f4b71Sopenharmony_ci 4495e41f4b71Sopenharmony_ciObtains the status of the VoNR switch. This API uses a promise to return the result. 4496e41f4b71Sopenharmony_ci 4497e41f4b71Sopenharmony_ci**System API**: This is a system API. 4498e41f4b71Sopenharmony_ci 4499e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 4500e41f4b71Sopenharmony_ci 4501e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4502e41f4b71Sopenharmony_ci 4503e41f4b71Sopenharmony_ci**Parameters** 4504e41f4b71Sopenharmony_ci 4505e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 4506e41f4b71Sopenharmony_ci| ----------- | ----------------------------- | ---- | ------------------------------------------- | 4507e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2 | 4508e41f4b71Sopenharmony_ci 4509e41f4b71Sopenharmony_ci**Return value** 4510e41f4b71Sopenharmony_ci 4511e41f4b71Sopenharmony_ci| Type | Description | 4512e41f4b71Sopenharmony_ci| ---------------------------------------- | ------------------------------------------- | 4513e41f4b71Sopenharmony_ci| Promise<[VoNRState](#vonrstate10)> | Promise used to return the result. | 4514e41f4b71Sopenharmony_ci 4515e41f4b71Sopenharmony_ci**Error codes** 4516e41f4b71Sopenharmony_ci 4517e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 4518e41f4b71Sopenharmony_ci 4519e41f4b71Sopenharmony_ci| ID| Error Message | 4520e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 4521e41f4b71Sopenharmony_ci| 201 | Permission denied. | 4522e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 4523e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 4524e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 4525e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 4526e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 4527e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 4528e41f4b71Sopenharmony_ci 4529e41f4b71Sopenharmony_ci**Example** 4530e41f4b71Sopenharmony_ci 4531e41f4b71Sopenharmony_ci```ts 4532e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 4533e41f4b71Sopenharmony_ci 4534e41f4b71Sopenharmony_cilet slotId: number = 0; 4535e41f4b71Sopenharmony_cicall.getVoNRState(slotId).then((data: call.VoNRState) => { 4536e41f4b71Sopenharmony_ci console.log(`getVoNRState success, promise: data->${JSON.stringify(data)}`); 4537e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 4538e41f4b71Sopenharmony_ci console.error(`getVoNRState fail, promise: err->${JSON.stringify(err)}`); 4539e41f4b71Sopenharmony_ci}); 4540e41f4b71Sopenharmony_ci``` 4541e41f4b71Sopenharmony_ci 4542e41f4b71Sopenharmony_ci 4543e41f4b71Sopenharmony_ci## call.canSetCallTransferTime<sup>10+</sup> 4544e41f4b71Sopenharmony_ci 4545e41f4b71Sopenharmony_cicanSetCallTransferTime\(slotId: number, callback: AsyncCallback\<boolean\>\): void 4546e41f4b71Sopenharmony_ci 4547e41f4b71Sopenharmony_ciChecks whether the call forwarding time can be set. This API uses an asynchronous callback to return the result. 4548e41f4b71Sopenharmony_ci 4549e41f4b71Sopenharmony_ci**System API**: This is a system API. 4550e41f4b71Sopenharmony_ci 4551e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 4552e41f4b71Sopenharmony_ci 4553e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4554e41f4b71Sopenharmony_ci 4555e41f4b71Sopenharmony_ci**Parameters** 4556e41f4b71Sopenharmony_ci 4557e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 4558e41f4b71Sopenharmony_ci| ----------- | ----------------------------- | ---- | ----------------------------------------------------- | 4559e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2 | 4560e41f4b71Sopenharmony_ci| callback | AsyncCallback<boolean> | Yes | Callback used to return the result. The value **true** indicates that the call forwarding time can be set, and the value **false** indicates the opposite.| 4561e41f4b71Sopenharmony_ci 4562e41f4b71Sopenharmony_ci**Error codes** 4563e41f4b71Sopenharmony_ci 4564e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 4565e41f4b71Sopenharmony_ci 4566e41f4b71Sopenharmony_ci| ID| Error Message | 4567e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 4568e41f4b71Sopenharmony_ci| 201 | Permission denied. | 4569e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 4570e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 4571e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 4572e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 4573e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 4574e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 4575e41f4b71Sopenharmony_ci 4576e41f4b71Sopenharmony_ci**Example** 4577e41f4b71Sopenharmony_ci 4578e41f4b71Sopenharmony_ci```ts 4579e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 4580e41f4b71Sopenharmony_ci 4581e41f4b71Sopenharmony_cilet slotId: number = 0; 4582e41f4b71Sopenharmony_cicall.canSetCallTransferTime(slotId, (err: BusinessError, data: boolean) => { 4583e41f4b71Sopenharmony_ci if (err) { 4584e41f4b71Sopenharmony_ci console.error(`canSetCallTransferTime fail, err->${JSON.stringify(err)}`); 4585e41f4b71Sopenharmony_ci } else { 4586e41f4b71Sopenharmony_ci console.log(`canSetCallTransferTime success, data->${JSON.stringify(data)}`); 4587e41f4b71Sopenharmony_ci } 4588e41f4b71Sopenharmony_ci}); 4589e41f4b71Sopenharmony_ci``` 4590e41f4b71Sopenharmony_ci 4591e41f4b71Sopenharmony_ci 4592e41f4b71Sopenharmony_ci## call.canSetCallTransferTime<sup>10+</sup> 4593e41f4b71Sopenharmony_ci 4594e41f4b71Sopenharmony_cicanSetCallTransferTime\(slotId: number\): Promise\<boolean\> 4595e41f4b71Sopenharmony_ci 4596e41f4b71Sopenharmony_ciChecks whether the call forwarding time can be set. This API uses a promise to return the result. 4597e41f4b71Sopenharmony_ci 4598e41f4b71Sopenharmony_ci**System API**: This is a system API. 4599e41f4b71Sopenharmony_ci 4600e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.GET_TELEPHONY_STATE 4601e41f4b71Sopenharmony_ci 4602e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4603e41f4b71Sopenharmony_ci 4604e41f4b71Sopenharmony_ci**Parameters** 4605e41f4b71Sopenharmony_ci 4606e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 4607e41f4b71Sopenharmony_ci| ----------- | ----------------------------- | ---- | ------------------------------------------- | 4608e41f4b71Sopenharmony_ci| slotId | number | Yes | Card slot ID.<br>- **0**: card slot 1<br>- **1**: card slot 2 | 4609e41f4b71Sopenharmony_ci 4610e41f4b71Sopenharmony_ci**Return value** 4611e41f4b71Sopenharmony_ci 4612e41f4b71Sopenharmony_ci| Type | Description | 4613e41f4b71Sopenharmony_ci| ---------------------- | --------------------------------------------- | 4614e41f4b71Sopenharmony_ci| Promise<boolean> | Promise used to return the result. The value **true** indicates that the call forwarding time can be set, and the value **false** indicates the opposite.| 4615e41f4b71Sopenharmony_ci 4616e41f4b71Sopenharmony_ci**Error codes** 4617e41f4b71Sopenharmony_ci 4618e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 4619e41f4b71Sopenharmony_ci 4620e41f4b71Sopenharmony_ci| ID| Error Message | 4621e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 4622e41f4b71Sopenharmony_ci| 201 | Permission denied. | 4623e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 4624e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 4625e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 4626e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 4627e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 4628e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 4629e41f4b71Sopenharmony_ci 4630e41f4b71Sopenharmony_ci**Example** 4631e41f4b71Sopenharmony_ci 4632e41f4b71Sopenharmony_ci```ts 4633e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 4634e41f4b71Sopenharmony_ci 4635e41f4b71Sopenharmony_cilet slotId: number = 0; 4636e41f4b71Sopenharmony_cicall.canSetCallTransferTime(slotId).then((data: boolean) => { 4637e41f4b71Sopenharmony_ci console.log(`canSetCallTransferTime success, promise: data->${JSON.stringify(data)}`); 4638e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 4639e41f4b71Sopenharmony_ci console.error(`canSetCallTransferTime fail, promise: err->${JSON.stringify(err)}`); 4640e41f4b71Sopenharmony_ci}); 4641e41f4b71Sopenharmony_ci``` 4642e41f4b71Sopenharmony_ci 4643e41f4b71Sopenharmony_ci 4644e41f4b71Sopenharmony_ci## call.inputDialerSpecialCode<sup>10+</sup> 4645e41f4b71Sopenharmony_ci 4646e41f4b71Sopenharmony_ciinputDialerSpecialCode\(inputCode: string, callback: AsyncCallback\<void\>\): void 4647e41f4b71Sopenharmony_ci 4648e41f4b71Sopenharmony_ciPerforms a secret code broadcast. This API uses an asynchronous callback to return the result. 4649e41f4b71Sopenharmony_ci 4650e41f4b71Sopenharmony_ci**System API**: This is a system API. 4651e41f4b71Sopenharmony_ci 4652e41f4b71Sopenharmony_ci**Required Permissions**: ohos.permission.PLACE_CALL 4653e41f4b71Sopenharmony_ci 4654e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4655e41f4b71Sopenharmony_ci 4656e41f4b71Sopenharmony_ci**Parameters** 4657e41f4b71Sopenharmony_ci 4658e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 4659e41f4b71Sopenharmony_ci| ----------- | ---------------------------- | ---- | ----------------------------------------- | 4660e41f4b71Sopenharmony_ci| inputCode | string | Yes | Secret code, for example, *#*#2846579#*#* (project menu).| 4661e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result. | 4662e41f4b71Sopenharmony_ci 4663e41f4b71Sopenharmony_ci**Error codes** 4664e41f4b71Sopenharmony_ci 4665e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 4666e41f4b71Sopenharmony_ci 4667e41f4b71Sopenharmony_ci| ID| Error Message | 4668e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 4669e41f4b71Sopenharmony_ci| 201 | Permission denied. | 4670e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 4671e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 4672e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 4673e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 4674e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 4675e41f4b71Sopenharmony_ci 4676e41f4b71Sopenharmony_ci**Example** 4677e41f4b71Sopenharmony_ci 4678e41f4b71Sopenharmony_ci```ts 4679e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 4680e41f4b71Sopenharmony_ci 4681e41f4b71Sopenharmony_cicall.inputDialerSpecialCode('*#*#2846579#*#*', (err: BusinessError) => { 4682e41f4b71Sopenharmony_ci if (err) { 4683e41f4b71Sopenharmony_ci console.error(`inputDialerSpecialCode fail, err->${JSON.stringify(err)}`); 4684e41f4b71Sopenharmony_ci } else { 4685e41f4b71Sopenharmony_ci console.log(`inputDialerSpecialCode success`); 4686e41f4b71Sopenharmony_ci } 4687e41f4b71Sopenharmony_ci}); 4688e41f4b71Sopenharmony_ci``` 4689e41f4b71Sopenharmony_ci 4690e41f4b71Sopenharmony_ci## call.inputDialerSpecialCode<sup>10+</sup> 4691e41f4b71Sopenharmony_ci 4692e41f4b71Sopenharmony_ciinputDialerSpecialCode\(inputCode: string\): Promise\<void\> 4693e41f4b71Sopenharmony_ci 4694e41f4b71Sopenharmony_ciPerforms a secret code broadcast. This API uses a promise to return the result. 4695e41f4b71Sopenharmony_ci 4696e41f4b71Sopenharmony_ci**System API**: This is a system API. 4697e41f4b71Sopenharmony_ci 4698e41f4b71Sopenharmony_ci**Required Permissions**: ohos.permission.PLACE_CALL 4699e41f4b71Sopenharmony_ci 4700e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4701e41f4b71Sopenharmony_ci 4702e41f4b71Sopenharmony_ci**Parameters** 4703e41f4b71Sopenharmony_ci 4704e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 4705e41f4b71Sopenharmony_ci| ----------- | ---------------------------- | ---- | ----------------------------------------- | 4706e41f4b71Sopenharmony_ci| inputCode | string | Yes | Secret code, for example, *#*#2846579#*#* (project menu).| 4707e41f4b71Sopenharmony_ci 4708e41f4b71Sopenharmony_ci**Return value** 4709e41f4b71Sopenharmony_ci 4710e41f4b71Sopenharmony_ci| Type | Description | 4711e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 4712e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 4713e41f4b71Sopenharmony_ci 4714e41f4b71Sopenharmony_ci**Error codes** 4715e41f4b71Sopenharmony_ci 4716e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 4717e41f4b71Sopenharmony_ci 4718e41f4b71Sopenharmony_ci| ID| Error Message | 4719e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 4720e41f4b71Sopenharmony_ci| 201 | Permission denied. | 4721e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 4722e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 4723e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 4724e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 4725e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 4726e41f4b71Sopenharmony_ci 4727e41f4b71Sopenharmony_ci**Example** 4728e41f4b71Sopenharmony_ci 4729e41f4b71Sopenharmony_ci```ts 4730e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 4731e41f4b71Sopenharmony_ci 4732e41f4b71Sopenharmony_citry { 4733e41f4b71Sopenharmony_ci call.inputDialerSpecialCode('*#*#2846579#*#*'); 4734e41f4b71Sopenharmony_ci console.log(`inputDialerSpecialCode success`); 4735e41f4b71Sopenharmony_ci} catch (error) { 4736e41f4b71Sopenharmony_ci console.error(`inputDialerSpecialCode fail, promise: err->${JSON.stringify(error)}`); 4737e41f4b71Sopenharmony_ci} 4738e41f4b71Sopenharmony_ci``` 4739e41f4b71Sopenharmony_ci 4740e41f4b71Sopenharmony_ci 4741e41f4b71Sopenharmony_ci## call.removeMissedIncomingCallNotification<sup>10+</sup> 4742e41f4b71Sopenharmony_ci 4743e41f4b71Sopenharmony_ciremoveMissedIncomingCallNotification\(callback: AsyncCallback\<void\>\): void 4744e41f4b71Sopenharmony_ci 4745e41f4b71Sopenharmony_ciRemoves missed call notifications. This API uses an asynchronous callback to return the result. 4746e41f4b71Sopenharmony_ci 4747e41f4b71Sopenharmony_ci**System API**: This is a system API. 4748e41f4b71Sopenharmony_ci 4749e41f4b71Sopenharmony_ci**Required permissions**: ohos.permission.SET_TELEPHONY_STATE, ohos.permission.READ_CALL_LOG, and ohos.permission.WRITE_CALL_LOG 4750e41f4b71Sopenharmony_ci 4751e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4752e41f4b71Sopenharmony_ci 4753e41f4b71Sopenharmony_ci**Parameters** 4754e41f4b71Sopenharmony_ci 4755e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 4756e41f4b71Sopenharmony_ci| ----------- | ---------------------------- | ---- | --------------------------------------- | 4757e41f4b71Sopenharmony_ci| callback | AsyncCallback<void> | Yes | Callback used to return the result. | 4758e41f4b71Sopenharmony_ci 4759e41f4b71Sopenharmony_ci**Error codes** 4760e41f4b71Sopenharmony_ci 4761e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 4762e41f4b71Sopenharmony_ci 4763e41f4b71Sopenharmony_ci| ID| Error Message | 4764e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 4765e41f4b71Sopenharmony_ci| 201 | Permission denied. | 4766e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 4767e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 4768e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 4769e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 4770e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 4771e41f4b71Sopenharmony_ci 4772e41f4b71Sopenharmony_ci**Example** 4773e41f4b71Sopenharmony_ci 4774e41f4b71Sopenharmony_ci```ts 4775e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 4776e41f4b71Sopenharmony_ci 4777e41f4b71Sopenharmony_cicall.removeMissedIncomingCallNotification((err: BusinessError) => { 4778e41f4b71Sopenharmony_ci if (err) { 4779e41f4b71Sopenharmony_ci console.error(`removeMissedIncomingCallNotification failed, err->${JSON.stringify(err)}`); 4780e41f4b71Sopenharmony_ci } else { 4781e41f4b71Sopenharmony_ci console.log(`removeMissedIncomingCallNotification success`); 4782e41f4b71Sopenharmony_ci } 4783e41f4b71Sopenharmony_ci}); 4784e41f4b71Sopenharmony_ci``` 4785e41f4b71Sopenharmony_ci 4786e41f4b71Sopenharmony_ci 4787e41f4b71Sopenharmony_ci## call.removeMissedIncomingCallNotification<sup>10+</sup> 4788e41f4b71Sopenharmony_ci 4789e41f4b71Sopenharmony_ciremoveMissedIncomingCallNotification\(\): Promise\<void\> 4790e41f4b71Sopenharmony_ci 4791e41f4b71Sopenharmony_ciRemoves missed call notifications. This API uses a promise to return the result. 4792e41f4b71Sopenharmony_ci 4793e41f4b71Sopenharmony_ci**System API**: This is a system API. 4794e41f4b71Sopenharmony_ci 4795e41f4b71Sopenharmony_ci**Required permissions**: ohos.permission.SET_TELEPHONY_STATE, ohos.permission.READ_CALL_LOG, and ohos.permission.WRITE_CALL_LOG 4796e41f4b71Sopenharmony_ci 4797e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4798e41f4b71Sopenharmony_ci 4799e41f4b71Sopenharmony_ci**Return value** 4800e41f4b71Sopenharmony_ci 4801e41f4b71Sopenharmony_ci| Type | Description | 4802e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 4803e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 4804e41f4b71Sopenharmony_ci 4805e41f4b71Sopenharmony_ci**Error codes** 4806e41f4b71Sopenharmony_ci 4807e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 4808e41f4b71Sopenharmony_ci 4809e41f4b71Sopenharmony_ci| ID| Error Message | 4810e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 4811e41f4b71Sopenharmony_ci| 201 | Permission denied. | 4812e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 4813e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 4814e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 4815e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 4816e41f4b71Sopenharmony_ci 4817e41f4b71Sopenharmony_ci**Example** 4818e41f4b71Sopenharmony_ci 4819e41f4b71Sopenharmony_ci```ts 4820e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 4821e41f4b71Sopenharmony_ci 4822e41f4b71Sopenharmony_cicall.removeMissedIncomingCallNotification().then(() => { 4823e41f4b71Sopenharmony_ci console.log(`removeMissedIncomingCallNotification success`); 4824e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 4825e41f4b71Sopenharmony_ci console.error(`removeMissedIncomingCallNotification failed, promise: err->${JSON.stringify(err)}`); 4826e41f4b71Sopenharmony_ci}); 4827e41f4b71Sopenharmony_ci``` 4828e41f4b71Sopenharmony_ci 4829e41f4b71Sopenharmony_ci## call.sendCallUiEvent<sup>12+</sup> 4830e41f4b71Sopenharmony_ci 4831e41f4b71Sopenharmony_cisendCallUiEvent\(callId: number, eventName: string\): Promise\<void\> 4832e41f4b71Sopenharmony_ci 4833e41f4b71Sopenharmony_ciSends a call UI event. This API uses a promise to return the result. 4834e41f4b71Sopenharmony_ci 4835e41f4b71Sopenharmony_ci**System API**: This is a system API. 4836e41f4b71Sopenharmony_ci 4837e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 4838e41f4b71Sopenharmony_ci 4839e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4840e41f4b71Sopenharmony_ci 4841e41f4b71Sopenharmony_ci**Parameters** 4842e41f4b71Sopenharmony_ci 4843e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 4844e41f4b71Sopenharmony_ci| --------- | ------ | ---- | -------- | 4845e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID.| 4846e41f4b71Sopenharmony_ci| eventName | string | Yes | Event name.| 4847e41f4b71Sopenharmony_ci 4848e41f4b71Sopenharmony_ci**Return value** 4849e41f4b71Sopenharmony_ci 4850e41f4b71Sopenharmony_ci| Type | Description | 4851e41f4b71Sopenharmony_ci| ------------------- | ----------------------- | 4852e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 4853e41f4b71Sopenharmony_ci 4854e41f4b71Sopenharmony_ci**Error codes** 4855e41f4b71Sopenharmony_ci 4856e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 4857e41f4b71Sopenharmony_ci 4858e41f4b71Sopenharmony_ci| ID| Error Message | 4859e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 4860e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 4861e41f4b71Sopenharmony_ci| 401 | Parameter error. | 4862e41f4b71Sopenharmony_ci| 801 | Capability not supported. | 4863e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 4864e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 4865e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 4866e41f4b71Sopenharmony_ci 4867e41f4b71Sopenharmony_ci**Example** 4868e41f4b71Sopenharmony_ci 4869e41f4b71Sopenharmony_ci```ts 4870e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 4871e41f4b71Sopenharmony_ci 4872e41f4b71Sopenharmony_cilet callId: number = 0; 4873e41f4b71Sopenharmony_cicall.sendCallUiEvent(callId, 'eventName').then(() => { 4874e41f4b71Sopenharmony_ci console.log(`sendCallUiEvent success.`); 4875e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 4876e41f4b71Sopenharmony_ci console.error(`sendCallUiEvent fail, promise: err->${JSON.stringify(err)}`); 4877e41f4b71Sopenharmony_ci}); 4878e41f4b71Sopenharmony_ci``` 4879e41f4b71Sopenharmony_ci 4880e41f4b71Sopenharmony_ci## DialOptions 4881e41f4b71Sopenharmony_ci 4882e41f4b71Sopenharmony_ciProvides an option for determining whether a call is a video call. 4883e41f4b71Sopenharmony_ci 4884e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4885e41f4b71Sopenharmony_ci 4886e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 4887e41f4b71Sopenharmony_ci| ------------------------ | ---------------------------------- | ---- | ----------------------------------------------------------------------------------------------- | 4888e41f4b71Sopenharmony_ci| accountId <sup>8+</sup> | number | No | Account ID.<br>- **0**: card slot 1<br>- **1**: card slot 2<br> This is a system API. | 4889e41f4b71Sopenharmony_ci| videoState <sup>8+</sup> | [VideoStateType](#videostatetype7) | No | Video state type. This is a system API. | 4890e41f4b71Sopenharmony_ci| dialScene <sup>8+</sup> | [DialScene](#dialscene8) | No | Dialup scenario. This is a system API. | 4891e41f4b71Sopenharmony_ci| dialType <sup>8+</sup> | [DialType](#dialtype8) | No | Dialup type. This is a system API. | 4892e41f4b71Sopenharmony_ci 4893e41f4b71Sopenharmony_ci## DialCallOptions<sup>9+</sup> 4894e41f4b71Sopenharmony_ci 4895e41f4b71Sopenharmony_ciProvides an option for determining whether a call is a video call. 4896e41f4b71Sopenharmony_ci 4897e41f4b71Sopenharmony_ci**System API**: This is a system API. 4898e41f4b71Sopenharmony_ci 4899e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4900e41f4b71Sopenharmony_ci 4901e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 4902e41f4b71Sopenharmony_ci| ------------------------ | ---------------------------------- | ---- | ------------------------------------------- | 4903e41f4b71Sopenharmony_ci| accountId <sup>9+</sup> | number | No | Account ID.<br>- **0**: card slot 1<br>- **1**: card slot 2<br> | 4904e41f4b71Sopenharmony_ci| videoState <sup>9+</sup> | [VideoStateType](#videostatetype7) | No | Video state type. | 4905e41f4b71Sopenharmony_ci| dialScene <sup>9+</sup> | [DialScene](#dialscene8) | No | Dialup scenario. | 4906e41f4b71Sopenharmony_ci| dialType <sup>9+</sup> | [DialType](#dialtype8) | No | Dialup type. | 4907e41f4b71Sopenharmony_ci 4908e41f4b71Sopenharmony_ci 4909e41f4b71Sopenharmony_ci## ImsCallMode<sup>8+</sup> 4910e41f4b71Sopenharmony_ci 4911e41f4b71Sopenharmony_ciEnumerates IMS call modes. 4912e41f4b71Sopenharmony_ci 4913e41f4b71Sopenharmony_ci**System API**: This is a system API. 4914e41f4b71Sopenharmony_ci 4915e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4916e41f4b71Sopenharmony_ci 4917e41f4b71Sopenharmony_ci| Name | Value | Description | 4918e41f4b71Sopenharmony_ci| ---------------------- | ---- | ------------------ | 4919e41f4b71Sopenharmony_ci| CALL_MODE_AUDIO_ONLY | 0 | Audio call only. | 4920e41f4b71Sopenharmony_ci| CALL_MODE_SEND_ONLY | 1 | Sending calls only. | 4921e41f4b71Sopenharmony_ci| CALL_MODE_RECEIVE_ONLY | 2 | Receiving calls only. | 4922e41f4b71Sopenharmony_ci| CALL_MODE_SEND_RECEIVE | 3 | Sending and receiving calls.| 4923e41f4b71Sopenharmony_ci| CALL_MODE_VIDEO_PAUSED | 4 | Pausing video calls. | 4924e41f4b71Sopenharmony_ci 4925e41f4b71Sopenharmony_ci## VoNRState<sup>10+</sup> 4926e41f4b71Sopenharmony_ci 4927e41f4b71Sopenharmony_ciEnumerates VoNR switch states. 4928e41f4b71Sopenharmony_ci 4929e41f4b71Sopenharmony_ci**System API**: This is a system API. 4930e41f4b71Sopenharmony_ci 4931e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4932e41f4b71Sopenharmony_ci 4933e41f4b71Sopenharmony_ci| Name | Value | Description | 4934e41f4b71Sopenharmony_ci| ---------------------- | ---- | ----------------- | 4935e41f4b71Sopenharmony_ci| VONR_STATE_OFF | 0 | Disabled. | 4936e41f4b71Sopenharmony_ci| VONR_STATE_ON | 1 | Enabled. | 4937e41f4b71Sopenharmony_ci 4938e41f4b71Sopenharmony_ci## AudioDevice<sup>10+</sup> 4939e41f4b71Sopenharmony_ci 4940e41f4b71Sopenharmony_ciEnumerates audio devices. 4941e41f4b71Sopenharmony_ci 4942e41f4b71Sopenharmony_ci**System API**: This is a system API. 4943e41f4b71Sopenharmony_ci 4944e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4945e41f4b71Sopenharmony_ci 4946e41f4b71Sopenharmony_ci| Name | Type | Mandatory | Description | 4947e41f4b71Sopenharmony_ci| --------------------------------- | ------------------------------------- | ---- | ---------------- | 4948e41f4b71Sopenharmony_ci| deviceType <sup>10+</sup> | [AudioDeviceType](#audiodevicetype10) | Yes | Audio device type. | 4949e41f4b71Sopenharmony_ci| address <sup>10+</sup> | string | No | Audio device address. | 4950e41f4b71Sopenharmony_ci| deviceName <sup>11+</sup> | string | No | Audio device name. | 4951e41f4b71Sopenharmony_ci 4952e41f4b71Sopenharmony_ci## AudioDeviceType<sup>10+</sup> 4953e41f4b71Sopenharmony_ci 4954e41f4b71Sopenharmony_ciEnumerates audio device types. 4955e41f4b71Sopenharmony_ci 4956e41f4b71Sopenharmony_ci**System API**: This is a system API. 4957e41f4b71Sopenharmony_ci 4958e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4959e41f4b71Sopenharmony_ci 4960e41f4b71Sopenharmony_ci| Name | Value | Description | 4961e41f4b71Sopenharmony_ci| -------------------- | ---- | ----------- | 4962e41f4b71Sopenharmony_ci| DEVICE_EARPIECE | 0 | Headset device. | 4963e41f4b71Sopenharmony_ci| DEVICE_SPEAKER | 1 | Speaker device. | 4964e41f4b71Sopenharmony_ci| DEVICE_WIRED_HEADSET | 2 | Wired headset device.| 4965e41f4b71Sopenharmony_ci| DEVICE_BLUETOOTH_SCO | 3 | Bluetooth SCO device. | 4966e41f4b71Sopenharmony_ci| DEVICE_DISTRIBUTED_AUTOMOTIVE<sup>11+</sup> | 4 | Distributed head unit.| 4967e41f4b71Sopenharmony_ci 4968e41f4b71Sopenharmony_ci## AudioDeviceCallbackInfo<sup>10+</sup> 4969e41f4b71Sopenharmony_ci 4970e41f4b71Sopenharmony_ciDefines the audio device information. 4971e41f4b71Sopenharmony_ci 4972e41f4b71Sopenharmony_ci**System API**: This is a system API. 4973e41f4b71Sopenharmony_ci 4974e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4975e41f4b71Sopenharmony_ci 4976e41f4b71Sopenharmony_ci| Name | Type | Mandatory | Description | 4977e41f4b71Sopenharmony_ci| --------------------------------- | ------------------------------------- | ---- | ---------------- | 4978e41f4b71Sopenharmony_ci| audioDeviceList <sup>10+</sup> | [Array\<AudioDevice\>](#audiodevice10) | Yes | Audio device list. | 4979e41f4b71Sopenharmony_ci| currentAudioDevice <sup>10+</sup> | [AudioDevice](#audiodevice10) | Yes | Current audio device. | 4980e41f4b71Sopenharmony_ci| isMuted <sup>10+</sup> | boolean | Yes | Whether the audio device is muted. | 4981e41f4b71Sopenharmony_ci 4982e41f4b71Sopenharmony_ci 4983e41f4b71Sopenharmony_ci## CallRestrictionType<sup>8+</sup> 4984e41f4b71Sopenharmony_ci 4985e41f4b71Sopenharmony_ciEnumerates call restriction types. 4986e41f4b71Sopenharmony_ci 4987e41f4b71Sopenharmony_ci**System API**: This is a system API. 4988e41f4b71Sopenharmony_ci 4989e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 4990e41f4b71Sopenharmony_ci 4991e41f4b71Sopenharmony_ci| Name | Value | Description | 4992e41f4b71Sopenharmony_ci| --------------------------------------------- | ---- | -------------------------- | 4993e41f4b71Sopenharmony_ci| RESTRICTION_TYPE_ALL_INCOMING | 0 | Barring of all incoming calls. | 4994e41f4b71Sopenharmony_ci| RESTRICTION_TYPE_ALL_OUTGOING | 1 | Barring of all outgoing calls. | 4995e41f4b71Sopenharmony_ci| RESTRICTION_TYPE_INTERNATIONAL | 2 | Barring of international calls. | 4996e41f4b71Sopenharmony_ci| RESTRICTION_TYPE_INTERNATIONAL_EXCLUDING_HOME | 3 | Barring of international calls except those in the home country.| 4997e41f4b71Sopenharmony_ci| RESTRICTION_TYPE_ROAMING_INCOMING | 4 | Barring of incoming roaming calls. | 4998e41f4b71Sopenharmony_ci| RESTRICTION_TYPE_ALL_CALLS | 5 | Barring of all calls. | 4999e41f4b71Sopenharmony_ci| RESTRICTION_TYPE_OUTGOING_SERVICES | 6 | Barring of outgoing services. | 5000e41f4b71Sopenharmony_ci| RESTRICTION_TYPE_INCOMING_SERVICES | 7 | Barring of incoming services. | 5001e41f4b71Sopenharmony_ci 5002e41f4b71Sopenharmony_ci## CallTransferInfo<sup>8+</sup> 5003e41f4b71Sopenharmony_ci 5004e41f4b71Sopenharmony_ciDefines the call transfer information. 5005e41f4b71Sopenharmony_ci 5006e41f4b71Sopenharmony_ci**System API**: This is a system API. 5007e41f4b71Sopenharmony_ci 5008e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5009e41f4b71Sopenharmony_ci 5010e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 5011e41f4b71Sopenharmony_ci| ------------------------ | ---------------------------------------------------- | ---- | ---------------- | 5012e41f4b71Sopenharmony_ci| transferNum | string | Yes | Call transfer number. | 5013e41f4b71Sopenharmony_ci| type | [CallTransferType](#calltransfertype8) | Yes | Call transfer type. | 5014e41f4b71Sopenharmony_ci| settingType | [CallTransferSettingType](#calltransfersettingtype8) | Yes | Call transfer setting type.| 5015e41f4b71Sopenharmony_ci| startHour<sup>9+</sup> | number | No | Hour in the start time.| 5016e41f4b71Sopenharmony_ci| startMinute<sup>9+</sup> | number | No | Minute in the start time.| 5017e41f4b71Sopenharmony_ci| endHour<sup>9+</sup> | number | No | Hour in the end time.| 5018e41f4b71Sopenharmony_ci| endMinute<sup>9+</sup> | number | No | Minute in the end time.| 5019e41f4b71Sopenharmony_ci 5020e41f4b71Sopenharmony_ci## CallTransferType<sup>8+</sup> 5021e41f4b71Sopenharmony_ci 5022e41f4b71Sopenharmony_ciEnumerates call transfer types. 5023e41f4b71Sopenharmony_ci 5024e41f4b71Sopenharmony_ci**System API**: This is a system API. 5025e41f4b71Sopenharmony_ci 5026e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5027e41f4b71Sopenharmony_ci 5028e41f4b71Sopenharmony_ci| Name | Value | Description | 5029e41f4b71Sopenharmony_ci| --------------------------- | ---- | ------------ | 5030e41f4b71Sopenharmony_ci| TRANSFER_TYPE_UNCONDITIONAL | 0 | Call forwarding unconditional. | 5031e41f4b71Sopenharmony_ci| TRANSFER_TYPE_BUSY | 1 | Call forwarding busy. | 5032e41f4b71Sopenharmony_ci| TRANSFER_TYPE_NO_REPLY | 2 | Call forwarding on no reply. | 5033e41f4b71Sopenharmony_ci| TRANSFER_TYPE_NOT_REACHABLE | 3 | Call forwarding on no user not reachable.| 5034e41f4b71Sopenharmony_ci 5035e41f4b71Sopenharmony_ci## CallTransferSettingType<sup>8+</sup> 5036e41f4b71Sopenharmony_ci 5037e41f4b71Sopenharmony_ciEnumerates call transfer setting types. 5038e41f4b71Sopenharmony_ci 5039e41f4b71Sopenharmony_ci**System API**: This is a system API. 5040e41f4b71Sopenharmony_ci 5041e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5042e41f4b71Sopenharmony_ci 5043e41f4b71Sopenharmony_ci| Name | Value | Description | 5044e41f4b71Sopenharmony_ci| -------------------------- | ---- | ------------ | 5045e41f4b71Sopenharmony_ci| CALL_TRANSFER_DISABLE | 0 | Disabling of call transfer.| 5046e41f4b71Sopenharmony_ci| CALL_TRANSFER_ENABLE | 1 | Enabling of call transfer.| 5047e41f4b71Sopenharmony_ci| CALL_TRANSFER_REGISTRATION | 3 | Registration of call transfer.| 5048e41f4b71Sopenharmony_ci| CALL_TRANSFER_ERASURE | 4 | Erasing of call transfer.| 5049e41f4b71Sopenharmony_ci 5050e41f4b71Sopenharmony_ci## CallAttributeOptions<sup>7+</sup> 5051e41f4b71Sopenharmony_ci 5052e41f4b71Sopenharmony_ciDefines the call attribute options. 5053e41f4b71Sopenharmony_ci 5054e41f4b71Sopenharmony_ci**System API**: This is a system API. 5055e41f4b71Sopenharmony_ci 5056e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5057e41f4b71Sopenharmony_ci 5058e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 5059e41f4b71Sopenharmony_ci| --------------- | ---------------------------------------- | ---- | -------------- | 5060e41f4b71Sopenharmony_ci| accountNumber | string | Yes | Account number. | 5061e41f4b71Sopenharmony_ci| speakerphoneOn | boolean | Yes | Speakerphone on.| 5062e41f4b71Sopenharmony_ci| accountId | number | Yes | Account ID. | 5063e41f4b71Sopenharmony_ci| videoState | [VideoStateType](#videostatetype7) | Yes | Video state type. | 5064e41f4b71Sopenharmony_ci| startTime | number | Yes | Start time. | 5065e41f4b71Sopenharmony_ci| isEcc | boolean | Yes | Whether the call is an ECC. | 5066e41f4b71Sopenharmony_ci| callType | [CallType](#calltype7) | Yes | Call type. | 5067e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 5068e41f4b71Sopenharmony_ci| callState | [DetailedCallState](#detailedcallstate7) | Yes | Detailed call state. | 5069e41f4b71Sopenharmony_ci| conferenceState | [ConferenceState](#conferencestate7) | Yes | Conference state. | 5070e41f4b71Sopenharmony_ci| voipCallAttribute<sup>11+</sup> | [VoipCallAttribute](#voipcallattribute11) | No | VoIP call information. | 5071e41f4b71Sopenharmony_ci| crsType<sup>11+</sup> | number | Yes | Video RBT type.| 5072e41f4b71Sopenharmony_ci| originalCallType<sup>11+</sup> | number | Yes | Original call type of the Video RBT service.| 5073e41f4b71Sopenharmony_ci| numberLocation<sup>12+</sup> | string | No| Home location area of the number.| 5074e41f4b71Sopenharmony_ci| numberMarkInfo<sup>12+</sup> | [NumberMarkInfo](#numbermarkinfo12) | No| Number mark.| 5075e41f4b71Sopenharmony_ci 5076e41f4b71Sopenharmony_ci## VoipCallAttribute<sup>11+</sup> 5077e41f4b71Sopenharmony_ci 5078e41f4b71Sopenharmony_ciDefines the VoIP call information. 5079e41f4b71Sopenharmony_ci 5080e41f4b71Sopenharmony_ci**System API**: This is a system API. 5081e41f4b71Sopenharmony_ci 5082e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5083e41f4b71Sopenharmony_ci 5084e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 5085e41f4b71Sopenharmony_ci| --------------- | ------------------- | ---- | -------------- | 5086e41f4b71Sopenharmony_ci| voipCallId | string | Yes | Unique ID of a VoIP call. | 5087e41f4b71Sopenharmony_ci| userName | string | Yes | User nickname.| 5088e41f4b71Sopenharmony_ci| userProfile | [image.PixelMap](../apis-image-kit/js-apis-image.md#pixelmap7) | Yes | User profile picture. | 5089e41f4b71Sopenharmony_ci| extensionId | string | Yes | Process ID of the third-party application. | 5090e41f4b71Sopenharmony_ci| abilityName | string | Yes | Ability name of the third-party application. | 5091e41f4b71Sopenharmony_ci| voipBundleName | string | Yes | Bundle name of the third-party application. | 5092e41f4b71Sopenharmony_ci| showBannerForIncomingCall<sup>12+</sup> | boolean | No | Whether to display the incoming call banner. | 5093e41f4b71Sopenharmony_ci| isConferenceCall<sup>12+</sup> | boolean | No | Whether the call is a conference call. | 5094e41f4b71Sopenharmony_ci| isVoiceAnswerSupported<sup>12+</sup> | boolean | No | Whether call answering with voice commands is supported. | 5095e41f4b71Sopenharmony_ci 5096e41f4b71Sopenharmony_ci## ConferenceState<sup>7+</sup> 5097e41f4b71Sopenharmony_ci 5098e41f4b71Sopenharmony_ciEnumerates conference states. 5099e41f4b71Sopenharmony_ci 5100e41f4b71Sopenharmony_ci**System API**: This is a system API. 5101e41f4b71Sopenharmony_ci 5102e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5103e41f4b71Sopenharmony_ci 5104e41f4b71Sopenharmony_ci| Name | Value | Description | 5105e41f4b71Sopenharmony_ci| ---------------------------- | ---- | -------------- | 5106e41f4b71Sopenharmony_ci| TEL_CONFERENCE_IDLE | 0 | Idle state. | 5107e41f4b71Sopenharmony_ci| TEL_CONFERENCE_ACTIVE | 1 | Active state. | 5108e41f4b71Sopenharmony_ci| TEL_CONFERENCE_DISCONNECTING | 2 | Disconnecting state. | 5109e41f4b71Sopenharmony_ci| TEL_CONFERENCE_DISCONNECTED | 3 | Disconnected state.| 5110e41f4b71Sopenharmony_ci 5111e41f4b71Sopenharmony_ci## CallType<sup>7+</sup> 5112e41f4b71Sopenharmony_ci 5113e41f4b71Sopenharmony_ciEnumerates call types. 5114e41f4b71Sopenharmony_ci 5115e41f4b71Sopenharmony_ci**System API**: This is a system API. 5116e41f4b71Sopenharmony_ci 5117e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5118e41f4b71Sopenharmony_ci 5119e41f4b71Sopenharmony_ci| Name | Value | Description | 5120e41f4b71Sopenharmony_ci| ------------- | ---- | ------------ | 5121e41f4b71Sopenharmony_ci| TYPE_CS | 0 | CS call. | 5122e41f4b71Sopenharmony_ci| TYPE_IMS | 1 | IMS call. | 5123e41f4b71Sopenharmony_ci| TYPE_OTT | 2 | OTT call. | 5124e41f4b71Sopenharmony_ci| TYPE_ERR_CALL | 3 | Error call type.| 5125e41f4b71Sopenharmony_ci| TYPE_VOIP<sup>11+</sup> | 4 | VoIP call.| 5126e41f4b71Sopenharmony_ci 5127e41f4b71Sopenharmony_ci## VideoStateType<sup>7+</sup> 5128e41f4b71Sopenharmony_ci 5129e41f4b71Sopenharmony_ciVideo state type. 5130e41f4b71Sopenharmony_ci 5131e41f4b71Sopenharmony_ci**System API**: This is a system API. 5132e41f4b71Sopenharmony_ci 5133e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5134e41f4b71Sopenharmony_ci 5135e41f4b71Sopenharmony_ci| Name | Value | Description | 5136e41f4b71Sopenharmony_ci| ------------------------------------- | ---- | --------| 5137e41f4b71Sopenharmony_ci| TYPE_VOICE | 0 | Voice state.| 5138e41f4b71Sopenharmony_ci| TYPE_VIDEO_SEND_ONLY<sup>11+</sup> | 1 | Data sending only during a video call.| 5139e41f4b71Sopenharmony_ci| TYPE_VIDEO_RECEIVE_ONLY<sup>11+</sup> | 2 | Data receiving only during a video call.| 5140e41f4b71Sopenharmony_ci| TYPE_VIDEO | 3 | Video state.| 5141e41f4b71Sopenharmony_ci| TYPE_VIDEO_BIDIRECTIONAL<sup>11+</sup>| 4 | Data receiving/sending status during a video call.| 5142e41f4b71Sopenharmony_ci 5143e41f4b71Sopenharmony_ci## DetailedCallState<sup>7+</sup> 5144e41f4b71Sopenharmony_ci 5145e41f4b71Sopenharmony_ciEnumerates detailed call states. 5146e41f4b71Sopenharmony_ci 5147e41f4b71Sopenharmony_ci**System API**: This is a system API. 5148e41f4b71Sopenharmony_ci 5149e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5150e41f4b71Sopenharmony_ci 5151e41f4b71Sopenharmony_ci| Name | Value | Description | 5152e41f4b71Sopenharmony_ci| ------------------------- | ---- | -------------- | 5153e41f4b71Sopenharmony_ci| CALL_STATUS_ACTIVE | 0 | Active state. | 5154e41f4b71Sopenharmony_ci| CALL_STATUS_HOLDING | 1 | Hold state. | 5155e41f4b71Sopenharmony_ci| CALL_STATUS_DIALING | 2 | Dialing state. | 5156e41f4b71Sopenharmony_ci| CALL_STATUS_ALERTING | 3 | Alerting state. | 5157e41f4b71Sopenharmony_ci| CALL_STATUS_INCOMING | 4 | Incoming state. | 5158e41f4b71Sopenharmony_ci| CALL_STATUS_WAITING | 5 | Waiting state. | 5159e41f4b71Sopenharmony_ci| CALL_STATUS_DISCONNECTED | 6 | Disconnected state.| 5160e41f4b71Sopenharmony_ci| CALL_STATUS_DISCONNECTING | 7 | Disconnecting state. | 5161e41f4b71Sopenharmony_ci| CALL_STATUS_IDLE | 8 | Idle state. | 5162e41f4b71Sopenharmony_ci 5163e41f4b71Sopenharmony_ci## CallRestrictionInfo<sup>8+</sup> 5164e41f4b71Sopenharmony_ci 5165e41f4b71Sopenharmony_ciDefines the call restriction information. 5166e41f4b71Sopenharmony_ci 5167e41f4b71Sopenharmony_ci**System API**: This is a system API. 5168e41f4b71Sopenharmony_ci 5169e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5170e41f4b71Sopenharmony_ci 5171e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 5172e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | ---- | ------------ | 5173e41f4b71Sopenharmony_ci| type | [CallRestrictionType](#callrestrictiontype8) | Yes | Call restriction type.| 5174e41f4b71Sopenharmony_ci| password | string | Yes | Password. | 5175e41f4b71Sopenharmony_ci| mode | [CallRestrictionMode](#callrestrictionmode8) | Yes | Call restriction mode.| 5176e41f4b71Sopenharmony_ci 5177e41f4b71Sopenharmony_ci## CallRestrictionMode<sup>8+</sup> 5178e41f4b71Sopenharmony_ci 5179e41f4b71Sopenharmony_ciEnumerates call restriction modes. 5180e41f4b71Sopenharmony_ci 5181e41f4b71Sopenharmony_ci**System API**: This is a system API. 5182e41f4b71Sopenharmony_ci 5183e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5184e41f4b71Sopenharmony_ci 5185e41f4b71Sopenharmony_ci| Name | Value | Description | 5186e41f4b71Sopenharmony_ci| ----------------------------- | ---- | ------------ | 5187e41f4b71Sopenharmony_ci| RESTRICTION_MODE_DEACTIVATION | 0 | Call restriction deactivated.| 5188e41f4b71Sopenharmony_ci| RESTRICTION_MODE_ACTIVATION | 1 | Call restriction activated.| 5189e41f4b71Sopenharmony_ci 5190e41f4b71Sopenharmony_ci## CallEventOptions<sup>8+</sup> 5191e41f4b71Sopenharmony_ci 5192e41f4b71Sopenharmony_ciDefines the call event options. 5193e41f4b71Sopenharmony_ci 5194e41f4b71Sopenharmony_ci**System API**: This is a system API. 5195e41f4b71Sopenharmony_ci 5196e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5197e41f4b71Sopenharmony_ci 5198e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 5199e41f4b71Sopenharmony_ci| ------- | ------------------------------------------ | ---- | -------------- | 5200e41f4b71Sopenharmony_ci| eventId | [CallAbilityEventId](#callabilityeventid8) | Yes | Call ability event ID.| 5201e41f4b71Sopenharmony_ci 5202e41f4b71Sopenharmony_ci## CallAbilityEventId<sup>8+</sup> 5203e41f4b71Sopenharmony_ci 5204e41f4b71Sopenharmony_ciEnumerates call ability event IDs. 5205e41f4b71Sopenharmony_ci 5206e41f4b71Sopenharmony_ci**System API**: This is a system API. 5207e41f4b71Sopenharmony_ci 5208e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5209e41f4b71Sopenharmony_ci 5210e41f4b71Sopenharmony_ci| Name | Value | Description | 5211e41f4b71Sopenharmony_ci| ------------------------------------- | ---- | --------------- | 5212e41f4b71Sopenharmony_ci| EVENT_DIAL_NO_CARRIER | 1 | No available carrier during dialing. | 5213e41f4b71Sopenharmony_ci| EVENT_INVALID_FDN_NUMBER | 2 | Invalid FDN.| 5214e41f4b71Sopenharmony_ci| EVENT_HOLD_CALL_FAILED<sup>11+</sup> | 3 | Failed to place the call on hold.| 5215e41f4b71Sopenharmony_ci| EVENT_SWAP_CALL_FAILED<sup>11+</sup> | 4 | Failed to place the current call on hold and answer the waiting call.| 5216e41f4b71Sopenharmony_ci| EVENT_COMBINE_CALL_FAILED<sup>11+</sup> | 5 | Failed to combine calls.| 5217e41f4b71Sopenharmony_ci| EVENT_SPLIT_CALL_FAILED<sup>11+</sup> | 6 | Failed to split the call.| 5218e41f4b71Sopenharmony_ci| EVENT_SHOW_FULL_SCREEN<sup>12+</sup> | 7 | Displaying the call UI in full screen. | 5219e41f4b71Sopenharmony_ci| EVENT_SHOW_FLOAT_WINDOW<sup>12+</sup> | 8 | Displaying the call UI in a floating widow.| 5220e41f4b71Sopenharmony_ci 5221e41f4b71Sopenharmony_ci## DialScene<sup>8+</sup> 5222e41f4b71Sopenharmony_ci 5223e41f4b71Sopenharmony_ciEnumerates dialup scenarios. 5224e41f4b71Sopenharmony_ci 5225e41f4b71Sopenharmony_ci**System API**: This is a system API. 5226e41f4b71Sopenharmony_ci 5227e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5228e41f4b71Sopenharmony_ci 5229e41f4b71Sopenharmony_ci| Name | Value | Description | 5230e41f4b71Sopenharmony_ci| --------------- | ---- | ------------ | 5231e41f4b71Sopenharmony_ci| CALL_NORMAL | 0 | Common call. | 5232e41f4b71Sopenharmony_ci| CALL_PRIVILEGED | 1 | Privileged call. | 5233e41f4b71Sopenharmony_ci| CALL_EMERGENCY | 2 | Emergency call.| 5234e41f4b71Sopenharmony_ci 5235e41f4b71Sopenharmony_ci## DialType<sup>8+</sup> 5236e41f4b71Sopenharmony_ci 5237e41f4b71Sopenharmony_ciEnumerates dialup types. 5238e41f4b71Sopenharmony_ci 5239e41f4b71Sopenharmony_ci**System API**: This is a system API. 5240e41f4b71Sopenharmony_ci 5241e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5242e41f4b71Sopenharmony_ci 5243e41f4b71Sopenharmony_ci| Name | Value | Description | 5244e41f4b71Sopenharmony_ci| -------------------- | ---- | ---------------- | 5245e41f4b71Sopenharmony_ci| DIAL_CARRIER_TYPE | 0 | Carrier. | 5246e41f4b71Sopenharmony_ci| DIAL_VOICE_MAIL_TYPE | 1 | Voice mail.| 5247e41f4b71Sopenharmony_ci| DIAL_OTT_TYPE | 2 | OTT. | 5248e41f4b71Sopenharmony_ci 5249e41f4b71Sopenharmony_ci## RejectMessageOptions<sup>7+</sup> 5250e41f4b71Sopenharmony_ci 5251e41f4b71Sopenharmony_ciDefines options for the call rejection message. 5252e41f4b71Sopenharmony_ci 5253e41f4b71Sopenharmony_ci**System API**: This is a system API. 5254e41f4b71Sopenharmony_ci 5255e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5256e41f4b71Sopenharmony_ci 5257e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 5258e41f4b71Sopenharmony_ci| -------------- | ------ | ---- | -------- | 5259e41f4b71Sopenharmony_ci| messageContent | string | Yes | Message content.| 5260e41f4b71Sopenharmony_ci 5261e41f4b71Sopenharmony_ci## CallTransferResult<sup>8+</sup> 5262e41f4b71Sopenharmony_ci 5263e41f4b71Sopenharmony_ciDefines the call transfer result. 5264e41f4b71Sopenharmony_ci 5265e41f4b71Sopenharmony_ci**System API**: This is a system API. 5266e41f4b71Sopenharmony_ci 5267e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5268e41f4b71Sopenharmony_ci 5269e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 5270e41f4b71Sopenharmony_ci| ------------------------ | ---------------------------------- | ---- | ---------------- | 5271e41f4b71Sopenharmony_ci| status | [TransferStatus](#transferstatus8) | Yes | Call transfer status. | 5272e41f4b71Sopenharmony_ci| number | string | Yes | Call transfer number. | 5273e41f4b71Sopenharmony_ci| startHour<sup>9+</sup> | number | Yes | Hour in the start time.| 5274e41f4b71Sopenharmony_ci| startMinute<sup>9+</sup> | number | Yes | Minute in the start time.| 5275e41f4b71Sopenharmony_ci| endHour<sup>9+</sup> | number | Yes | Hour in the end time.| 5276e41f4b71Sopenharmony_ci| endMinute<sup>9+</sup> | number | Yes | Minute in the end time.| 5277e41f4b71Sopenharmony_ci 5278e41f4b71Sopenharmony_ci## CallWaitingStatus<sup>7+</sup> 5279e41f4b71Sopenharmony_ci 5280e41f4b71Sopenharmony_ciEnumerates call waiting states. 5281e41f4b71Sopenharmony_ci 5282e41f4b71Sopenharmony_ci**System API**: This is a system API. 5283e41f4b71Sopenharmony_ci 5284e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5285e41f4b71Sopenharmony_ci 5286e41f4b71Sopenharmony_ci| Name | Value | Description | 5287e41f4b71Sopenharmony_ci| -------------------- | ---- | ------------ | 5288e41f4b71Sopenharmony_ci| CALL_WAITING_DISABLE | 0 | Call waiting disabled.| 5289e41f4b71Sopenharmony_ci| CALL_WAITING_ENABLE | 1 | Call waiting enabled.| 5290e41f4b71Sopenharmony_ci 5291e41f4b71Sopenharmony_ci## RestrictionStatus<sup>8+</sup> 5292e41f4b71Sopenharmony_ci 5293e41f4b71Sopenharmony_ciEnumerates call restriction states. 5294e41f4b71Sopenharmony_ci 5295e41f4b71Sopenharmony_ci**System API**: This is a system API. 5296e41f4b71Sopenharmony_ci 5297e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5298e41f4b71Sopenharmony_ci 5299e41f4b71Sopenharmony_ci| Name | Value | Description | 5300e41f4b71Sopenharmony_ci| ------------------- | ---- | -------- | 5301e41f4b71Sopenharmony_ci| RESTRICTION_DISABLE | 0 | Call restriction disabled.| 5302e41f4b71Sopenharmony_ci| RESTRICTION_ENABLE | 1 | Call restriction enabled.| 5303e41f4b71Sopenharmony_ci 5304e41f4b71Sopenharmony_ci## TransferStatus<sup>8+</sup> 5305e41f4b71Sopenharmony_ci 5306e41f4b71Sopenharmony_ciEnumerates call transfer states. 5307e41f4b71Sopenharmony_ci 5308e41f4b71Sopenharmony_ci**System API**: This is a system API. 5309e41f4b71Sopenharmony_ci 5310e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5311e41f4b71Sopenharmony_ci 5312e41f4b71Sopenharmony_ci| Name | Value | Description | 5313e41f4b71Sopenharmony_ci| ---------------- | ---- | -------- | 5314e41f4b71Sopenharmony_ci| TRANSFER_DISABLE | 0 | Call transfer disabled.| 5315e41f4b71Sopenharmony_ci| TRANSFER_ENABLE | 1 | Call transfer enabled.| 5316e41f4b71Sopenharmony_ci 5317e41f4b71Sopenharmony_ci## DisconnectedDetails<sup>9+</sup> 5318e41f4b71Sopenharmony_ci 5319e41f4b71Sopenharmony_ciDefines the call disconnection cause. 5320e41f4b71Sopenharmony_ci 5321e41f4b71Sopenharmony_ci**System API**: This is a system API. 5322e41f4b71Sopenharmony_ci 5323e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5324e41f4b71Sopenharmony_ci 5325e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 5326e41f4b71Sopenharmony_ci| ------- | ------------------------------------------ | ---- | --------------- | 5327e41f4b71Sopenharmony_ci| reason | [DisconnectedReason](#disconnectedreason8) | Yes | Call disconnection cause. | 5328e41f4b71Sopenharmony_ci| message | string | Yes | Call ending message.| 5329e41f4b71Sopenharmony_ci 5330e41f4b71Sopenharmony_ci## DisconnectedReason<sup>8+</sup> 5331e41f4b71Sopenharmony_ci 5332e41f4b71Sopenharmony_ciEnumerates call disconnection causes. 5333e41f4b71Sopenharmony_ci 5334e41f4b71Sopenharmony_ci**System API**: This is a system API. 5335e41f4b71Sopenharmony_ci 5336e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5337e41f4b71Sopenharmony_ci 5338e41f4b71Sopenharmony_ci| Name | Value | Description | 5339e41f4b71Sopenharmony_ci| ------------------------------------------------------------ | ---- | --------------------------------------- | 5340e41f4b71Sopenharmony_ci| UNASSIGNED_NUMBER | 1 | Unallocated (unassigned) number. | 5341e41f4b71Sopenharmony_ci| NO_ROUTE_TO_DESTINATION | 3 | No route to destination. | 5342e41f4b71Sopenharmony_ci| CHANNEL_UNACCEPTABLE | 6 | Channel unacceptable. | 5343e41f4b71Sopenharmony_ci| OPERATOR_DETERMINED_BARRING | 8 | Operator determined barring (ODB). | 5344e41f4b71Sopenharmony_ci| CALL_COMPLETED_ELSEWHERE<sup>9+</sup> | 13 | Call completed elsewhere. | 5345e41f4b71Sopenharmony_ci| NORMAL_CALL_CLEARING | 16 | Normal call clearing. | 5346e41f4b71Sopenharmony_ci| USER_BUSY | 17 | User busy. | 5347e41f4b71Sopenharmony_ci| NO_USER_RESPONDING | 18 | No user responding. | 5348e41f4b71Sopenharmony_ci| USER_ALERTING_NO_ANSWER | 19 | User alerting, no answer. | 5349e41f4b71Sopenharmony_ci| CALL_REJECTED | 21 | Call rejected. | 5350e41f4b71Sopenharmony_ci| NUMBER_CHANGED | 22 | Number changed. | 5351e41f4b71Sopenharmony_ci| CALL_REJECTED_DUE_TO_FEATURE_AT_THE_DESTINATION<sup>9+</sup> | 24 | Call rejected due to feature at the destination.| 5352e41f4b71Sopenharmony_ci| FAILED_PRE_EMPTION<sup>9+</sup> | 25 | Failed preemption. | 5353e41f4b71Sopenharmony_ci| NON_SELECTED_USER_CLEARING<sup>9+</sup> | 26 | Non-selected user clearing. | 5354e41f4b71Sopenharmony_ci| DESTINATION_OUT_OF_ORDER | 27 | Destination out of order. | 5355e41f4b71Sopenharmony_ci| INVALID_NUMBER_FORMAT | 28 | Invalid number format (incomplete number). | 5356e41f4b71Sopenharmony_ci| FACILITY_REJECTED<sup>9+</sup> | 29 | Facility rejected. | 5357e41f4b71Sopenharmony_ci| RESPONSE_TO_STATUS_ENQUIRY<sup>9+</sup> | 30 | Response to status enquiry. | 5358e41f4b71Sopenharmony_ci| NORMAL_UNSPECIFIED<sup>9+</sup> | 31 | Normal, unspecified. | 5359e41f4b71Sopenharmony_ci| NO_CIRCUIT_CHANNEL_AVAILABLE<sup>9+</sup> | 34 | No circuit/channel available. | 5360e41f4b71Sopenharmony_ci| NETWORK_OUT_OF_ORDER | 38 | Network fault. | 5361e41f4b71Sopenharmony_ci| TEMPORARY_FAILURE | 41 | Temporary failure. | 5362e41f4b71Sopenharmony_ci| SWITCHING_EQUIPMENT_CONGESTION<sup>9+</sup> | 42 | Switching equipment congestion. | 5363e41f4b71Sopenharmony_ci| ACCESS_INFORMATION_DISCARDED<sup>9+</sup> | 43 | Access information discarded. | 5364e41f4b71Sopenharmony_ci| REQUEST_CIRCUIT_CHANNEL_NOT_AVAILABLE<sup>9+</sup> | 44 | Requested circuit/channel unavailable | 5365e41f4b71Sopenharmony_ci| RESOURCES_UNAVAILABLE_UNSPECIFIED<sup>9+</sup> | 47 | Resources unavailable, unspecified. | 5366e41f4b71Sopenharmony_ci| QUALITY_OF_SERVICE_UNAVAILABLE<sup>9+</sup> | 49 | QoS unavailable. | 5367e41f4b71Sopenharmony_ci| REQUESTED_FACILITY_NOT_SUBSCRIBED<sup>9+</sup> | 50 | Requested facility not subscribed. | 5368e41f4b71Sopenharmony_ci| INCOMING_CALLS_BARRED_WITHIN_THE_CUG<sup>9+</sup> | 55 | Incoming calls barred within the CUG. | 5369e41f4b71Sopenharmony_ci| BEARER_CAPABILITY_NOT_AUTHORIZED<sup>9+</sup> | 57 | Bearer capability not authorized. | 5370e41f4b71Sopenharmony_ci| BEARER_CAPABILITY_NOT_PRESENTLY_AVAILABLE<sup>9+</sup> | 58 | Bearer capability presently available. | 5371e41f4b71Sopenharmony_ci| SERVICE_OR_OPTION_NOT_AVAILABLE_UNSPECIFIED<sup>9+</sup> | 63 | Service or option not available, unspecified. | 5372e41f4b71Sopenharmony_ci| BEARER_SERVICE_NOT_IMPLEMENTED<sup>9+</sup> | 65 | Bearer service not implemented. | 5373e41f4b71Sopenharmony_ci| ACM_EQUALTO_OR_GREATER_THAN_THE_MAXIMUM_VALUE<sup>9+</sup> | 68 | ACM greater than or equal to the maximum value. | 5374e41f4b71Sopenharmony_ci| REQUESTED_FACILITY_NOT_IMPLEMENTED<sup>9+</sup> | 69 | Requested facility not implemented. | 5375e41f4b71Sopenharmony_ci| ONLY_RESTRICTED_DIGITAL_INFO_BEARER_CAPABILITY_IS_AVAILABLE<sup>9+</sup> | 70 | Only restricted digital information bearer capability available. | 5376e41f4b71Sopenharmony_ci| SERVICE_OR_OPTION_NOT_IMPLEMENTED_UNSPECIFIED<sup>9+</sup> | 79 | Service or option not implemented, unspecified. | 5377e41f4b71Sopenharmony_ci| INVALID_TRANSACTION_IDENTIFIER_VALUE<sup>9+</sup> | 81 | Invalid transaction identifier value. | 5378e41f4b71Sopenharmony_ci| USER_NOT_MEMBER_OF_CUG<sup>9+</sup> | 87 | User not member of CUG. | 5379e41f4b71Sopenharmony_ci| INCOMPATIBLE_DESTINATION<sup>9+</sup> | 88 | Incompatible destination. | 5380e41f4b71Sopenharmony_ci| INVALID_TRANSIT_NETWORK_SELECTION<sup>9+</sup> | 91 | Invalid transit network selection. | 5381e41f4b71Sopenharmony_ci| SEMANTICALLY_INCORRECT_MESSAGE<sup>9+</sup> | 95 | Semantically incorrect message. | 5382e41f4b71Sopenharmony_ci| INVALID_MANDATORY_INFORMATION<sup>9+</sup> | 96 | Invalid mandatory information. | 5383e41f4b71Sopenharmony_ci| MESSAGE_TYPE_NON_EXISTENT_OR_NOT_IMPLEMENTED<sup>9+</sup> | 97 | Message type non-existent or not implemented. | 5384e41f4b71Sopenharmony_ci| MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE<sup>9+</sup> | 98 | Message type not compatible with protocol state. | 5385e41f4b71Sopenharmony_ci| INFORMATION_ELEMENT_NON_EXISTENT_OR_NOT_IMPLEMENTED<sup>9+</sup> | 99 | IE non-existent or not implemented. | 5386e41f4b71Sopenharmony_ci| CONDITIONAL_IE_ERROR<sup>9+</sup> | 100 | Conditional IE error. | 5387e41f4b71Sopenharmony_ci| MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE<sup>9+</sup> | 101 | Message not compatible with protocol state. | 5388e41f4b71Sopenharmony_ci| RECOVERY_ON_TIMER_EXPIRED<sup>9+</sup> | 102 | Recovery on timer expiry. | 5389e41f4b71Sopenharmony_ci| PROTOCOL_ERROR_UNSPECIFIED<sup>9+</sup> | 111 | Protocol error, unspecified. | 5390e41f4b71Sopenharmony_ci| INTERWORKING_UNSPECIFIED<sup>9+</sup> | 127 | Interworking, unspecified. | 5391e41f4b71Sopenharmony_ci| CALL_BARRED<sup>9+</sup> | 240 | Call barred. | 5392e41f4b71Sopenharmony_ci| FDN_BLOCKED<sup>9+</sup> | 241 | FDN blocked. | 5393e41f4b71Sopenharmony_ci| IMSI_UNKNOWN_IN_VLR<sup>9+</sup> | 242 | IMSI unknown in VLR. | 5394e41f4b71Sopenharmony_ci| IMEI_NOT_ACCEPTED<sup>9+</sup> | 243 | IMEI not accepted. | 5395e41f4b71Sopenharmony_ci| DIAL_MODIFIED_TO_USSD<sup>9+</sup> | 244 | Dial request modified to USSD request. | 5396e41f4b71Sopenharmony_ci| DIAL_MODIFIED_TO_SS<sup>9+</sup> | 245 | Dial request modified to SS request. | 5397e41f4b71Sopenharmony_ci| DIAL_MODIFIED_TO_DIAL<sup>9+</sup> | 246 | Dial request modified to dial with different number. | 5398e41f4b71Sopenharmony_ci| RADIO_OFF<sup>9+</sup> | 247 | Radio off. | 5399e41f4b71Sopenharmony_ci| OUT_OF_SERVICE<sup>9+</sup> | 248 | Out of service. | 5400e41f4b71Sopenharmony_ci| NO_VALID_SIM<sup>9+</sup> | 249 | No valid SIM. | 5401e41f4b71Sopenharmony_ci| RADIO_INTERNAL_ERROR<sup>9+</sup> | 250 | Radio internal error. | 5402e41f4b71Sopenharmony_ci| NETWORK_RESP_TIMEOUT<sup>9+</sup> | 251 | Network response timeout. | 5403e41f4b71Sopenharmony_ci| NETWORK_REJECT<sup>9+</sup> | 252 | Request rejected by network. | 5404e41f4b71Sopenharmony_ci| RADIO_ACCESS_FAILURE<sup>9+</sup> | 253 | Radio access failure. | 5405e41f4b71Sopenharmony_ci| RADIO_LINK_FAILURE<sup>9+</sup> | 254 | Radio link failure. | 5406e41f4b71Sopenharmony_ci| RADIO_LINK_LOST<sup>9+</sup> | 255 | Radio link lost. | 5407e41f4b71Sopenharmony_ci| RADIO_UPLINK_FAILURE<sup>9+</sup> | 256 | Radio uplink failure. | 5408e41f4b71Sopenharmony_ci| RADIO_SETUP_FAILURE<sup>9+</sup> | 257 | Radio setup failure. | 5409e41f4b71Sopenharmony_ci| RADIO_RELEASE_NORMAL<sup>9+</sup> | 258 | Radio release normal. | 5410e41f4b71Sopenharmony_ci| RADIO_RELEASE_ABNORMAL<sup>9+</sup> | 259 | Radio release abnormal. | 5411e41f4b71Sopenharmony_ci| ACCESS_CLASS_BLOCKED<sup>9+</sup> | 260 | Access class blocked. | 5412e41f4b71Sopenharmony_ci| NETWORK_DETACH<sup>9+</sup> | 261 | Network detached. | 5413e41f4b71Sopenharmony_ci| INVALID_PARAMETER | 1025 | Invalid parameter. | 5414e41f4b71Sopenharmony_ci| SIM_NOT_EXIT | 1026 | SIM not exit. | 5415e41f4b71Sopenharmony_ci| SIM_PIN_NEED | 1027 | SIM PIN needed. | 5416e41f4b71Sopenharmony_ci| CALL_NOT_ALLOW | 1029 | Call not allowed. | 5417e41f4b71Sopenharmony_ci| SIM_INVALID | 1045 | No valid SIM. | 5418e41f4b71Sopenharmony_ci| UNKNOWN | 1279 | Unknown reason. | 5419e41f4b71Sopenharmony_ci 5420e41f4b71Sopenharmony_ci## MmiCodeResults<sup>9+</sup> 5421e41f4b71Sopenharmony_ci 5422e41f4b71Sopenharmony_ciDefines the MMI code result. 5423e41f4b71Sopenharmony_ci 5424e41f4b71Sopenharmony_ci**System API**: This is a system API. 5425e41f4b71Sopenharmony_ci 5426e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5427e41f4b71Sopenharmony_ci 5428e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 5429e41f4b71Sopenharmony_ci| ------- | -------------------------------- | ---- | --------------- | 5430e41f4b71Sopenharmony_ci| result | [MmiCodeResult](#mmicoderesult9) | Yes | MMI code result.| 5431e41f4b71Sopenharmony_ci| message | string | Yes | MMI code message.| 5432e41f4b71Sopenharmony_ci 5433e41f4b71Sopenharmony_ci## MmiCodeResult<sup>9+</sup> 5434e41f4b71Sopenharmony_ci 5435e41f4b71Sopenharmony_ciDefines the MMI code result. 5436e41f4b71Sopenharmony_ci 5437e41f4b71Sopenharmony_ci**System API**: This is a system API. 5438e41f4b71Sopenharmony_ci 5439e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5440e41f4b71Sopenharmony_ci 5441e41f4b71Sopenharmony_ci| Name | Value | Description | 5442e41f4b71Sopenharmony_ci| ---------------- | ---- | ------------- | 5443e41f4b71Sopenharmony_ci| MMI_CODE_SUCCESS | 0 | Success.| 5444e41f4b71Sopenharmony_ci| MMI_CODE_FAILED | 1 | Failure.| 5445e41f4b71Sopenharmony_ci 5446e41f4b71Sopenharmony_ci## call.answerCall<sup>11+</sup> 5447e41f4b71Sopenharmony_ci 5448e41f4b71Sopenharmony_cianswerCall(videoState: VideoStateType, callId: number\): Promise\<void\> 5449e41f4b71Sopenharmony_ci 5450e41f4b71Sopenharmony_ciAnswers a call. This API uses a promise to return the result. 5451e41f4b71Sopenharmony_ci 5452e41f4b71Sopenharmony_ci**System API**: This is a system API. 5453e41f4b71Sopenharmony_ci 5454e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.ANSWER_CALL 5455e41f4b71Sopenharmony_ci 5456e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5457e41f4b71Sopenharmony_ci 5458e41f4b71Sopenharmony_ci**Parameters** 5459e41f4b71Sopenharmony_ci 5460e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 5461e41f4b71Sopenharmony_ci| ----------------------- | ------------------- | ---- | ------------------------------------------------------------ | 5462e41f4b71Sopenharmony_ci| videoState| [VideoStateType](#videostatetype7)| Yes | Video state. | 5463e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. You can obtain the value by subscribing to **callDetailsChange** events. | 5464e41f4b71Sopenharmony_ci 5465e41f4b71Sopenharmony_ci**Return value** 5466e41f4b71Sopenharmony_ci 5467e41f4b71Sopenharmony_ci| Type | Description | 5468e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 5469e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 5470e41f4b71Sopenharmony_ci 5471e41f4b71Sopenharmony_ci**Error codes** 5472e41f4b71Sopenharmony_ci 5473e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 5474e41f4b71Sopenharmony_ci 5475e41f4b71Sopenharmony_ci| ID| Error Message | 5476e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 5477e41f4b71Sopenharmony_ci| 201 | Permission denied. | 5478e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 5479e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 5480e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 5481e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 5482e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 5483e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 5484e41f4b71Sopenharmony_ci 5485e41f4b71Sopenharmony_ci**Example** 5486e41f4b71Sopenharmony_ci 5487e41f4b71Sopenharmony_ci```ts 5488e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 5489e41f4b71Sopenharmony_ci 5490e41f4b71Sopenharmony_cicall.answerCall(0, 1).then(() => { 5491e41f4b71Sopenharmony_ci console.log(`answerCall success.`); 5492e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 5493e41f4b71Sopenharmony_ci console.error(`answerCall fail, promise: err->${JSON.stringify(err)}`); 5494e41f4b71Sopenharmony_ci}); 5495e41f4b71Sopenharmony_ci``` 5496e41f4b71Sopenharmony_ci 5497e41f4b71Sopenharmony_ci## call.cancelCallUpgrade<sup>11+</sup> 5498e41f4b71Sopenharmony_ci 5499e41f4b71Sopenharmony_cicancelCallUpgrade\(callId: number\): Promise\<void\> 5500e41f4b71Sopenharmony_ci 5501e41f4b71Sopenharmony_ciCancels the upgrade of a video call. This API uses a promise to return the result. 5502e41f4b71Sopenharmony_ci 5503e41f4b71Sopenharmony_ci**System API**: This is a system API. 5504e41f4b71Sopenharmony_ci 5505e41f4b71Sopenharmony_ci**Required Permissions**: ohos.permission.PLACE_CALL 5506e41f4b71Sopenharmony_ci 5507e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5508e41f4b71Sopenharmony_ci 5509e41f4b71Sopenharmony_ci**Parameters** 5510e41f4b71Sopenharmony_ci 5511e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 5512e41f4b71Sopenharmony_ci| ------ | ---------------------------- | ---- | -------------- | 5513e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. You can obtain the value by subscribing to **callDetailsChange** events.| 5514e41f4b71Sopenharmony_ci 5515e41f4b71Sopenharmony_ci**Return value** 5516e41f4b71Sopenharmony_ci 5517e41f4b71Sopenharmony_ci| Type | Description | 5518e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 5519e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 5520e41f4b71Sopenharmony_ci 5521e41f4b71Sopenharmony_ci**Error codes** 5522e41f4b71Sopenharmony_ci 5523e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 5524e41f4b71Sopenharmony_ci 5525e41f4b71Sopenharmony_ci| ID| Error Message | 5526e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 5527e41f4b71Sopenharmony_ci| 201 | Permission denied. | 5528e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 5529e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 5530e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 5531e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 5532e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 5533e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 5534e41f4b71Sopenharmony_ci 5535e41f4b71Sopenharmony_ci**Example** 5536e41f4b71Sopenharmony_ci 5537e41f4b71Sopenharmony_ci```ts 5538e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 5539e41f4b71Sopenharmony_ci 5540e41f4b71Sopenharmony_cicall.cancelCallUpgrade(1).then(() => { 5541e41f4b71Sopenharmony_ci console.log(`cancelCallUpgrade success.`); 5542e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 5543e41f4b71Sopenharmony_ci console.error(`cancelCallUpgrade fail, promise: err->${JSON.stringify(err)}`); 5544e41f4b71Sopenharmony_ci}); 5545e41f4b71Sopenharmony_ci``` 5546e41f4b71Sopenharmony_ci 5547e41f4b71Sopenharmony_ci## call.controlCamera<sup>11+</sup> 5548e41f4b71Sopenharmony_ci 5549e41f4b71Sopenharmony_cicontrolCamera\(callId: number, cameraId: string\): Promise\<void\> 5550e41f4b71Sopenharmony_ci 5551e41f4b71Sopenharmony_ciUses the specified camera to make a video call. If **cameraId** is left empty, the camera is disabled. This API uses a promise to return the result. 5552e41f4b71Sopenharmony_ci 5553e41f4b71Sopenharmony_ci**System API**: This is a system API. 5554e41f4b71Sopenharmony_ci 5555e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 5556e41f4b71Sopenharmony_ci 5557e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5558e41f4b71Sopenharmony_ci 5559e41f4b71Sopenharmony_ci**Parameters** 5560e41f4b71Sopenharmony_ci 5561e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 5562e41f4b71Sopenharmony_ci| ------ | ---------------------------- | ---- | -------------- | 5563e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. You can obtain the value by subscribing to **callDetailsChange** events. | 5564e41f4b71Sopenharmony_ci| cameraId | string | Yes | Camera ID. For details about how to obtain **cameraId**, see [Camera Management](../apis-camera-kit/js-apis-camera.md#getsupportedcameras).| 5565e41f4b71Sopenharmony_ci 5566e41f4b71Sopenharmony_ci**Return value** 5567e41f4b71Sopenharmony_ci 5568e41f4b71Sopenharmony_ci| Type | Description | 5569e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 5570e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result of starting, closing, or switching a camera.| 5571e41f4b71Sopenharmony_ci 5572e41f4b71Sopenharmony_ci**Error codes** 5573e41f4b71Sopenharmony_ci 5574e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 5575e41f4b71Sopenharmony_ci 5576e41f4b71Sopenharmony_ci| ID| Error Message | 5577e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 5578e41f4b71Sopenharmony_ci| 201 | Permission denied. | 5579e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 5580e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 5581e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 5582e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 5583e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 5584e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 5585e41f4b71Sopenharmony_ci 5586e41f4b71Sopenharmony_ci**Example** 5587e41f4b71Sopenharmony_ci 5588e41f4b71Sopenharmony_ci```ts 5589e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 5590e41f4b71Sopenharmony_ci 5591e41f4b71Sopenharmony_cicall.controlCamera(1, "1").then(() => { 5592e41f4b71Sopenharmony_ci console.log(`controlCamera success.`); 5593e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 5594e41f4b71Sopenharmony_ci console.error(`controlCamera fail, promise: err->${JSON.stringify(err)}`); 5595e41f4b71Sopenharmony_ci}); 5596e41f4b71Sopenharmony_ci``` 5597e41f4b71Sopenharmony_ci 5598e41f4b71Sopenharmony_ci## call.setPreviewSurface<sup>11+</sup> 5599e41f4b71Sopenharmony_ci 5600e41f4b71Sopenharmony_cisetPreviewSurface\(callId: number, surfaceId: string\): Promise\<void\> 5601e41f4b71Sopenharmony_ci 5602e41f4b71Sopenharmony_ciSets the local preview window. This API uses a promise to return the result. 5603e41f4b71Sopenharmony_ci 5604e41f4b71Sopenharmony_ci**System API**: This is a system API. 5605e41f4b71Sopenharmony_ci 5606e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 5607e41f4b71Sopenharmony_ci 5608e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5609e41f4b71Sopenharmony_ci 5610e41f4b71Sopenharmony_ci**Parameters** 5611e41f4b71Sopenharmony_ci 5612e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 5613e41f4b71Sopenharmony_ci| ------ | ---------------------------- | ---- | -------------- | 5614e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. You can obtain the value by subscribing to **callDetailsChange** events. | 5615e41f4b71Sopenharmony_ci| surfaceId | string | Yes | Preview window ID. For details about how to obtain **surfaceId**, see [XComponent](../apis-arkui/arkui-ts/ts-basic-components-xcomponent.md#getxcomponentsurfaceid). | 5616e41f4b71Sopenharmony_ci 5617e41f4b71Sopenharmony_ci**Return value** 5618e41f4b71Sopenharmony_ci 5619e41f4b71Sopenharmony_ci| Type | Description | 5620e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 5621e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 5622e41f4b71Sopenharmony_ci 5623e41f4b71Sopenharmony_ci**Error codes** 5624e41f4b71Sopenharmony_ci 5625e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 5626e41f4b71Sopenharmony_ci 5627e41f4b71Sopenharmony_ci| ID| Error Message | 5628e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 5629e41f4b71Sopenharmony_ci| 201 | Permission denied. | 5630e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 5631e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 5632e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 5633e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 5634e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 5635e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 5636e41f4b71Sopenharmony_ci 5637e41f4b71Sopenharmony_ci**Example** 5638e41f4b71Sopenharmony_ci 5639e41f4b71Sopenharmony_ci```ts 5640e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 5641e41f4b71Sopenharmony_ci 5642e41f4b71Sopenharmony_cicall.setPreviewSurface(1, "surfaceId1").then(() => { 5643e41f4b71Sopenharmony_ci console.log(`setPreviewSurface success.`); 5644e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 5645e41f4b71Sopenharmony_ci console.error(`setPreviewSurface fail, promise: err->${JSON.stringify(err)}`); 5646e41f4b71Sopenharmony_ci}); 5647e41f4b71Sopenharmony_ci``` 5648e41f4b71Sopenharmony_ci 5649e41f4b71Sopenharmony_ci## call.setDisplaySurface<sup>11+</sup> 5650e41f4b71Sopenharmony_ci 5651e41f4b71Sopenharmony_cisetDisplaySurface\(callId: number, surfaceId: string\): Promise\<void\> 5652e41f4b71Sopenharmony_ci 5653e41f4b71Sopenharmony_ciSets the remote display window. This API uses a promise to return the result. 5654e41f4b71Sopenharmony_ci 5655e41f4b71Sopenharmony_ci**System API**: This is a system API. 5656e41f4b71Sopenharmony_ci 5657e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 5658e41f4b71Sopenharmony_ci 5659e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5660e41f4b71Sopenharmony_ci 5661e41f4b71Sopenharmony_ci**Parameters** 5662e41f4b71Sopenharmony_ci 5663e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 5664e41f4b71Sopenharmony_ci| ------ | ---------------------------- | ---- | -------------- | 5665e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. You can obtain the value by subscribing to **callDetailsChange** events. | 5666e41f4b71Sopenharmony_ci| surfaceId | string | Yes | Display window ID. For details about how to obtain **surfaceId**, see [XComponent](../apis-arkui/arkui-ts/ts-basic-components-xcomponent.md#getxcomponentsurfaceid). | 5667e41f4b71Sopenharmony_ci 5668e41f4b71Sopenharmony_ci**Return value** 5669e41f4b71Sopenharmony_ci 5670e41f4b71Sopenharmony_ci| Type | Description | 5671e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 5672e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 5673e41f4b71Sopenharmony_ci 5674e41f4b71Sopenharmony_ci**Error codes** 5675e41f4b71Sopenharmony_ci 5676e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 5677e41f4b71Sopenharmony_ci 5678e41f4b71Sopenharmony_ci| ID| Error Message | 5679e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 5680e41f4b71Sopenharmony_ci| 201 | Permission denied. | 5681e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 5682e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 5683e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 5684e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 5685e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 5686e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 5687e41f4b71Sopenharmony_ci 5688e41f4b71Sopenharmony_ci**Example** 5689e41f4b71Sopenharmony_ci 5690e41f4b71Sopenharmony_ci```ts 5691e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 5692e41f4b71Sopenharmony_ci 5693e41f4b71Sopenharmony_cicall.setDisplaySurface(1, "surfaceId1").then(() => { 5694e41f4b71Sopenharmony_ci console.log(`setDisplaySurface success.`); 5695e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 5696e41f4b71Sopenharmony_ci console.error(`setDisplaySurface fail, promise: err->${JSON.stringify(err)}`); 5697e41f4b71Sopenharmony_ci}); 5698e41f4b71Sopenharmony_ci``` 5699e41f4b71Sopenharmony_ci 5700e41f4b71Sopenharmony_ci## call.setDeviceDirection<sup>11+</sup> 5701e41f4b71Sopenharmony_ci 5702e41f4b71Sopenharmony_cisetDeviceDirection\(callId: number, deviceDirection: DeviceDirection\): Promise\<void\> 5703e41f4b71Sopenharmony_ci 5704e41f4b71Sopenharmony_ciSets the video image to follow the device direction. This API uses a promise to return the result. 5705e41f4b71Sopenharmony_ci 5706e41f4b71Sopenharmony_ci**System API**: This is a system API. 5707e41f4b71Sopenharmony_ci 5708e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 5709e41f4b71Sopenharmony_ci 5710e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5711e41f4b71Sopenharmony_ci 5712e41f4b71Sopenharmony_ci**Parameters** 5713e41f4b71Sopenharmony_ci 5714e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 5715e41f4b71Sopenharmony_ci| ------ | ----------------------------------------------- | ---- | -------------- | 5716e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. You can obtain the value by subscribing to **callDetailsChange** events.| 5717e41f4b71Sopenharmony_ci| deviceDirection | [DeviceDirection](#devicedirection11) | Yes | Device direction. It determines the direction of the video image. | 5718e41f4b71Sopenharmony_ci 5719e41f4b71Sopenharmony_ci**Return value** 5720e41f4b71Sopenharmony_ci 5721e41f4b71Sopenharmony_ci| Type | Description | 5722e41f4b71Sopenharmony_ci| ------------------- | --------------------------- | 5723e41f4b71Sopenharmony_ci| Promise<void> | Promise used to return the result.| 5724e41f4b71Sopenharmony_ci 5725e41f4b71Sopenharmony_ci**Error codes** 5726e41f4b71Sopenharmony_ci 5727e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 5728e41f4b71Sopenharmony_ci 5729e41f4b71Sopenharmony_ci| ID| Error Message | 5730e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 5731e41f4b71Sopenharmony_ci| 201 | Permission denied. | 5732e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 5733e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 5734e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 5735e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 5736e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 5737e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 5738e41f4b71Sopenharmony_ci 5739e41f4b71Sopenharmony_ci**Example** 5740e41f4b71Sopenharmony_ci 5741e41f4b71Sopenharmony_ci```ts 5742e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 5743e41f4b71Sopenharmony_ci 5744e41f4b71Sopenharmony_cicall.setDeviceDirection(1, 0).then(() => { 5745e41f4b71Sopenharmony_ci console.log(`setDeviceDirection success.`); 5746e41f4b71Sopenharmony_ci}).catch((err: BusinessError) => { 5747e41f4b71Sopenharmony_ci console.error(`setDeviceDirection fail, promise: err->${JSON.stringify(err)}`); 5748e41f4b71Sopenharmony_ci}); 5749e41f4b71Sopenharmony_ci``` 5750e41f4b71Sopenharmony_ci 5751e41f4b71Sopenharmony_ci## call.on('imsCallModeChange')<sup>11+</sup> 5752e41f4b71Sopenharmony_ci 5753e41f4b71Sopenharmony_cion\(type: 'imsCallModeChange', callback: Callback\<ImsCallModeInfo\>\): void 5754e41f4b71Sopenharmony_ci 5755e41f4b71Sopenharmony_ciSubscribes to **imsCallModeChange** events. This API uses an asynchronous callback to return the result. 5756e41f4b71Sopenharmony_ci 5757e41f4b71Sopenharmony_ci**System API**: This is a system API. 5758e41f4b71Sopenharmony_ci 5759e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 5760e41f4b71Sopenharmony_ci 5761e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5762e41f4b71Sopenharmony_ci 5763e41f4b71Sopenharmony_ci**Parameters** 5764e41f4b71Sopenharmony_ci 5765e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 5766e41f4b71Sopenharmony_ci| -------- | ------------------------------------------ | ---- | -------------------------- | 5767e41f4b71Sopenharmony_ci| type | string | Yes | Call mode change. This field has a fixed value of **imsCallModeChange**.| 5768e41f4b71Sopenharmony_ci| callback | Callback<[ImsCallModeInfo](#imscallmode8)> | Yes | Callback used to return the result. | 5769e41f4b71Sopenharmony_ci 5770e41f4b71Sopenharmony_ci**Error codes** 5771e41f4b71Sopenharmony_ci 5772e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 5773e41f4b71Sopenharmony_ci 5774e41f4b71Sopenharmony_ci| ID| Error Message | 5775e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 5776e41f4b71Sopenharmony_ci| 201 | Permission denied. | 5777e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 5778e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 5779e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 5780e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 5781e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 5782e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 5783e41f4b71Sopenharmony_ci 5784e41f4b71Sopenharmony_ci**Example** 5785e41f4b71Sopenharmony_ci 5786e41f4b71Sopenharmony_ci```ts 5787e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 5788e41f4b71Sopenharmony_ci 5789e41f4b71Sopenharmony_cicall.on('imsCallModeChange', (data: call.ImsCallModeInfo) => { 5790e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 5791e41f4b71Sopenharmony_ci}); 5792e41f4b71Sopenharmony_ci``` 5793e41f4b71Sopenharmony_ci 5794e41f4b71Sopenharmony_ci## call.off('imsCallModeChange')<sup>11+</sup> 5795e41f4b71Sopenharmony_ci 5796e41f4b71Sopenharmony_cioff\(type: 'imsCallModeChange', callback?: Callback\<ImsCallModeInfo\>\): void 5797e41f4b71Sopenharmony_ci 5798e41f4b71Sopenharmony_ciUnsubscribes from **imsCallModeChange** events. This API uses an asynchronous callback to return the result. 5799e41f4b71Sopenharmony_ci 5800e41f4b71Sopenharmony_ci**System API**: This is a system API. 5801e41f4b71Sopenharmony_ci 5802e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 5803e41f4b71Sopenharmony_ci 5804e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5805e41f4b71Sopenharmony_ci 5806e41f4b71Sopenharmony_ci**Parameters** 5807e41f4b71Sopenharmony_ci 5808e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 5809e41f4b71Sopenharmony_ci| -------- | ------------------------------------------ | ---- | ---------------------------------- | 5810e41f4b71Sopenharmony_ci| type | string | Yes | Call mode change. This field has a fixed value of **imsCallModeChange**.| 5811e41f4b71Sopenharmony_ci| callback | Callback<[ImsCallModeInfo](#imscallmode8)> | No | Callback used to return the result. If this field is not set, no subscription cancellation result will be received.| 5812e41f4b71Sopenharmony_ci 5813e41f4b71Sopenharmony_ci**Error codes** 5814e41f4b71Sopenharmony_ci 5815e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 5816e41f4b71Sopenharmony_ci 5817e41f4b71Sopenharmony_ci| ID| Error Message | 5818e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 5819e41f4b71Sopenharmony_ci| 201 | Permission denied. | 5820e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 5821e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 5822e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 5823e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 5824e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 5825e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 5826e41f4b71Sopenharmony_ci 5827e41f4b71Sopenharmony_ci**Example** 5828e41f4b71Sopenharmony_ci 5829e41f4b71Sopenharmony_ci```ts 5830e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 5831e41f4b71Sopenharmony_ci 5832e41f4b71Sopenharmony_cicall.off('imsCallModeChange', (data: call.ImsCallModeInfo) => { 5833e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 5834e41f4b71Sopenharmony_ci}); 5835e41f4b71Sopenharmony_ci``` 5836e41f4b71Sopenharmony_ci 5837e41f4b71Sopenharmony_ci## call.on('callSessionEvent')<sup>11+</sup> 5838e41f4b71Sopenharmony_ci 5839e41f4b71Sopenharmony_cion\(type: 'callSessionEvent', callback: Callback\<CallSessionEvent\>\): void 5840e41f4b71Sopenharmony_ci 5841e41f4b71Sopenharmony_ciSubscribes to **callSessionEvent** events. This API uses an asynchronous callback to return the result. 5842e41f4b71Sopenharmony_ci 5843e41f4b71Sopenharmony_ci**System API**: This is a system API. 5844e41f4b71Sopenharmony_ci 5845e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 5846e41f4b71Sopenharmony_ci 5847e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5848e41f4b71Sopenharmony_ci 5849e41f4b71Sopenharmony_ci**Parameters** 5850e41f4b71Sopenharmony_ci 5851e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 5852e41f4b71Sopenharmony_ci| -------- | ------------------------------------------------- | ---- | -------------------------- | 5853e41f4b71Sopenharmony_ci| type | string | Yes | Call session event. This field has a fixed value of **callSessionEvent**.| 5854e41f4b71Sopenharmony_ci| callback | Callback<[CallSessionEvent](#callsessionevent11)> | Yes | Callback used to return the result. | 5855e41f4b71Sopenharmony_ci 5856e41f4b71Sopenharmony_ci**Error codes** 5857e41f4b71Sopenharmony_ci 5858e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 5859e41f4b71Sopenharmony_ci 5860e41f4b71Sopenharmony_ci| ID| Error Message | 5861e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 5862e41f4b71Sopenharmony_ci| 201 | Permission denied. | 5863e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 5864e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 5865e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 5866e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 5867e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 5868e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 5869e41f4b71Sopenharmony_ci 5870e41f4b71Sopenharmony_ci**Example** 5871e41f4b71Sopenharmony_ci 5872e41f4b71Sopenharmony_ci```ts 5873e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 5874e41f4b71Sopenharmony_ci 5875e41f4b71Sopenharmony_cicall.on('callSessionEvent', (data: call.CallSessionEvent) => { 5876e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 5877e41f4b71Sopenharmony_ci}); 5878e41f4b71Sopenharmony_ci``` 5879e41f4b71Sopenharmony_ci 5880e41f4b71Sopenharmony_ci## call.off('callSessionEvent')<sup>11+</sup> 5881e41f4b71Sopenharmony_ci 5882e41f4b71Sopenharmony_cioff\(type: 'callSessionEvent', callback?: Callback\<CallSessionEvent\>\): void 5883e41f4b71Sopenharmony_ci 5884e41f4b71Sopenharmony_ciUnsubscribes from **callSessionEvent** events. This API uses an asynchronous callback to return the result. 5885e41f4b71Sopenharmony_ci 5886e41f4b71Sopenharmony_ci**System API**: This is a system API. 5887e41f4b71Sopenharmony_ci 5888e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 5889e41f4b71Sopenharmony_ci 5890e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5891e41f4b71Sopenharmony_ci 5892e41f4b71Sopenharmony_ci**Parameters** 5893e41f4b71Sopenharmony_ci 5894e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 5895e41f4b71Sopenharmony_ci| -------- | ------------------------------------------ | ---- | ---------------------------------- | 5896e41f4b71Sopenharmony_ci| type | string | Yes | Call session event. This field has a fixed value of **callSessionEvent**.| 5897e41f4b71Sopenharmony_ci| callback | Callback<[CallSessionEvent](#callsessionevent11)> | No | Callback used to return the result. If this field is not set, no subscription cancellation result will be received.| 5898e41f4b71Sopenharmony_ci 5899e41f4b71Sopenharmony_ci**Error codes** 5900e41f4b71Sopenharmony_ci 5901e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 5902e41f4b71Sopenharmony_ci 5903e41f4b71Sopenharmony_ci| ID| Error Message | 5904e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 5905e41f4b71Sopenharmony_ci| 201 | Permission denied. | 5906e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 5907e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 5908e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 5909e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 5910e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 5911e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 5912e41f4b71Sopenharmony_ci 5913e41f4b71Sopenharmony_ci**Example** 5914e41f4b71Sopenharmony_ci 5915e41f4b71Sopenharmony_ci```ts 5916e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 5917e41f4b71Sopenharmony_ci 5918e41f4b71Sopenharmony_cicall.off('callSessionEvent', (data: call.CallSessionEvent) => { 5919e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 5920e41f4b71Sopenharmony_ci}); 5921e41f4b71Sopenharmony_ci``` 5922e41f4b71Sopenharmony_ci 5923e41f4b71Sopenharmony_ci## call.on('peerDimensionsChange')<sup>11+</sup> 5924e41f4b71Sopenharmony_ci 5925e41f4b71Sopenharmony_cion\(type: 'peerDimensionsChange', callback: Callback\<PeerDimensionsDetail\>\): void 5926e41f4b71Sopenharmony_ci 5927e41f4b71Sopenharmony_ciSubscribes to **peerDimensionsChange** events. This API uses an asynchronous callback to return the result. 5928e41f4b71Sopenharmony_ci 5929e41f4b71Sopenharmony_ci**System API**: This is a system API. 5930e41f4b71Sopenharmony_ci 5931e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 5932e41f4b71Sopenharmony_ci 5933e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5934e41f4b71Sopenharmony_ci 5935e41f4b71Sopenharmony_ci**Parameters** 5936e41f4b71Sopenharmony_ci 5937e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 5938e41f4b71Sopenharmony_ci| -------- | --------------------------------------------------------- | ---- | -------------------------- | 5939e41f4b71Sopenharmony_ci| type | string | Yes | Screen resolution change. This field has a fixed value of **peerDimensionsChange**.| 5940e41f4b71Sopenharmony_ci| callback | Callback<[PeerDimensionsDetail](#peerdimensionsdetail11)> | Yes | Callback used to return the result. | 5941e41f4b71Sopenharmony_ci 5942e41f4b71Sopenharmony_ci**Error codes** 5943e41f4b71Sopenharmony_ci 5944e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 5945e41f4b71Sopenharmony_ci 5946e41f4b71Sopenharmony_ci| ID| Error Message | 5947e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 5948e41f4b71Sopenharmony_ci| 201 | Permission denied. | 5949e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 5950e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 5951e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 5952e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 5953e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 5954e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 5955e41f4b71Sopenharmony_ci 5956e41f4b71Sopenharmony_ci**Example** 5957e41f4b71Sopenharmony_ci 5958e41f4b71Sopenharmony_ci```ts 5959e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 5960e41f4b71Sopenharmony_ci 5961e41f4b71Sopenharmony_cicall.on('peerDimensionsChange', (data: call.PeerDimensionsDetail) => { 5962e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 5963e41f4b71Sopenharmony_ci}); 5964e41f4b71Sopenharmony_ci``` 5965e41f4b71Sopenharmony_ci 5966e41f4b71Sopenharmony_ci## call.off('peerDimensionsChange')<sup>11+</sup> 5967e41f4b71Sopenharmony_ci 5968e41f4b71Sopenharmony_cioff\(type: 'peerDimensionsChange', callback?: Callback\<PeerDimensionsDetail\>\): void 5969e41f4b71Sopenharmony_ci 5970e41f4b71Sopenharmony_ciUnsubscribes from **peerDimensionsChange** events. This API uses an asynchronous callback to return the result. 5971e41f4b71Sopenharmony_ci 5972e41f4b71Sopenharmony_ci**System API**: This is a system API. 5973e41f4b71Sopenharmony_ci 5974e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 5975e41f4b71Sopenharmony_ci 5976e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 5977e41f4b71Sopenharmony_ci 5978e41f4b71Sopenharmony_ci**Parameters** 5979e41f4b71Sopenharmony_ci 5980e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 5981e41f4b71Sopenharmony_ci| -------- | --------------------------------------------------------- | ---- | -------------------------- | 5982e41f4b71Sopenharmony_ci| type | string | Yes | Screen resolution change. This field has a fixed value of **peerDimensionsChange**.| 5983e41f4b71Sopenharmony_ci| callback | Callback<[PeerDimensionsDetail](#peerdimensionsdetail11)> | No | Callback used to return the result. If this field is not set, no subscription cancellation result will be received. | 5984e41f4b71Sopenharmony_ci 5985e41f4b71Sopenharmony_ci**Error codes** 5986e41f4b71Sopenharmony_ci 5987e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 5988e41f4b71Sopenharmony_ci 5989e41f4b71Sopenharmony_ci| ID| Error Message | 5990e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 5991e41f4b71Sopenharmony_ci| 201 | Permission denied. | 5992e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 5993e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 5994e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 5995e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 5996e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 5997e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 5998e41f4b71Sopenharmony_ci 5999e41f4b71Sopenharmony_ci**Example** 6000e41f4b71Sopenharmony_ci 6001e41f4b71Sopenharmony_ci```ts 6002e41f4b71Sopenharmony_ciimport { BusinessError } from '@kit.BasicServicesKit'; 6003e41f4b71Sopenharmony_ci 6004e41f4b71Sopenharmony_cicall.off('peerDimensionsChange', (data: call.PeerDimensionsDetail) => { 6005e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 6006e41f4b71Sopenharmony_ci}); 6007e41f4b71Sopenharmony_ci``` 6008e41f4b71Sopenharmony_ci 6009e41f4b71Sopenharmony_ci## call.on('cameraCapabilitiesChange')<sup>11+</sup> 6010e41f4b71Sopenharmony_ci 6011e41f4b71Sopenharmony_cion\(type: 'cameraCapabilitiesChange', callback: Callback\<CameraCapabilities\>\): void 6012e41f4b71Sopenharmony_ci 6013e41f4b71Sopenharmony_ciSubscribes to **cameraCapabilitiesChange** events. This API uses an asynchronous callback to return the result. 6014e41f4b71Sopenharmony_ci 6015e41f4b71Sopenharmony_ci**System API**: This is a system API. 6016e41f4b71Sopenharmony_ci 6017e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 6018e41f4b71Sopenharmony_ci 6019e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 6020e41f4b71Sopenharmony_ci 6021e41f4b71Sopenharmony_ci**Parameters** 6022e41f4b71Sopenharmony_ci 6023e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 6024e41f4b71Sopenharmony_ci| -------- | ------------------------------------------------------| ---- | -------------------------- | 6025e41f4b71Sopenharmony_ci| type | string | Yes | Camera capability change. This field has a fixed value of **cameraCapabilitiesChange**.| 6026e41f4b71Sopenharmony_ci| callback | Callback<[CameraCapabilities](#cameracapabilities11)> | Yes | Callback used to return the result. | 6027e41f4b71Sopenharmony_ci 6028e41f4b71Sopenharmony_ci**Error codes** 6029e41f4b71Sopenharmony_ci 6030e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 6031e41f4b71Sopenharmony_ci 6032e41f4b71Sopenharmony_ci| ID| Error Message | 6033e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 6034e41f4b71Sopenharmony_ci| 201 | Permission denied. | 6035e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 6036e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 6037e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 6038e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 6039e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 6040e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 6041e41f4b71Sopenharmony_ci 6042e41f4b71Sopenharmony_ci**Example** 6043e41f4b71Sopenharmony_ci 6044e41f4b71Sopenharmony_ci```ts 6045e41f4b71Sopenharmony_cicall.on('cameraCapabilitiesChange', (data: call.CameraCapabilities) => { 6046e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 6047e41f4b71Sopenharmony_ci}); 6048e41f4b71Sopenharmony_ci``` 6049e41f4b71Sopenharmony_ci 6050e41f4b71Sopenharmony_ci## call.off('cameraCapabilitiesChange')<sup>11+</sup> 6051e41f4b71Sopenharmony_ci 6052e41f4b71Sopenharmony_cioff\(type: 'cameraCapabilitiesChange', callback?: Callback\<CameraCapabilities\>\): void 6053e41f4b71Sopenharmony_ci 6054e41f4b71Sopenharmony_ciUnsubscribes from **cameraCapabilitiesChange** events. This API uses an asynchronous callback to return the result. 6055e41f4b71Sopenharmony_ci 6056e41f4b71Sopenharmony_ci**System API**: This is a system API. 6057e41f4b71Sopenharmony_ci 6058e41f4b71Sopenharmony_ci**Required permission**: ohos.permission.SET_TELEPHONY_STATE 6059e41f4b71Sopenharmony_ci 6060e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 6061e41f4b71Sopenharmony_ci 6062e41f4b71Sopenharmony_ci**Parameters** 6063e41f4b71Sopenharmony_ci 6064e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 6065e41f4b71Sopenharmony_ci| -------- | ----------------------------------------------------- | ---- | ---------------------------------- | 6066e41f4b71Sopenharmony_ci| type | string | Yes | Camera capability change. This field has a fixed value of **cameraCapabilitiesChange**.| 6067e41f4b71Sopenharmony_ci| callback | Callback<[CameraCapabilities](#cameracapabilities11)> | No | Callback used to return the result. If this field is not set, no subscription cancellation result will be received.| 6068e41f4b71Sopenharmony_ci 6069e41f4b71Sopenharmony_ci**Error codes** 6070e41f4b71Sopenharmony_ci 6071e41f4b71Sopenharmony_ciFor details about the error codes, see [ohos.telephony (Telephony) Error Codes](errorcode-telephony.md) and [Universal Error Codes](../errorcode-universal.md). 6072e41f4b71Sopenharmony_ci 6073e41f4b71Sopenharmony_ci| ID| Error Message | 6074e41f4b71Sopenharmony_ci| -------- | -------------------------------------------- | 6075e41f4b71Sopenharmony_ci| 201 | Permission denied. | 6076e41f4b71Sopenharmony_ci| 202 | Non-system applications use system APIs. | 6077e41f4b71Sopenharmony_ci| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameters types;| 6078e41f4b71Sopenharmony_ci| 8300001 | Invalid parameter value. | 6079e41f4b71Sopenharmony_ci| 8300002 | Operation failed. Cannot connect to service. | 6080e41f4b71Sopenharmony_ci| 8300003 | System internal error. | 6081e41f4b71Sopenharmony_ci| 8300999 | Unknown error code. | 6082e41f4b71Sopenharmony_ci 6083e41f4b71Sopenharmony_ci**Example** 6084e41f4b71Sopenharmony_ci 6085e41f4b71Sopenharmony_ci```ts 6086e41f4b71Sopenharmony_cicall.off('cameraCapabilitiesChange', (data: call.CameraCapabilities) => { 6087e41f4b71Sopenharmony_ci console.log(`callback: data->${JSON.stringify(data)}`); 6088e41f4b71Sopenharmony_ci}); 6089e41f4b71Sopenharmony_ci``` 6090e41f4b71Sopenharmony_ci 6091e41f4b71Sopenharmony_ci## VideoRequestResultType<sup>11+</sup> 6092e41f4b71Sopenharmony_ci 6093e41f4b71Sopenharmony_ciEnumerates video call upgrade or downgrade request types. 6094e41f4b71Sopenharmony_ci 6095e41f4b71Sopenharmony_ci**System API**: This is a system API. 6096e41f4b71Sopenharmony_ci 6097e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 6098e41f4b71Sopenharmony_ci 6099e41f4b71Sopenharmony_ci| Name | Value | Description | 6100e41f4b71Sopenharmony_ci| ------------------------------------------ | ------ | --------| 6101e41f4b71Sopenharmony_ci| TYPE_REQUEST_SUCCESS | 0 | Success.| 6102e41f4b71Sopenharmony_ci| TYPE_REQUEST_FAILURE | 1 | Failed.| 6103e41f4b71Sopenharmony_ci| TYPE_REQUEST_INVALID | 2 | Invalid request.| 6104e41f4b71Sopenharmony_ci| TYPE_REQUEST_TIMED_OUT | 3 | Request timeout.| 6105e41f4b71Sopenharmony_ci| TYPE_REQUEST_REJECTED_BY_REMOTE | 4 | Request denied.| 6106e41f4b71Sopenharmony_ci| TYPE_REQUEST_UPGRADE_CANCELED | 5 | Upgrade request canceled.| 6107e41f4b71Sopenharmony_ci| TYPE_DOWNGRADE_RTP_OR_RTCP_TIMEOUT | 100 | RTP or RTCP downgrade timeout.| 6108e41f4b71Sopenharmony_ci| TYPE_DOWNGRADE_RTP_AND_RTCP_TIMEOUT | 101 | RTP and RTCP downgrade timeout.| 6109e41f4b71Sopenharmony_ci 6110e41f4b71Sopenharmony_ci## DeviceDirection<sup>11+</sup> 6111e41f4b71Sopenharmony_ci 6112e41f4b71Sopenharmony_ciEnumerates device directions in a video call. 6113e41f4b71Sopenharmony_ci 6114e41f4b71Sopenharmony_ci**System API**: This is a system API. 6115e41f4b71Sopenharmony_ci 6116e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 6117e41f4b71Sopenharmony_ci 6118e41f4b71Sopenharmony_ci| Name | Value | Description | 6119e41f4b71Sopenharmony_ci| -------------------- | ------ | --------| 6120e41f4b71Sopenharmony_ci| DEVICE_DIRECTION_0 | 0 | 0-degree direction.| 6121e41f4b71Sopenharmony_ci| DEVICE_DIRECTION_90 | 90 | 90-degree direction.| 6122e41f4b71Sopenharmony_ci| DEVICE_DIRECTION_180 | 180 | 180-degree direction.| 6123e41f4b71Sopenharmony_ci| DEVICE_DIRECTION_270 | 270 | 270-degree direction.| 6124e41f4b71Sopenharmony_ci 6125e41f4b71Sopenharmony_ci## CallSessionEventId<sup>11+</sup> 6126e41f4b71Sopenharmony_ci 6127e41f4b71Sopenharmony_ciEnumerates video call event types. 6128e41f4b71Sopenharmony_ci 6129e41f4b71Sopenharmony_ci**System API**: This is a system API. 6130e41f4b71Sopenharmony_ci 6131e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 6132e41f4b71Sopenharmony_ci 6133e41f4b71Sopenharmony_ci| Name | Value | Description | 6134e41f4b71Sopenharmony_ci| ------------------------------ | ------ | --------| 6135e41f4b71Sopenharmony_ci| EVENT_CONTROL_CAMERA_FAILURE | 0 | Camera setting failed.| 6136e41f4b71Sopenharmony_ci| EVENT_CONTROL_CAMERA_READY | 1 | Camera setting succeeded.| 6137e41f4b71Sopenharmony_ci| EVENT_DISPLAY_SURFACE_RELEASED | 100 | Remote display window released.| 6138e41f4b71Sopenharmony_ci| EVENT_PREVIEW_SURFACE_RELEASED | 101 | Local preview window released.| 6139e41f4b71Sopenharmony_ci 6140e41f4b71Sopenharmony_ci## ImsCallModeInfo<sup>11+</sup> 6141e41f4b71Sopenharmony_ci 6142e41f4b71Sopenharmony_ciDefines the video call mode information. 6143e41f4b71Sopenharmony_ci 6144e41f4b71Sopenharmony_ci**System API**: This is a system API. 6145e41f4b71Sopenharmony_ci 6146e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 6147e41f4b71Sopenharmony_ci 6148e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 6149e41f4b71Sopenharmony_ci| ------- | -------------------------------------------------- | ---- | ------------- | 6150e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 6151e41f4b71Sopenharmony_ci| isRequestInfo| boolean | Yes | Whether the information is request information.| 6152e41f4b71Sopenharmony_ci| imsCallMode | [ImsCallMode](#imscallmode8) | Yes | Video call mode. | 6153e41f4b71Sopenharmony_ci| result | [VideoRequestResultType](#videorequestresulttype11)| Yes | Call ending message.| 6154e41f4b71Sopenharmony_ci 6155e41f4b71Sopenharmony_ci## CallSessionEvent<sup>11+</sup> 6156e41f4b71Sopenharmony_ci 6157e41f4b71Sopenharmony_ciDefines the video call event information. 6158e41f4b71Sopenharmony_ci 6159e41f4b71Sopenharmony_ci**System API**: This is a system API. 6160e41f4b71Sopenharmony_ci 6161e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 6162e41f4b71Sopenharmony_ci 6163e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 6164e41f4b71Sopenharmony_ci| ------- | -------------------------------------------------- | ---- | ------------- | 6165e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 6166e41f4b71Sopenharmony_ci| eventId | [CallSessionEventId](#callsessioneventid11) | Yes | Video call event. | 6167e41f4b71Sopenharmony_ci 6168e41f4b71Sopenharmony_ci## PeerDimensionsDetail<sup>11+</sup> 6169e41f4b71Sopenharmony_ci 6170e41f4b71Sopenharmony_ciDefines the peer image resolution in a video call. 6171e41f4b71Sopenharmony_ci 6172e41f4b71Sopenharmony_ci**System API**: This is a system API. 6173e41f4b71Sopenharmony_ci 6174e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 6175e41f4b71Sopenharmony_ci 6176e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 6177e41f4b71Sopenharmony_ci| ------- | ------------ | ---- | ------------- | 6178e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 6179e41f4b71Sopenharmony_ci| width | number | Yes | Width of the peer image, in pixels. | 6180e41f4b71Sopenharmony_ci| height | number | Yes | Height of the peer image, in pixels. | 6181e41f4b71Sopenharmony_ci 6182e41f4b71Sopenharmony_ci## CameraCapabilities<sup>11+</sup> 6183e41f4b71Sopenharmony_ci 6184e41f4b71Sopenharmony_ciDefines the local image resolution in a video call. 6185e41f4b71Sopenharmony_ci 6186e41f4b71Sopenharmony_ci**System API**: This is a system API. 6187e41f4b71Sopenharmony_ci 6188e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 6189e41f4b71Sopenharmony_ci 6190e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 6191e41f4b71Sopenharmony_ci| ------- | ------------ | ---- | ------------- | 6192e41f4b71Sopenharmony_ci| callId | number | Yes | Call ID. | 6193e41f4b71Sopenharmony_ci| width | number | Yes | Width of the local image, in pixels. | 6194e41f4b71Sopenharmony_ci| height | number | Yes | Height of the local image, in pixels. | 6195e41f4b71Sopenharmony_ci 6196e41f4b71Sopenharmony_ci## NumberMarkInfo<sup>12+</sup> 6197e41f4b71Sopenharmony_ci 6198e41f4b71Sopenharmony_ciDefines a number mark. 6199e41f4b71Sopenharmony_ci 6200e41f4b71Sopenharmony_ci**System API**: This is a system API. 6201e41f4b71Sopenharmony_ci 6202e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 6203e41f4b71Sopenharmony_ci 6204e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 6205e41f4b71Sopenharmony_ci| ------- | ------------ | ---- | ------------- | 6206e41f4b71Sopenharmony_ci| markType | [MarkType](#marktype12) | Yes | Mark type.| 6207e41f4b71Sopenharmony_ci| markContent | string | No | Mark content.| 6208e41f4b71Sopenharmony_ci| markCount | number | No | Mark count.| 6209e41f4b71Sopenharmony_ci| markSource | string | No| Mark source.| 6210e41f4b71Sopenharmony_ci| isCloud | boolean | No| Whether the number mark is from the cloud.| 6211e41f4b71Sopenharmony_ci 6212e41f4b71Sopenharmony_ci## MarkType<sup>12+</sup> 6213e41f4b71Sopenharmony_ci 6214e41f4b71Sopenharmony_ciEnumerates number mark types. 6215e41f4b71Sopenharmony_ci 6216e41f4b71Sopenharmony_ci**System API**: This is a system API. 6217e41f4b71Sopenharmony_ci 6218e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Telephony.CallManager 6219e41f4b71Sopenharmony_ci 6220e41f4b71Sopenharmony_ci| Name | Value | Description | 6221e41f4b71Sopenharmony_ci| ------------------------------ | ------ | --------| 6222e41f4b71Sopenharmony_ci| MARK_TYPE_NONE | 0 | No mark.| 6223e41f4b71Sopenharmony_ci| MARK_TYPE_CRANK | 1 | Spam call| 6224e41f4b71Sopenharmony_ci| MARK_TYPE_FRAUD | 2 | Fraud call| 6225e41f4b71Sopenharmony_ci| MARK_TYPE_EXPRESS | 3 | Express & delivery| 6226e41f4b71Sopenharmony_ci| MARK_TYPE_PROMOTE_SALES | 4 | Advertising| 6227e41f4b71Sopenharmony_ci| MARK_TYPE_HOUSE_AGENT | 5 | Estate agent| 6228e41f4b71Sopenharmony_ci| MARK_TYPE_INSURANCE | 6 | Insurance & loans| 6229e41f4b71Sopenharmony_ci| MARK_TYPE_TAXI | 7 | Taxi| 6230e41f4b71Sopenharmony_ci| MARK_TYPE_CUSTOM | 8 | Custom| 6231e41f4b71Sopenharmony_ci| MARK_TYPE_OTHERS | 9 | Others| 6232e41f4b71Sopenharmony_ci| MARK_TYPE_YELLOW_PAGE | 10 | Yellow page| 6233