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