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