Call Manager
Introduction
The Call Manager module mainly manages three types of calls: circuit switched (CS), IP multimedia subsystem (IMS), and over the top (OTT) calls. It is responsible for applying for the audio and video resources required for a call and resolving conflicts in a multi-channel call. The module consists of six parts: UI interaction (CallServiceAbility), service management (CallManagerService), call management (Call Manager), audio management (Audio Manager), video management (Video Manager), and Bluetooth management (Bluetooth Manager).
- CallServiceAbility: Implements interaction with the call UI, for example, launching the keypad UI for dialup and reporting the incoming call status to the UI.
- CallManagerService: starts and initializes the Call Manager.
- Call Manager: processes downlink call operations (such as dialup, answer, and onhook) and uplink call status (such as incoming call status and call waiting status), and resolves conflicts that occur in a call.
- Audio Manager: applies for audio resources for a call and releases the resources after the call ends. This part depends on the multimedia subsystem and needs to call its APIs to perform audio-related operations.
- Video Manager: applies for video resources for a call and releases the resources after the call ends. This part depends on the multimedia subsystem and needs to call its APIs to perform video-related operations.
- Bluetooth Manager: applies for Bluetooth resources for a call and releases the resources after the call ends. Besides, this part processes call operations initiated by Bluetooth devices, such as answering and ending calls.
The following figure shows the architecture of the Call Manager module.
Figure 1 Architecture of the Call Manager module

Directory Structure
/base/telephony/call_manager
├─ figures # Figures of readme files
├─ frameworks # Frameworks
│ ├─ js # JS code
│ └─ native # Native code
├─ interfaces # APIs
│ ├─ innerkits # Internal APIs
│ └─ kits # External APIs (such as JS APIs)
├─ sa_profile # SA profile
├─ services # Service code
│ ├─ audio # Audio management
│ ├─ bluetooth # Bluetooth call management
│ ├─ call # Call service
│ ├─ call_manager_service # Call Manager service
│ ├─ call_report # Call status reporting
│ ├─ call_setting # Call setting
│ ├─ telephony_interaction # Telephony core service interaction
│ └─ video # Video Manager code
├─ test # Test code
│ ├─ fuzztest # Fuzzy test
│ ├─ mock # Simulation test
│ └─ unittest # Unit test
└─ utils # Utilities
Constraints
- Programming language: JavaScript
- In terms of software, this module needs to work with the Security subsystem, Multimedia subsystem, and Intelligent Soft Bus subsystem (Bluetooth module), as well as the telephony core service (core_service) and cellular call module (cellular_call).
- In terms of hardware, the accommodating device must be equipped with a speaker or earphone, and a headset.
Available APIs
Table 1 External API provided by the Call Manager module
Table 2 Parameters of the Dial API
Asynchronous execution result. Value true indicates that the dialup is successful, and value false indicates that the dialup has failed. |
Table 3 Parameter description of options: DialOptions
Usage Guidelines
Calling the dial API to Place a Call
-
Construct the phoneNumber and options parameters.
-
Call the Dial API in callback or Promise mode.
-
Obtain the dialup result. The Dial API works in asynchronous mode. The dialup result is returned through the callback.
import call from "@ohos.telephony.call"; let phoneNumber = "12312312312"; // Call the API in callback mode. call.dial(phoneNumber, {extras: false}, (err, value) => { if (err) { // If the API call failed, err is not empty. console.error(`failed to dial because ${err.message}`); return; } // If the API call succeeded, err is empty. console.log(`success to dial: ${value}`); }); // Call the API in Promise mode. let promise = call.dial(phoneNumber, {extras: false}); promise.then((value) => { // The API call succeeded. console.log(`success to dial: ${value}`); }).catch((err) => { // The API call failed. console.error(`failed to dial because ${err.message}`); });
Check if VoLTE HD calling is enabled
-
You can check if VoLTE HD calling service is enabled by invoking isImsSwitchEnabledSync.
-
This interface is a synchronous interface, and theThis interface is a synchronous interface, and the returned from isImsSwitch and the relevant execution results will be returned from isImsSwitchEnabledSync.
import call from "@ohos.telephony.call"; try { // Call the interface [Sync method] let isEnabled: boolean = data.isImsSwitchEnabledSync(0); // Call the interface successfully console.log(`isImsSwitchEnabledSync success : ${isEnabled}`); } catch (error) { // Call the interface failed console.log(`isImsSwitchEnabledSync failed`); }
Repositories Involved
telephony_call_manager