2022-02-18 08:45:55 +00:00
|
|
|
/*
|
2022-03-01 11:45:46 +00:00
|
|
|
* Copyright (C) 2021-2022 Huawei Device Co., Ltd.
|
2022-03-01 04:11:12 +00:00
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
|
|
|
|
import {AsyncCallback, Callback} from "./basic";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Provides methods related to call management.
|
|
|
|
*
|
|
|
|
* @since 6
|
2022-02-21 09:18:50 +00:00
|
|
|
* @syscap SystemCapability.Telephony.CallManager
|
2022-02-18 08:45:55 +00:00
|
|
|
*/
|
|
|
|
declare namespace call {
|
|
|
|
/**
|
|
|
|
* Makes a call.
|
|
|
|
*
|
|
|
|
* @param phoneNumber Indicates the called number.
|
|
|
|
* @param options Indicates additional information carried in the call.
|
|
|
|
* @param callback Returns {@code true} if the call request is successful; returns {@code false} otherwise.
|
|
|
|
* Note that the value {@code true} indicates only the successful processing of the request; it does not mean
|
|
|
|
* that the call is or can be connected.
|
|
|
|
* @permission ohos.permission.PLACE_CALL
|
2023-02-13 07:42:18 +00:00
|
|
|
* @deprecated since 9
|
|
|
|
* @useinstead telephony.call#dialCall
|
2022-02-18 08:45:55 +00:00
|
|
|
*/
|
|
|
|
function dial(phoneNumber: string, callback: AsyncCallback<boolean>): void;
|
|
|
|
function dial(phoneNumber: string, options: DialOptions, callback: AsyncCallback<boolean>): void;
|
|
|
|
function dial(phoneNumber: string, options?: DialOptions): Promise<boolean>;
|
|
|
|
|
2023-02-06 12:23:33 +00:00
|
|
|
/**
|
|
|
|
* Makes a call.
|
|
|
|
*
|
|
|
|
* @permission ohos.permission.PLACE_CALL
|
|
|
|
* @param phoneNumber Indicates the called number.
|
|
|
|
* @param callback - the callback of dialCall.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
function dialCall(phoneNumber: string, callback: AsyncCallback<void>): void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Makes a call.
|
|
|
|
*
|
|
|
|
* @permission ohos.permission.PLACE_CALL
|
|
|
|
* @param phoneNumber Indicates the called number.
|
|
|
|
* @param options Indicates additional information carried in the call.
|
|
|
|
* @param callback - the callback of dialCall.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
function dialCall(phoneNumber: string, options: DialCallOptions, callback: AsyncCallback<void>): void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Makes a call.
|
|
|
|
*
|
|
|
|
* @permission ohos.permission.PLACE_CALL
|
|
|
|
* @param phoneNumber Indicates the called number.
|
|
|
|
* @param options Indicates additional information carried in the call.
|
|
|
|
* @returns { void | Promise<void> } No callback return Promise otherwise return void.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
function dialCall(phoneNumber: string, options?: DialCallOptions): Promise<void>;
|
|
|
|
|
2022-03-01 04:11:12 +00:00
|
|
|
/**
|
|
|
|
* Go to the dial screen and the called number is displayed.
|
|
|
|
*
|
|
|
|
* @param phoneNumber Indicates the called number.
|
2023-02-06 12:23:33 +00:00
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-03-01 11:38:52 +00:00
|
|
|
* @syscap SystemCapability.Applications.Contacts
|
2022-03-01 12:20:03 +00:00
|
|
|
* @since 7
|
2022-03-01 04:11:12 +00:00
|
|
|
*/
|
|
|
|
function makeCall(phoneNumber: string, callback: AsyncCallback<void>): void;
|
|
|
|
function makeCall(phoneNumber: string): Promise<void>;
|
|
|
|
|
2022-02-18 08:45:55 +00:00
|
|
|
/**
|
|
|
|
* Checks whether a call is ongoing.
|
|
|
|
*
|
|
|
|
* @param callback Returns {@code true} if at least one call is not in the {@link CallState#CALL_STATE_IDLE}
|
|
|
|
* state; returns {@code false} otherwise.
|
|
|
|
*/
|
|
|
|
function hasCall(callback: AsyncCallback<boolean>): void;
|
|
|
|
function hasCall(): Promise<boolean>;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Obtains the call state.
|
|
|
|
*
|
|
|
|
* <p>If an incoming call is ringing or waiting, the system returns {@code CallState#CALL_STATE_RINGING}.
|
|
|
|
* If at least one call is in the active, hold, or dialing state, the system returns
|
|
|
|
* {@code CallState#CALL_STATE_OFFHOOK}.
|
|
|
|
* In other cases, the system returns {@code CallState#CALL_STATE_IDLE}.
|
|
|
|
*
|
|
|
|
* @param callback Returns the call state.
|
|
|
|
*/
|
|
|
|
function getCallState(callback: AsyncCallback<CallState>): void;
|
|
|
|
function getCallState(): Promise<CallState>;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Stops the ringtone.
|
|
|
|
*
|
|
|
|
* <p>If an incoming call is ringing, the phone stops ringing. Otherwise, this method does not function.
|
|
|
|
*
|
2022-03-26 09:42:58 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
2023-02-06 12:23:33 +00:00
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function muteRinger(callback: AsyncCallback<void>): void;
|
|
|
|
function muteRinger(): Promise<void>;
|
|
|
|
|
2022-02-22 01:47:58 +00:00
|
|
|
/**
|
|
|
|
* Checks whether a device supports voice calls.
|
|
|
|
*
|
|
|
|
* <p>The system checks whether the device has the capability to initiate a circuit switching (CS) or IP multimedia
|
|
|
|
* subsystem domain (IMS) call on a telephone service network. If the device supports only packet switching
|
|
|
|
* (even if the device supports OTT calls), {@code false} is returned.
|
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @returns Returns {@code true} if the device supports voice calls; returns {@code false} otherwise.
|
2022-02-22 01:47:58 +00:00
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
function hasVoiceCapability(): boolean;
|
|
|
|
|
2022-02-18 08:45:55 +00:00
|
|
|
/**
|
|
|
|
* Checks whether a phone number is on the emergency number list.
|
|
|
|
*
|
|
|
|
* @param phoneNumber Indicates the phone number to check.
|
|
|
|
* @param callback Returns {@code true} if the phone number is on the emergency number list;
|
|
|
|
* returns {@code false} otherwise.
|
2023-02-06 12:23:33 +00:00
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
function isEmergencyPhoneNumber(phoneNumber: string, callback: AsyncCallback<boolean>): void;
|
|
|
|
function isEmergencyPhoneNumber(phoneNumber: string, options: EmergencyNumberOptions, callback: AsyncCallback<boolean>): void;
|
|
|
|
function isEmergencyPhoneNumber(phoneNumber: string, options?: EmergencyNumberOptions): Promise<boolean>;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Formats a phone number according to the Chinese Telephone Code Plan. Before the formatting,
|
|
|
|
* a phone number is in the format of country code (if any) + 3-digit service provider code
|
|
|
|
* + 4-digit area code + 4-digit subscriber number. After the formatting,
|
|
|
|
* each part is separated by a space.
|
|
|
|
*
|
|
|
|
* @param phoneNumber Indicates the phone number to format.
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param options countryCode option
|
|
|
|
* @param callback Returns the phone number after being formatted; returns an empty string if the input phone number is invalid.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
function formatPhoneNumber(phoneNumber: string, callback: AsyncCallback<string>): void;
|
|
|
|
function formatPhoneNumber(phoneNumber: string, options: NumberFormatOptions, callback: AsyncCallback<string>): void;
|
|
|
|
function formatPhoneNumber(phoneNumber: string, options?: NumberFormatOptions): Promise<string>;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Formats a phone number into an E.164 representation.
|
|
|
|
*
|
|
|
|
* @param phoneNumber Indicates the phone number to format.
|
|
|
|
* @param countryCode Indicates a two-digit country code defined in ISO 3166-1.
|
|
|
|
* @param callback Returns an E.164 number; returns an empty string if the input phone number is invalid.
|
2023-02-06 12:23:33 +00:00
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
function formatPhoneNumberToE164(phoneNumber: string, countryCode: string, callback: AsyncCallback<string>): void;
|
|
|
|
function formatPhoneNumberToE164(phoneNumber: string, countryCode: string): Promise<string>;
|
|
|
|
|
|
|
|
/**
|
2022-09-08 06:40:08 +00:00
|
|
|
* Answers the incoming call.
|
|
|
|
*
|
|
|
|
* @param callId Indicates the identifier of the call to answer.
|
2022-03-26 09:42:58 +00:00
|
|
|
* @permission ohos.permission.ANSWER_CALL
|
2023-02-06 12:23:33 +00:00
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-09-08 06:40:08 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
2023-02-15 07:05:23 +00:00
|
|
|
* @since 9
|
2022-02-18 08:45:55 +00:00
|
|
|
*/
|
2023-02-13 07:42:18 +00:00
|
|
|
function answerCall(callId: number, callback: AsyncCallback<void>): void;
|
2023-02-15 12:46:12 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Answers the incoming call.
|
|
|
|
*
|
|
|
|
* @param callId Indicates the identifier of the call to answer.
|
|
|
|
* @permission ohos.permission.ANSWER_CALL
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 9
|
|
|
|
*/
|
2023-02-13 07:42:18 +00:00
|
|
|
function answerCall(callId?: number): Promise<void>;
|
2022-02-18 08:45:55 +00:00
|
|
|
|
|
|
|
/**
|
2022-09-08 06:40:08 +00:00
|
|
|
* Answers the incoming call without callId.
|
|
|
|
*
|
|
|
|
* @permission ohos.permission.ANSWER_CALL
|
2023-02-06 12:23:33 +00:00
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-09-08 06:40:08 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 9
|
|
|
|
*/
|
2023-02-13 07:42:18 +00:00
|
|
|
function answerCall(callback: AsyncCallback<void>): void;
|
2022-09-08 06:40:08 +00:00
|
|
|
|
|
|
|
/**
|
2022-12-05 06:30:54 +00:00
|
|
|
* Hang up the foreground call.
|
2022-09-08 06:40:08 +00:00
|
|
|
*
|
|
|
|
* @param callId Indicates the identifier of the call to hangup.
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.ANSWER_CALL
|
2023-02-06 12:23:33 +00:00
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
2023-02-15 07:05:23 +00:00
|
|
|
* @since 9
|
2022-02-18 08:45:55 +00:00
|
|
|
*/
|
2023-02-13 07:42:18 +00:00
|
|
|
function hangUpCall(callId: number, callback: AsyncCallback<void>): void;
|
2023-02-15 12:46:12 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Hang up the foreground call.
|
|
|
|
*
|
|
|
|
* @param callId Indicates the identifier of the call to hangup.
|
|
|
|
* @permission ohos.permission.ANSWER_CALL
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 9
|
|
|
|
*/
|
2023-02-13 07:42:18 +00:00
|
|
|
function hangUpCall(callId?: number): Promise<void>;
|
2022-02-18 08:45:55 +00:00
|
|
|
|
|
|
|
/**
|
2022-12-05 06:30:54 +00:00
|
|
|
* Hang up the foreground call without callId.
|
2022-09-08 06:40:08 +00:00
|
|
|
*
|
2022-12-06 13:02:45 +00:00
|
|
|
* @permission ohos.permission.ANSWER_CALL
|
2023-02-06 12:23:33 +00:00
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-09-08 06:40:08 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 9
|
|
|
|
*/
|
2023-02-13 07:42:18 +00:00
|
|
|
function hangUpCall(callback: AsyncCallback<void>): void;
|
2022-09-08 06:40:08 +00:00
|
|
|
|
|
|
|
/**
|
2022-12-05 06:30:54 +00:00
|
|
|
* Reject the incoming call.
|
2022-09-08 06:40:08 +00:00
|
|
|
*
|
|
|
|
* @param callId Indicates the identifier of the call to reject.
|
|
|
|
* @param options Indicates the text message to reject.
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.ANSWER_CALL
|
2023-02-06 12:23:33 +00:00
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
2023-02-15 07:05:23 +00:00
|
|
|
* @since 9
|
2022-02-18 08:45:55 +00:00
|
|
|
*/
|
2023-02-13 07:42:18 +00:00
|
|
|
function rejectCall(callId: number, callback: AsyncCallback<void>): void;
|
2023-02-15 12:46:12 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Reject the incoming call.
|
|
|
|
*
|
|
|
|
* @param callId Indicates the identifier of the call to reject.
|
|
|
|
* @param options Indicates the text message to reject.
|
|
|
|
* @permission ohos.permission.ANSWER_CALL
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 9
|
|
|
|
*/
|
2023-02-13 07:42:18 +00:00
|
|
|
function rejectCall(callId: number, options: RejectMessageOptions, callback: AsyncCallback<void>): void;
|
2023-02-15 12:46:12 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Reject the incoming call.
|
|
|
|
*
|
|
|
|
* @param callId Indicates the identifier of the call to reject.
|
|
|
|
* @param options Indicates the text message to reject.
|
|
|
|
* @permission ohos.permission.ANSWER_CALL
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 9
|
|
|
|
*/
|
2023-02-13 07:42:18 +00:00
|
|
|
function rejectCall(callId?: number, options?: RejectMessageOptions): Promise<void>;
|
2022-09-08 06:40:08 +00:00
|
|
|
|
|
|
|
/**
|
2022-12-05 06:30:54 +00:00
|
|
|
* Reject the incoming call without callId.
|
2022-09-08 06:40:08 +00:00
|
|
|
*
|
|
|
|
* @param options Indicates the text message to reject.
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.ANSWER_CALL
|
2023-02-06 12:23:33 +00:00
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-09-08 06:40:08 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 9
|
|
|
|
*/
|
2023-02-13 07:42:18 +00:00
|
|
|
function rejectCall(callback: AsyncCallback<void>): void;
|
2023-02-15 12:46:12 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Reject the incoming call without callId.
|
|
|
|
*
|
|
|
|
* @param options Indicates the text message to reject.
|
|
|
|
* @permission ohos.permission.ANSWER_CALL
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 9
|
|
|
|
*/
|
2023-02-13 07:42:18 +00:00
|
|
|
function rejectCall(options: RejectMessageOptions, callback: AsyncCallback<void>): void;
|
2022-02-18 08:45:55 +00:00
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Keep a call on hold.
|
|
|
|
*
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.ANSWER_CALL
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param callId Indicates the identifier of the call.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
2022-02-18 09:12:15 +00:00
|
|
|
* @since 7
|
2022-02-18 08:45:55 +00:00
|
|
|
*/
|
|
|
|
function holdCall(callId: number, callback: AsyncCallback<void>): void;
|
|
|
|
function holdCall(callId: number): Promise<void>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Cancel call hold status.
|
|
|
|
*
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.ANSWER_CALL
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param callId Indicates the identifier of the call.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
2022-02-18 09:12:15 +00:00
|
|
|
* @since 7
|
2022-02-18 08:45:55 +00:00
|
|
|
*/
|
|
|
|
function unHoldCall(callId: number, callback: AsyncCallback<void>): void;
|
|
|
|
function unHoldCall(callId: number): Promise<void>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Switch call.
|
|
|
|
*
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.ANSWER_CALL
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param callId Indicates the identifier of the call.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
2022-02-18 09:12:15 +00:00
|
|
|
* @since 7
|
2022-02-18 08:45:55 +00:00
|
|
|
*/
|
|
|
|
function switchCall(callId: number, callback: AsyncCallback<void>): void;
|
|
|
|
function switchCall(callId: number): Promise<void>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Merge calls, merge two calls into conference calls.
|
|
|
|
*
|
|
|
|
* @param callId Indicates the identifier of the call.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 801 - Capability not supported.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
function combineConference(callId: number, callback: AsyncCallback<void>): void;
|
|
|
|
function combineConference(callId: number): Promise<void>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Get the main call Id.
|
|
|
|
*
|
|
|
|
* @param callId Indicates the identifier of the call.
|
|
|
|
* @returns Returns the main call id.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 801 - Capability not supported.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
function getMainCallId(callId: number, callback: AsyncCallback<number>): void;
|
|
|
|
function getMainCallId(callId: number): Promise<number>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Get the list of sub-call Ids.
|
|
|
|
*
|
|
|
|
* @param callId Indicates the identifier of the call.
|
|
|
|
* @returns Returns the list of sub call ids.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 801 - Capability not supported.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
function getSubCallIdList(callId: number, callback: AsyncCallback<Array<string>>): void;
|
|
|
|
function getSubCallIdList(callId: number): Promise<Array<string>>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Get the call Id list of the conference.
|
|
|
|
*
|
|
|
|
* @param callId Indicates the identifier of the call.
|
|
|
|
* @param callback Returns the call id list of conference calls.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 801 - Capability not supported.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
function getCallIdListForConference(callId: number, callback: AsyncCallback<Array<string>>): void;
|
|
|
|
function getCallIdListForConference(callId: number): Promise<Array<string>>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Get call waiting status.
|
|
|
|
*
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.GET_TELEPHONY_STATE
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param slotId Indicates the card slot index number,
|
|
|
|
* ranging from 0 to the maximum card slot index number supported by the device.
|
|
|
|
* @param callback Returns call waiting status.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 801 - Capability not supported.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
function getCallWaitingStatus(slotId: number, callback: AsyncCallback<CallWaitingStatus>): void;
|
|
|
|
function getCallWaitingStatus(slotId: number): Promise<CallWaitingStatus>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Set call waiting.
|
|
|
|
*
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param slotId Indicates the card slot index number,
|
|
|
|
* ranging from 0 to the maximum card slot index number supported by the device.
|
|
|
|
* @param activate Indicates whether to activate or call wait.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 801 - Capability not supported.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
function setCallWaiting(slotId: number, activate: boolean, callback: AsyncCallback<void>): void;
|
|
|
|
function setCallWaiting(slotId: number, activate: boolean): Promise<void>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Start DTMF(Dual Tone Multi Frequency).
|
|
|
|
*
|
|
|
|
* @param callId Indicates the identifier of the call.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 801 - Capability not supported.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
function startDTMF(callId: number, character: string, callback: AsyncCallback<void>): void;
|
|
|
|
function startDTMF(callId: number, character: string): Promise<void>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Stop DTMF(Dual Tone Multi Frequency).
|
|
|
|
*
|
|
|
|
* @param callId Indicates the identifier of the call.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 801 - Capability not supported.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
function stopDTMF(callId: number, callback: AsyncCallback<void>): void;
|
|
|
|
function stopDTMF(callId: number): Promise<void>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Judge whether the emergency call is in progress.
|
|
|
|
*
|
2022-02-18 08:45:55 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param callback Returns {@code true} if the call is in emergency; returns {@code false} otherwise.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
function isInEmergencyCall(callback: AsyncCallback<boolean>): void;
|
|
|
|
function isInEmergencyCall(): Promise<boolean>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Subscribe to the callDetailsChange event.
|
|
|
|
*
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param callback Return the result of call details.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
function on(type: 'callDetailsChange', callback: Callback<CallAttributeOptions>): void;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Unsubscribe from the callDetailsChange event.
|
|
|
|
*
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param callback Cancel call details registration.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
function off(type: 'callDetailsChange', callback?: Callback<CallAttributeOptions>): void;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Subscribe to the callEventChange event.
|
|
|
|
*
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param callback Return the call event id.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function on(type: 'callEventChange', callback: Callback<CallEventOptions>): void;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Unsubscribe from the callEventChange event.
|
|
|
|
*
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param callback Cancel call event registration.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function off(type: 'callEventChange', callback?: Callback<CallEventOptions>): void;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Subscribe to the callDisconnectedCause event.
|
|
|
|
*
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param callback Return the call disconnection reason.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function on(type: 'callDisconnectedCause', callback: Callback<DisconnectedDetails>): void;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Unsubscribe from the callDisconnectedCause event.
|
|
|
|
*
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param callback Cancel the call disconnection reason registration.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function off(type: 'callDisconnectedCause', callback?: Callback<DisconnectedDetails>): void;
|
|
|
|
|
2022-09-08 06:40:08 +00:00
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Subscribe to the mmiCodeResult event.
|
2022-09-08 06:40:08 +00:00
|
|
|
*
|
|
|
|
* @param type Indicates the observer type.
|
|
|
|
* @param callback Return the result of MMI code.
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
2022-10-28 13:09:33 +00:00
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-09-08 06:40:08 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
function on(type: 'mmiCodeResult', callback: Callback<MmiCodeResults>): void;
|
|
|
|
|
2022-10-28 13:09:33 +00:00
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Unsubscribe from the mmiCodeResult event.
|
2022-10-28 13:09:33 +00:00
|
|
|
*
|
|
|
|
* @param type Indicates the observer type.
|
|
|
|
* @param callback Return the result of MMI code.
|
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 9
|
|
|
|
*/
|
2022-09-08 06:40:08 +00:00
|
|
|
function off(type: 'mmiCodeResult', callback?: Callback<MmiCodeResults>): void;
|
|
|
|
|
2023-03-16 02:42:35 +00:00
|
|
|
/**
|
|
|
|
* Subscribe to the audioDeviceChange event.
|
|
|
|
*
|
|
|
|
* @param type Indicates the observer type.
|
|
|
|
* @param callback Return the result of Current AudioDevice.
|
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 10
|
|
|
|
*/
|
|
|
|
function on(type: 'audioDeviceChange', callback: Callback<AudioDeviceInfo>): void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Unsubscribe from the audioDeviceChange event.
|
|
|
|
*
|
|
|
|
* @param type Indicates the observer type.
|
|
|
|
* @param callback Return the result of Current AudioDevice.
|
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 10
|
|
|
|
*/
|
|
|
|
function off(type: 'audioDeviceChange', callback?: Callback<AudioDeviceInfo>): void;
|
|
|
|
|
2022-02-18 08:45:55 +00:00
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Judge whether to allow another new call.
|
|
|
|
*
|
|
|
|
* @param callback Returns {@code true} If the device currently allows new calls; returns {@code false} otherwise.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function isNewCallAllowed(callback: AsyncCallback<boolean>): void;
|
|
|
|
function isNewCallAllowed(): Promise<boolean>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Split conference call.
|
|
|
|
*
|
|
|
|
* @param callId Indicates the identifier of the call.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function separateConference(callId: number, callback: AsyncCallback<void>): void;
|
|
|
|
function separateConference(callId: number): Promise<void>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Get call barring status.
|
|
|
|
*
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.GET_TELEPHONY_STATE
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param slotId Indicates the card slot index number,
|
|
|
|
* ranging from 0 to the maximum card slot index number supported by the device.
|
|
|
|
* @param type Indicates which type of call restriction to obtain.
|
|
|
|
* @param callback Returns call restriction status.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 801 - Capability not supported.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function getCallRestrictionStatus(slotId: number, type: CallRestrictionType, callback: AsyncCallback<RestrictionStatus>): void;
|
|
|
|
function getCallRestrictionStatus(slotId: number, type: CallRestrictionType): Promise<RestrictionStatus>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Set call barring status.
|
|
|
|
*
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param slotId Indicates the card slot index number,
|
|
|
|
* ranging from 0 to the maximum card slot index number supported by the device.
|
|
|
|
* @param info Indicates the set call restriction information.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 801 - Capability not supported.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function setCallRestriction(slotId: number, info: CallRestrictionInfo, callback: AsyncCallback<void>): void;
|
|
|
|
function setCallRestriction(slotId: number, info: CallRestrictionInfo): Promise<void>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Get call forwarding information.
|
|
|
|
*
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.GET_TELEPHONY_STATE
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param slotId Indicates the card slot index number,
|
|
|
|
* ranging from 0 to the maximum card slot index number supported by the device.
|
|
|
|
* @param type Indicates which type of call forwarding to obtain.
|
|
|
|
* @param callback Returns call forwarding status.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 801 - Capability not supported.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function getCallTransferInfo(slotId: number, type: CallTransferType, callback: AsyncCallback<CallTransferResult>): void;
|
|
|
|
function getCallTransferInfo(slotId: number, type: CallTransferType): Promise<CallTransferResult>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Set call forwarding information.
|
|
|
|
*
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param slotId Indicates the card slot index number,
|
|
|
|
* ranging from 0 to the maximum card slot index number supported by the device.
|
|
|
|
* @param info Indicates the set call forwarding information.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 801 - Capability not supported.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function setCallTransfer(slotId: number, info: CallTransferInfo, callback: AsyncCallback<void>): void;
|
|
|
|
function setCallTransfer(slotId: number, info: CallTransferInfo): Promise<void>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Judge whether the bell is ringing.
|
|
|
|
*
|
2022-02-18 08:45:55 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param callback Returns {@code true} if the device is ringing; returns {@code false} otherwise.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function isRinging(callback: AsyncCallback<boolean>): void;
|
|
|
|
function isRinging(): Promise<boolean>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Set mute during a call.
|
|
|
|
*
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function setMuted(callback: AsyncCallback<void>): void;
|
|
|
|
function setMuted(): Promise<void>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Unmute during a call.
|
|
|
|
*
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function cancelMuted(callback: AsyncCallback<void>): void;
|
|
|
|
function cancelMuted(): Promise<void>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Set the audio device.
|
2022-09-08 06:40:08 +00:00
|
|
|
*
|
2023-03-23 13:30:02 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
2022-09-08 06:40:08 +00:00
|
|
|
* @param device Indicates the device of audio.
|
|
|
|
* @param callback Returns {@code true} if the request is successful; returns {@code false} otherwise.
|
2023-02-06 12:23:33 +00:00
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function setAudioDevice(device: AudioDevice, callback: AsyncCallback<void>): void;
|
2022-09-08 06:40:08 +00:00
|
|
|
|
2023-03-16 02:42:35 +00:00
|
|
|
/**
|
|
|
|
* Set the audio device.
|
|
|
|
*
|
2023-03-23 13:30:02 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
2023-03-16 02:42:35 +00:00
|
|
|
* @param device Indicates the device of audio.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 10
|
|
|
|
*/
|
|
|
|
function setAudioDevice(device: AudioDevice): Promise<void>;
|
|
|
|
|
2022-09-08 06:40:08 +00:00
|
|
|
/**
|
|
|
|
* Set the audio device with options.
|
|
|
|
*
|
2023-03-23 13:30:02 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
2022-09-08 06:40:08 +00:00
|
|
|
* @param device Indicates the device of audio.
|
|
|
|
* @param options Indicates additional information, such as address of bluetooth.
|
|
|
|
* @param callback Returns {@code true} if the request is successful; returns {@code false} otherwise.
|
2023-02-06 12:23:33 +00:00
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-09-08 06:40:08 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
function setAudioDevice(device: AudioDevice, options: AudioDeviceOptions, callback: AsyncCallback<void>): void;
|
|
|
|
function setAudioDevice(device: AudioDevice, options?: AudioDeviceOptions): Promise<void>;
|
2022-02-18 08:45:55 +00:00
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Join the conference call.
|
|
|
|
*
|
|
|
|
* @param mainCallId Indicates the identifier of the main call.
|
|
|
|
* @param callNumberList Indicates a call list.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function joinConference(mainCallId: number, callNumberList: Array<string>, callback: AsyncCallback<void>): void;
|
|
|
|
function joinConference(mainCallId: number, callNumberList: Array<string>): Promise<void>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Update Ims call mode.
|
|
|
|
*
|
|
|
|
* @param callId Indicates the identifier of the call.
|
|
|
|
* @param mode Indicates the mode of the ims call.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function updateImsCallMode(callId: number, mode: ImsCallMode, callback: AsyncCallback<void>): void;
|
|
|
|
function updateImsCallMode(callId: number, mode: ImsCallMode): Promise<void>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Turn on Ims switch.
|
|
|
|
*
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param slotId Indicates the card slot index number,
|
|
|
|
* ranging from 0 to the maximum card slot index number supported by the device.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function enableImsSwitch(slotId: number, callback: AsyncCallback<void>): void;
|
|
|
|
function enableImsSwitch(slotId: number): Promise<void>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Turn off Ims switch.
|
|
|
|
*
|
2022-10-13 13:33:00 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
2023-02-06 12:23:33 +00:00
|
|
|
* @param slotId Indicates the card slot index number,
|
|
|
|
* ranging from 0 to the maximum card slot index number supported by the device.
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function disableImsSwitch(slotId: number, callback: AsyncCallback<void>): void;
|
|
|
|
function disableImsSwitch(slotId: number): Promise<void>;
|
|
|
|
|
|
|
|
/**
|
2023-02-06 12:23:33 +00:00
|
|
|
* Judge whether the Ims switch is enabled.
|
|
|
|
*
|
|
|
|
* @param slotId Indicates the card slot index number,
|
|
|
|
* ranging from 0 to the maximum card slot index number supported by the device.
|
|
|
|
* @param callback Returns {@code true} If the ims switch is on; returns {@code false} otherwise.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2022-02-18 08:45:55 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
function isImsSwitchEnabled(slotId: number, callback: AsyncCallback<boolean>): void;
|
|
|
|
function isImsSwitchEnabled(slotId: number): Promise<boolean>;
|
|
|
|
|
2023-03-16 02:42:35 +00:00
|
|
|
/**
|
|
|
|
* Close Unfinished ussd.
|
|
|
|
*
|
|
|
|
* @param slotId Indicates the card slot index number,
|
|
|
|
* ranging from 0 to the maximum card slot index number supported by the device.
|
2023-03-21 13:58:30 +00:00
|
|
|
* @param {AsyncCallback <void>} callback - void
|
2023-03-16 02:42:35 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 10
|
|
|
|
*/
|
|
|
|
function closeUnFinishedUssd(slotId: number, callback: AsyncCallback<void>): void;
|
2023-03-21 13:58:30 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Close Unfinished ussd.
|
|
|
|
*
|
|
|
|
* @param slotId Indicates the card slot index number,
|
|
|
|
* ranging from 0 to the maximum card slot index number supported by the device.
|
|
|
|
* @returns {Promise <void>}
|
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-03-16 02:42:35 +00:00
|
|
|
function closeUnFinishedUssd(slotId: number): Promise<void>;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* set voNR switch state
|
|
|
|
*
|
|
|
|
* @param slotId Indicates the card slot index number,
|
|
|
|
* ranging from 0 to the maximum card slot index number supported by the device.
|
|
|
|
* @param state Indicates the voNR state.
|
2023-03-21 13:58:30 +00:00
|
|
|
* @param {AsyncCallback <boolean>} callback - if set was successful or not
|
2023-03-16 02:42:35 +00:00
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-03-21 13:58:30 +00:00
|
|
|
function setVoNRState(slotId: number, state: number, callback: AsyncCallback<boolean>): void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* set voNR switch state
|
|
|
|
*
|
|
|
|
* @param slotId Indicates the card slot index number,
|
|
|
|
* ranging from 0 to the maximum card slot index number supported by the device.
|
|
|
|
* @param state Indicates the voNR state.
|
|
|
|
* @returns {Promise <boolean>} - if set was successful or not
|
|
|
|
* @permission ohos.permission.SET_TELEPHONY_STATE
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 10
|
|
|
|
*/
|
|
|
|
function setVoNRState(slotId: number, state: number): Promise<boolean>;
|
2023-03-16 02:42:35 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* get voNR switch state
|
|
|
|
*
|
|
|
|
* @param slotId Indicates the card slot index number,
|
|
|
|
* ranging from 0 to the maximum card slot index number supported by the device.
|
|
|
|
* @param state Indicates the voNR state.
|
2023-03-21 13:58:30 +00:00
|
|
|
* @param {AsyncCallback <VoNRState>} callback - VoNR state
|
2023-03-23 13:30:02 +00:00
|
|
|
* @permission ohos.permission.GET_TELEPHONY_STATE
|
2023-03-16 02:42:35 +00:00
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-03-21 13:58:30 +00:00
|
|
|
function getVoNRState(slotId: number, callback: AsyncCallback<VoNRState>): void;
|
2023-03-16 02:42:35 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-21 13:58:30 +00:00
|
|
|
* get voNR switch state
|
|
|
|
*
|
|
|
|
* @param slotId Indicates the card slot index number,
|
|
|
|
* ranging from 0 to the maximum card slot index number supported by the device.
|
|
|
|
* @returns {Promise <VoNRState>} the voNR state.
|
2023-03-23 13:30:02 +00:00
|
|
|
* @permission ohos.permission.GET_TELEPHONY_STATE
|
2023-03-21 13:58:30 +00:00
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 10
|
|
|
|
*/
|
|
|
|
function getVoNRState(slotId: number): Promise<VoNRState>;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* if user can set CallTransfer with Time
|
|
|
|
*
|
|
|
|
* @param slotId Indicates the card slot index number,
|
|
|
|
* ranging from 0 to the maximum card slot index number supported by the device.
|
|
|
|
* @param {AsyncCallback <boolean>} callback - if user can set
|
2023-03-23 13:30:02 +00:00
|
|
|
* @permission ohos.permission.GET_TELEPHONY_STATE
|
2023-03-21 13:58:30 +00:00
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
2023-03-16 02:42:35 +00:00
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 10
|
|
|
|
*/
|
|
|
|
function canSetCallTransferTime(slotId: number, callback: AsyncCallback<boolean>): void;
|
2023-03-21 13:58:30 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* if user can set CallTransfer with Time
|
|
|
|
*
|
|
|
|
* @param slotId Indicates the card slot index number,
|
|
|
|
* ranging from 0 to the maximum card slot index number supported by the device.
|
|
|
|
* @returns {Promise <boolean>} - if user can set
|
2023-03-23 13:30:02 +00:00
|
|
|
* @permission ohos.permission.GET_TELEPHONY_STATE
|
2023-03-21 13:58:30 +00:00
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-03-16 02:42:35 +00:00
|
|
|
function canSetCallTransferTime(slotId: number): Promise<boolean>;
|
|
|
|
|
2023-03-23 13:30:02 +00:00
|
|
|
/**
|
|
|
|
* Enters the secret code on the keypad
|
|
|
|
*
|
|
|
|
* @param inputCode indicates the secret code to enter.
|
|
|
|
* @param {AsyncCallback <void>} callback
|
|
|
|
* @permission ohos.permission.PLACE_CALL
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 10
|
|
|
|
*/
|
|
|
|
function inputDialerSpecialCode(inputCode: string, callback: AsyncCallback<void>): void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Enters the secret code on the keypad
|
|
|
|
*
|
|
|
|
* @param inputCode indicates the secret code to enter.
|
|
|
|
* @returns {Promise <void>}
|
|
|
|
* @permission ohos.permission.PLACE_CALL
|
|
|
|
* @throws {BusinessError} 201 - Permission denied.
|
|
|
|
* @throws {BusinessError} 401 - Parameter error.
|
|
|
|
* @throws {BusinessError} 8300001 - Invalid parameter value.
|
|
|
|
* @throws {BusinessError} 8300002 - Operation failed. Cannot connect to service.
|
|
|
|
* @throws {BusinessError} 8300003 - System internal error.
|
|
|
|
* @throws {BusinessError} 8300999 - Unknown error code.
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 10
|
|
|
|
*/
|
|
|
|
function inputDialerSpecialCode(inputCode: string): Promise<void>;
|
|
|
|
|
2022-02-18 08:45:55 +00:00
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
export enum ImsCallMode {
|
|
|
|
CALL_MODE_AUDIO_ONLY = 0,
|
|
|
|
CALL_MODE_SEND_ONLY,
|
|
|
|
CALL_MODE_RECEIVE_ONLY,
|
|
|
|
CALL_MODE_SEND_RECEIVE,
|
|
|
|
CALL_MODE_VIDEO_PAUSED,
|
|
|
|
}
|
|
|
|
|
2023-03-21 13:58:30 +00:00
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 10
|
|
|
|
*/
|
|
|
|
export enum VoNRState {
|
|
|
|
VONR_STATE_ON = 0,
|
|
|
|
VORN_STATE_OFF,
|
|
|
|
}
|
|
|
|
|
2022-02-18 08:45:55 +00:00
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
export enum AudioDevice {
|
2022-09-08 06:40:08 +00:00
|
|
|
DEVICE_EARPIECE,
|
2022-02-18 08:45:55 +00:00
|
|
|
DEVICE_SPEAKER,
|
|
|
|
DEVICE_WIRED_HEADSET,
|
2022-09-08 06:40:08 +00:00
|
|
|
DEVICE_BLUETOOTH_SCO,
|
|
|
|
DEVICE_MIC,
|
2022-02-18 08:45:55 +00:00
|
|
|
}
|
|
|
|
|
2023-03-16 02:42:35 +00:00
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 10
|
|
|
|
*/
|
2023-03-16 03:40:55 +00:00
|
|
|
export enum AudioDeviceType {
|
|
|
|
DEVICE_EARPIECE,
|
|
|
|
DEVICE_SPEAKER,
|
|
|
|
DEVICE_WIRED_HEADSET,
|
|
|
|
DEVICE_BLUETOOTH_SCO,
|
|
|
|
}
|
2023-03-16 02:42:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 10
|
|
|
|
*/
|
|
|
|
export interface AudioDevice {
|
|
|
|
deviceType: AudioDeviceType;
|
|
|
|
address?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 10
|
|
|
|
*/
|
|
|
|
export interface AudioDeviceInfo {
|
|
|
|
/** Indicates the list of support audiodevice. */
|
|
|
|
audioDeviceList: Array<AudioDevice>;
|
|
|
|
/** Indicates the type of current audiodevice. */
|
|
|
|
currentAudioDevice: AudioDevice;
|
|
|
|
/** Indicates the status of mute. */
|
|
|
|
isMuted: boolean;
|
|
|
|
}
|
|
|
|
|
2022-02-18 08:45:55 +00:00
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
export enum CallRestrictionType {
|
|
|
|
RESTRICTION_TYPE_ALL_INCOMING = 0,
|
|
|
|
RESTRICTION_TYPE_ALL_OUTGOING,
|
|
|
|
RESTRICTION_TYPE_INTERNATIONAL,
|
|
|
|
RESTRICTION_TYPE_INTERNATIONAL_EXCLUDING_HOME,
|
|
|
|
RESTRICTION_TYPE_ROAMING_INCOMING,
|
|
|
|
RESTRICTION_TYPE_ALL_CALLS,
|
|
|
|
RESTRICTION_TYPE_OUTGOING_SERVICES,
|
|
|
|
RESTRICTION_TYPE_INCOMING_SERVICES,
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
export interface CallTransferInfo {
|
2022-12-05 06:30:54 +00:00
|
|
|
/**
|
|
|
|
* Phone number.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 8
|
|
|
|
*/
|
2022-03-01 04:11:12 +00:00
|
|
|
transferNum: string;
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Call forwarding type.
|
|
|
|
*
|
|
|
|
* @since 8
|
|
|
|
*/
|
2022-03-01 04:11:12 +00:00
|
|
|
type: CallTransferType;
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Call forwarding setting type.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 8
|
|
|
|
*/
|
2022-03-01 04:11:12 +00:00
|
|
|
settingType: CallTransferSettingType;
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Start time hours.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
startHour?: number;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Start time minutes.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
startMinute?: number;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* End time hours.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
endHour?: number;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* End time minutes.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
endMinute?: number;
|
2022-02-18 08:45:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
export enum CallTransferType {
|
|
|
|
TRANSFER_TYPE_UNCONDITIONAL = 0,
|
|
|
|
TRANSFER_TYPE_BUSY,
|
|
|
|
TRANSFER_TYPE_NO_REPLY,
|
|
|
|
TRANSFER_TYPE_NOT_REACHABLE,
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
export enum CallTransferSettingType {
|
|
|
|
CALL_TRANSFER_DISABLE = 0,
|
|
|
|
CALL_TRANSFER_ENABLE = 1,
|
|
|
|
CALL_TRANSFER_REGISTRATION = 3,
|
|
|
|
CALL_TRANSFER_ERASURE = 4,
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
export interface CallAttributeOptions {
|
2022-03-01 04:11:12 +00:00
|
|
|
accountNumber: string;
|
|
|
|
speakerphoneOn: boolean;
|
|
|
|
accountId: number;
|
|
|
|
videoState: VideoStateType;
|
|
|
|
startTime: number;
|
|
|
|
isEcc: boolean;
|
|
|
|
callType: CallType;
|
|
|
|
callId: number;
|
|
|
|
callState: DetailedCallState;
|
|
|
|
conferenceState: ConferenceState;
|
2022-02-18 08:45:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
export enum ConferenceState {
|
|
|
|
TEL_CONFERENCE_IDLE = 0,
|
|
|
|
TEL_CONFERENCE_ACTIVE,
|
|
|
|
TEL_CONFERENCE_DISCONNECTING,
|
|
|
|
TEL_CONFERENCE_DISCONNECTED,
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
export enum CallType {
|
|
|
|
TYPE_CS = 0, // CS
|
|
|
|
TYPE_IMS = 1, // IMS
|
|
|
|
TYPE_OTT = 2, // OTT
|
|
|
|
TYPE_ERR_CALL = 3, // OTHER
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
export enum VideoStateType {
|
|
|
|
TYPE_VOICE = 0, // Voice
|
|
|
|
TYPE_VIDEO, // Video
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
export enum DetailedCallState {
|
|
|
|
CALL_STATUS_ACTIVE = 0,
|
|
|
|
CALL_STATUS_HOLDING,
|
|
|
|
CALL_STATUS_DIALING,
|
|
|
|
CALL_STATUS_ALERTING,
|
|
|
|
CALL_STATUS_INCOMING,
|
|
|
|
CALL_STATUS_WAITING,
|
|
|
|
CALL_STATUS_DISCONNECTED,
|
|
|
|
CALL_STATUS_DISCONNECTING,
|
|
|
|
CALL_STATUS_IDLE,
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
export interface CallRestrictionInfo {
|
2022-03-01 04:11:12 +00:00
|
|
|
type: CallRestrictionType;
|
|
|
|
password: string;
|
|
|
|
mode: CallRestrictionMode;
|
2022-02-18 08:45:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
export enum CallRestrictionMode {
|
|
|
|
RESTRICTION_MODE_DEACTIVATION = 0,
|
|
|
|
RESTRICTION_MODE_ACTIVATION,
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
export interface CallEventOptions {
|
|
|
|
eventId: CallAbilityEventId,
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
export enum CallAbilityEventId {
|
|
|
|
EVENT_DIAL_NO_CARRIER = 1,
|
|
|
|
EVENT_INVALID_FDN_NUMBER,
|
|
|
|
}
|
|
|
|
|
|
|
|
export enum CallState {
|
|
|
|
/**
|
|
|
|
* Indicates an invalid state, which is used when the call state fails to be obtained.
|
|
|
|
*/
|
|
|
|
CALL_STATE_UNKNOWN = -1,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicates that there is no ongoing call.
|
|
|
|
*/
|
|
|
|
CALL_STATE_IDLE = 0,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicates that an incoming call is ringing or waiting.
|
|
|
|
*/
|
|
|
|
CALL_STATE_RINGING = 1,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicates that a least one call is in the dialing, active, or hold state, and there is no new incoming call
|
|
|
|
* ringing or waiting.
|
|
|
|
*/
|
|
|
|
CALL_STATE_OFFHOOK = 2
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface DialOptions {
|
|
|
|
/**
|
|
|
|
* boolean means whether the call to be made is a video call. The value {@code false} indicates a voice call.
|
|
|
|
*/
|
|
|
|
extras?: boolean;
|
2022-12-05 06:30:54 +00:00
|
|
|
|
2022-02-18 08:45:55 +00:00
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
accountId?: number;
|
2022-12-05 06:30:54 +00:00
|
|
|
|
2022-02-18 08:45:55 +00:00
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
videoState?: VideoStateType;
|
2022-12-05 06:30:54 +00:00
|
|
|
|
2022-02-18 08:45:55 +00:00
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
dialScene?: DialScene;
|
2022-12-05 06:30:54 +00:00
|
|
|
|
2022-02-18 08:45:55 +00:00
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
dialType?: DialType;
|
|
|
|
}
|
|
|
|
|
2023-02-06 12:23:33 +00:00
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
export interface DialCallOptions {
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
*/
|
|
|
|
accountId?: number;
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
*/
|
|
|
|
videoState?: VideoStateType;
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
*/
|
|
|
|
dialScene?: DialScene;
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
*/
|
|
|
|
dialType?: DialType;
|
|
|
|
}
|
|
|
|
|
2022-02-18 08:45:55 +00:00
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
export enum DialScene {
|
|
|
|
CALL_NORMAL = 0,
|
|
|
|
CALL_PRIVILEGED = 1,
|
|
|
|
CALL_EMERGENCY = 2,
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
export enum DialType {
|
|
|
|
DIAL_CARRIER_TYPE = 0,
|
|
|
|
DIAL_VOICE_MAIL_TYPE = 1,
|
|
|
|
DIAL_OTT_TYPE = 2,
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
export interface RejectMessageOptions {
|
|
|
|
messageContent: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
export interface CallTransferResult {
|
2022-12-05 06:30:54 +00:00
|
|
|
/**
|
|
|
|
* Call forwarding status.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
status: TransferStatus;
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Call forwarding phone number.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
number: string;
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Start time hours.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
startHour: number;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Start time minutes.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
startMinute: number;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* End time hours.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
endHour: number;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* End time minutes.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
endMinute: number;
|
2022-02-18 08:45:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
export enum CallWaitingStatus {
|
2022-12-05 06:30:54 +00:00
|
|
|
/**
|
|
|
|
* Indicates that call waiting is not enabled.
|
|
|
|
*
|
|
|
|
* @since 7
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
CALL_WAITING_DISABLE = 0,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicates that call waiting is enabled.
|
|
|
|
*
|
|
|
|
* @since 7
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
CALL_WAITING_ENABLE = 1
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
export enum RestrictionStatus {
|
2022-12-05 06:30:54 +00:00
|
|
|
/**
|
|
|
|
* Indicates that call barring is not enabled.
|
|
|
|
*
|
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
RESTRICTION_DISABLE = 0,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicates that call barring is enabled.
|
|
|
|
*
|
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
RESTRICTION_ENABLE = 1
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
|
|
|
export enum TransferStatus {
|
2022-12-05 06:30:54 +00:00
|
|
|
/**
|
|
|
|
* Indicates that call forwarding is not enabled.
|
|
|
|
*
|
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
TRANSFER_DISABLE = 0,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicates that call forwarding is enabled.
|
|
|
|
*
|
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
TRANSFER_ENABLE = 1
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
export interface EmergencyNumberOptions {
|
2022-12-05 06:30:54 +00:00
|
|
|
/**
|
|
|
|
* Indicates sim card slot number.
|
|
|
|
*
|
|
|
|
* @since 7
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
slotId?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @since 7
|
|
|
|
*/
|
|
|
|
export interface NumberFormatOptions {
|
2022-12-05 06:30:54 +00:00
|
|
|
/**
|
|
|
|
* Indicates the country code.
|
|
|
|
*
|
|
|
|
* @since 7
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
countryCode?: string;
|
|
|
|
}
|
|
|
|
|
2022-09-08 06:40:08 +00:00
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
export interface AudioDeviceOptions {
|
2022-12-05 06:30:54 +00:00
|
|
|
/**
|
|
|
|
* Indicates the bluetooth device address.
|
|
|
|
*
|
|
|
|
* @since 9
|
|
|
|
*/
|
2022-09-08 06:40:08 +00:00
|
|
|
bluetoothAddress?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
export interface MmiCodeResults {
|
2022-12-05 06:30:54 +00:00
|
|
|
/**
|
|
|
|
* Indicates the result of MMI code.
|
|
|
|
*
|
|
|
|
* @since 9
|
|
|
|
*/
|
2022-09-08 06:40:08 +00:00
|
|
|
result: MmiCodeResult;
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicates the message of MMI code.
|
|
|
|
*
|
|
|
|
* @since 9
|
|
|
|
*/
|
2022-09-08 06:40:08 +00:00
|
|
|
message: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
export enum MmiCodeResult {
|
2022-12-05 06:30:54 +00:00
|
|
|
/** Indicates the result of MMI code with successfully.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
2022-09-08 06:40:08 +00:00
|
|
|
MMI_CODE_SUCCESS = 0,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/** Indicates the result of MMI code with failed.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
2022-09-08 06:40:08 +00:00
|
|
|
MMI_CODE_FAILED = 1
|
|
|
|
}
|
|
|
|
|
2022-02-18 08:45:55 +00:00
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 8
|
|
|
|
*/
|
2022-12-05 06:30:54 +00:00
|
|
|
export enum DisconnectedReason {
|
|
|
|
/**
|
|
|
|
* Unassigned number.
|
|
|
|
*
|
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
UNASSIGNED_NUMBER = 1,
|
2022-12-05 07:09:13 +00:00
|
|
|
|
2022-12-05 06:30:54 +00:00
|
|
|
/**
|
|
|
|
* No route to destination.
|
|
|
|
*
|
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
NO_ROUTE_TO_DESTINATION = 3,
|
2022-12-05 07:09:13 +00:00
|
|
|
|
2022-12-05 06:30:54 +00:00
|
|
|
/**
|
|
|
|
* Channel unacceptable.
|
|
|
|
*
|
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
CHANNEL_UNACCEPTABLE = 6,
|
2022-12-05 07:09:13 +00:00
|
|
|
|
2022-12-05 06:30:54 +00:00
|
|
|
/**
|
|
|
|
* Operator determined barring.
|
|
|
|
*
|
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
OPERATOR_DETERMINED_BARRING = 8,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Call completed elsewhere.
|
|
|
|
*
|
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
CALL_COMPLETED_ELSEWHERE = 13,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Normal call clearing.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
NORMAL_CALL_CLEARING = 16,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* User busy.
|
|
|
|
*
|
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
USER_BUSY = 17,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* No user responding.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
NO_USER_RESPONDING = 18,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* User alerting, no answer.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
USER_ALERTING_NO_ANSWER = 19,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Call rejected.
|
|
|
|
*
|
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
CALL_REJECTED = 21,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Number changed.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
NUMBER_CHANGED = 22,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Call rejected due to feature at the destination.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
CALL_REJECTED_DUE_TO_FEATURE_AT_THE_DESTINATION = 24,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Pre-emption.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
FAILED_PRE_EMPTION = 25,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Non selected user clearing.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
NON_SELECTED_USER_CLEARING = 26,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Destination out of order.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
DESTINATION_OUT_OF_ORDER = 27,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Invalid number format.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
INVALID_NUMBER_FORMAT = 28,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Facility rejected.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
FACILITY_REJECTED = 29,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Response to status enquiry.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
RESPONSE_TO_STATUS_ENQUIRY = 30,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Normal, unspecified.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
NORMAL_UNSPECIFIED = 31,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* No circuit/channel available.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
NO_CIRCUIT_CHANNEL_AVAILABLE = 34,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Network out of order.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
NETWORK_OUT_OF_ORDER = 38,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Temporary failure.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
TEMPORARY_FAILURE = 41,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Switching equipment congestion.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
SWITCHING_EQUIPMENT_CONGESTION = 42,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Access information discarded.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
ACCESS_INFORMATION_DISCARDED = 43,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Requested circuit/channel not available.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
REQUEST_CIRCUIT_CHANNEL_NOT_AVAILABLE = 44,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Resources unavailable unspecified.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
RESOURCES_UNAVAILABLE_UNSPECIFIED = 47,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Quality of service unavailable.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
QUALITY_OF_SERVICE_UNAVAILABLE = 49,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Requested facility not subscribed.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Incoming calls barred within the CUG.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
INCOMING_CALLS_BARRED_WITHIN_THE_CUG = 55,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bearer capability not authorized.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bearer capability not presently available.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
BEARER_CAPABILITY_NOT_PRESENTLY_AVAILABLE = 58,
|
|
|
|
|
|
|
|
/**
|
2022-12-07 08:27:48 +00:00
|
|
|
* Service or option not available, unspecified.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
SERVICE_OR_OPTION_NOT_AVAILABLE_UNSPECIFIED = 63,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bearer service not implemented.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
BEARER_SERVICE_NOT_IMPLEMENTED = 65,
|
|
|
|
|
|
|
|
/**
|
2022-12-07 08:27:48 +00:00
|
|
|
* ACM equal to or greater than the maximum value.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
2022-12-07 08:27:48 +00:00
|
|
|
ACM_EQUALTO_OR_GREATER_THAN_THE_MAXIMUM_VALUE = 68,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Requested facility not implemented.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Only restricted digital info BC available.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
ONLY_RESTRICTED_DIGITAL_INFO_BEARER_CAPABILITY_IS_AVAILABLE = 70,
|
|
|
|
|
|
|
|
/**
|
2022-12-07 08:27:48 +00:00
|
|
|
* Service or option not implemented, unspecified.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
SERVICE_OR_OPTION_NOT_IMPLEMENTED_UNSPECIFIED = 79,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Invalid transaction identifier value.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
INVALID_TRANSACTION_IDENTIFIER_VALUE = 81,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* User not member of CUG.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
USER_NOT_MEMBER_OF_CUG = 87,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Incompatible destination.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
INCOMPATIBLE_DESTINATION = 88,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Invalid transit network selection.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
INVALID_TRANSIT_NETWORK_SELECTION = 91,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Semantically incorrect message.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
SEMANTICALLY_INCORRECT_MESSAGE = 95,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Invalid mandatory information.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
INVALID_MANDATORY_INFORMATION = 96,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Msg type non-existent or not implemented.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
MESSAGE_TYPE_NON_EXISTENT_OR_NOT_IMPLEMENTED = 97,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Msg type not compatible with protocol state.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* IE non-existent or not implemented.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
INFORMATION_ELEMENT_NON_EXISTENT_OR_NOT_IMPLEMENTED = 99,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Conditional IE error.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
CONDITIONAL_IE_ERROR = 100,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Message not compatible with protocol state.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Recovery on timer expiry timer number.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
RECOVERY_ON_TIMER_EXPIRED = 102,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Protocol error, unspecified.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
PROTOCOL_ERROR_UNSPECIFIED = 111,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interworking, unspecified.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
INTERWORKING_UNSPECIFIED = 127,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Call barred.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
CALL_BARRED = 240,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* FDN blocked.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
FDN_BLOCKED = 241,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* IMSI in VLR is unknown.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
IMSI_UNKNOWN_IN_VLR = 242,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* IMEI not accepted.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
IMEI_NOT_ACCEPTED = 243,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Dial modified to USSD.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
DIAL_MODIFIED_TO_USSD = 244,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Dial modified to SS.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
DIAL_MODIFIED_TO_SS = 245,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Dial modified to dial.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
DIAL_MODIFIED_TO_DIAL = 246,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Radio off.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
RADIO_OFF = 247,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Out of service.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
OUT_OF_SERVICE = 248,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Invalid SIM.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
NO_VALID_SIM = 249,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Radio internal error.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
RADIO_INTERNAL_ERROR = 250,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Network response timeout.
|
|
|
|
*
|
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
NETWORK_RESP_TIMEOUT = 251,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Network reject.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
NETWORK_REJECT = 252,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Radio access failure.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
RADIO_ACCESS_FAILURE = 253,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Radio link failure.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
RADIO_LINK_FAILURE = 254,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Radio link lost.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
RADIO_LINK_LOST = 255,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Radio uplink failure.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
RADIO_UPLINK_FAILURE = 256,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Radio setup failure.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
RADIO_SETUP_FAILURE = 257,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Radio release normal.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
RADIO_RELEASE_NORMAL = 258,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Radio release abnormal.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
RADIO_RELEASE_ABNORMAL = 259,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Access class blocked.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
ACCESS_CLASS_BLOCKED = 260,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Network detach.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
NETWORK_DETACH = 261,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Invalid parameter.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
INVALID_PARAMETER = 1025,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sim not exit.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
SIM_NOT_EXIT = 1026,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sim pin need.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
SIM_PIN_NEED = 1027,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Call Not allow.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
CALL_NOT_ALLOW = 1029,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sim invalid.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
SIM_INVALID = 1045,
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Unknown error.
|
2023-02-06 12:23:33 +00:00
|
|
|
*
|
2022-12-05 06:30:54 +00:00
|
|
|
* @since 8
|
|
|
|
*/
|
2022-02-18 08:45:55 +00:00
|
|
|
UNKNOWN = 1279,
|
2022-08-09 09:37:41 +00:00
|
|
|
}
|
2022-12-05 06:30:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @systemapi Hide this for inner system use.
|
|
|
|
* @since 9
|
|
|
|
*/
|
|
|
|
export interface DisconnectedDetails {
|
|
|
|
/**
|
|
|
|
* Indicates the reason for ending the call.
|
|
|
|
*/
|
|
|
|
reason: DisconnectedReason;
|
|
|
|
/**
|
|
|
|
* Indicates the message for ending the call.
|
|
|
|
*/
|
|
|
|
message: string;
|
|
|
|
}
|
2022-02-18 08:45:55 +00:00
|
|
|
}
|
|
|
|
|
2022-10-13 13:33:00 +00:00
|
|
|
export default call;
|