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