Interface ICallControl

Defines the necessary functionality for call control:

  • being able to start/end a call,
  • mute/unmute the microphone,
  • hold/resume a call,
  • start/stop the ringer on the device,
  • events for emitted signals from the device, and
  • the required call lock for executing all of these functions.

All of this functionality is associated with a single physical device. For every connected Jabra headset, there is an additional instance of ICallControl that is used to manipulate its call-related state and functionality.

interface ICallControl {
    device: IDevice;
    deviceSignals: Observable<ICallControlSignal>;
    onDisconnect: Observable<void>;
    hold(shouldHold: boolean): void;
    mute(shouldMute: boolean): void;
    offHook(isOffHook: boolean): void;
    releaseCallLock(): void;
    ring(shouldRing: boolean): void;
    takeCallLock(): Promise<boolean>;
}

Methods

  • Tells the device whether an active call was put on hold or a held up call was resumed.

    Parameters

    • shouldHold: boolean

      true when a call gets put on hold, false when it is resumed.

    Returns void

    If a call lock was not acquired prior to execution. See ICallControl.takeCallLock for more details.

  • Mutes or unmutes the microphone of the Jabra device.

    Parameters

    • shouldMute: boolean

      true to mute the device, false to unmute it.

    Returns void

    Should only be used during a call.

    If a call lock was not acquired prior to execution. See ICallControl.takeCallLock for more details.

  • Informs the Jabra device that there's a change in the call status.

    Parameters

    • isOffHook: boolean

      The new offHook status of the device. Use true when a call becomes active, regardless of call type (outgoing or incoming). Use false when a call has ended and the device is no longer used.

    Returns void

    This controls if the device considers itself in an active call. When offHook is true, a call is ongoing, otherwise there is no active call.

    If a call lock was not acquired prior to execution. See ICallControl.takeCallLock for more details.

  • Releases a previously acquired call lock.

    Releasing the call lock is the last step in performing call control operations so remember to execute it once you are done with the Jabra device.

    Returns void

    If there is no active call lock imposed on the device by your softphone.

  • Starts or ends the "ring" effect on the Jabra device. Used to indicate an incoming call.

    Parameters

    • shouldRing: boolean

      true to start the "ring" effect, false to stop it.

    Returns void

    If a call lock was not acquired prior to execution. See ICallControl.takeCallLock for more details.

  • Tries to acquire a call lock. The call lock is a unique, per-device lock, and is required to change the device state. Acquiring a call lock must be the first step in performing call control operations.

    Returns Promise<boolean>

    A Promise that resolves with true if the call lock is successfully acquired, false otherwise.

    Acquiring a call lock can fail. This can happen for the following reasons:

    • The device is call locked by another softphone using the Jabra SDK, resulting in false being returned.
    • The device is call locked by another instance of your softphone implementation. This results in false being returned.
    • You've already call locked the device (and therefore can proceed with any other functionality that requires the call lock). This results in an Exception being thrown

    If you have already call locked the device.

Properties

device: IDevice

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

deviceSignals: Observable<ICallControlSignal>

Observable for signals emitted by the device.

Whenever the device sends a new signal, this observable will be populated with ICallControlSignal instances for each emission.

Reacting to incoming signals is an advanced topic. Before implementing your solution, we urge you to check out the section on Interacting with Jabra Devices in the Integrator's Guide.

An observable that emits signals.

onDisconnect: Observable<void>

Emits when the connection used for call control gets disconnected.