Interface IEasyCallControlBase

Base interface containing APIs shared between ISingleCallControl and IMultiCallControl.

interface IEasyCallControlBase {
    device: IDevice;
    muteState: Observable<MuteState>;
    onDisconnect: Observable<void>;
    ringState: Observable<boolean>;
    endCall(): Promise<void>;
    mute(): Promise<void>;
    mute(): void;
    rejectIncomingCall(): void;
    signalIncomingCall(ringTimeout?: number): Promise<boolean>;
    startCall(): Promise<void>;
    teardown(): void;
    unmute(): void;
}

Hierarchy (View Summary)

Methods

  • Ends the current call.

    Returns Promise<void>

    If a call is not active.

  • Mutes the device.

    Returns Promise<void>

    You can only change the mute state while the device is in an active call.

    If a call is not active.

  • Mute the device.

    Returns void

    If a call is not active.

    Return type has changed. Now it returns Promise<void> instead of void. Nevertheless, the API will still work without awaiting.

  • Rejects an incoming call.

    Returns void

    The call can be rejected by the user by interacting with their device or with your softphone. In the first case, the incoming call will be automatically rejected and IEasyCallControlBase.signalIncomingCall will resolve with false. The second case requires your softphone to manually call this method, before the incoming call is rejected and IEasyCallControlBase.signalIncomingCall is resolved with false.

    If an incoming call is not pending.

  • Signals that there is an incoming call. The promise resolves only once the incoming call is either accepted or rejected.

    Parameters

    • OptionalringTimeout: number

      Optional parameter, determining how long before the incoming call is automatically rejected due to a timeout.

    Returns Promise<boolean>

    true if the call was accepted, and false if rejected.

    On most devices, this starts the device ringer.

    If the device is locked by another softphone.

  • Sets the device into call state.

    Returns Promise<void>

    If the device is used by another softphone.

  • Teardown the Easy Call Control instance.

    All internal state subscriptions will be stopped to avoid potential memory leaks, and the internal call lock will be released if taken.

    After using this method, you must create a new Easy Call Control instance to continue usage.

    Returns void

    Use this when you want to stop using the ISingleCallControl or IMultiCallControl object but the connection to the device is still active (e.g. when changing device or navigating between views).

  • Unmutes the device.

    Returns void

    You can only change the mute state while the device is in an active call.

    If a call is not active.

Properties

device: IDevice

The single physical device to which the easy call control functionalities are associated to.

muteState: Observable<MuteState>

Emits the mute state of the device whenever that state changes.

This can happen due to interaction with the device (e.g. raising the boom arm) or due to interaction with your softphone (e.g. pressing a mute button in the GUI).

onDisconnect: Observable<void>

Emits when the connection used for easy call control gets disconnected.

If this observable emits, the connection and thus the Easy Call Control instance can no longer be used.

If this happens, for example, in the middle of a call, you can select a new device (or the same device with another connection) and recover the state. See ISingleInitialState or IMultiInitialState and for examples refer to the 'Easy Call Control' chapter of the 'Managing Calls' section of the JavaScript Developer's Guide.

ringState: Observable<boolean>

Emits the ring state of the device whenever that state changes.

This can happen whenever a new incoming call is signalled, and whenever that incoming call is accepted or rejected.