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