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