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