# 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\). 1. CallServiceAbility: Implements interaction with the call UI, for example, launching the keypad UI for dialup and reporting the incoming call status to the UI. 2. CallManagerService: starts and initializes the Call Manager. 3. 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. 4. 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. 5. 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. 6. 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
Asynchronous execution result. Value true indicates that the dialup is successful, and value false indicates that the dialup has failed. |