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.
Namespace: Jabra.NET.Sdk.Modules.CallControl
Assembly: Jabra.NET.Sdk.dll
Syntax
public interface ICallControl
Remarks
All of this functionality is associated with a single connection on a single physical device. For every connected Jabra device, there is an additional instance of ICallControl that is used to manipulate its call-related state and functionality.
Properties
Connection
Declaration
IConnection Connection { get; }
Property Value
Type | Description |
---|---|
IConnection | The single physical connection with which the call control functionalities are associated. |
DeviceSignals
Declaration
IObservable<ICallControlSignal> DeviceSignals { get; }
Property Value
Type | Description |
---|---|
System.IObservable<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. |
Remarks
OnDisconnect
Declaration
IObservable<Unit> OnDisconnect { get; }
Property Value
Type | Description |
---|---|
System.IObservable<System.Reactive.Unit> | Emits when the connection used for call control gets disconnected. |
Methods
Hold(Boolean)
Tells the device whether an active call was put on hold or a held up call was resumed.
Declaration
void Hold(bool shouldHold)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | shouldHold |
|
Exceptions
Type | Condition |
---|---|
JabraException | TakeCallLock() throws if a call lock was not acquired prior to execution. |
Mute(Boolean)
Mutes or unmutes the microphone of the device.
Declaration
void Mute(bool shouldMute)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | shouldMute |
|
Remarks
Should only be used during a call.
Exceptions
Type | Condition |
---|---|
JabraException | TakeCallLock() throws if a call lock was not acquired prior to execution. |
OffHook(Boolean)
Informs the device that there's a change in the call status.
Declaration
void OffHook(bool isOffHook)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isOffHook | The new offHook status of the device.
Use |
Remarks
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.
Exceptions
Type | Condition |
---|---|
JabraException | TakeCallLock() throws if a call lock was not acquired prior to execution. |
ReleaseCallLock()
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 device.
Declaration
void ReleaseCallLock()
Exceptions
Type | Condition |
---|---|
JabraException | If there is no active call lock imposed on the device by your softphone. |
Ring(Boolean)
Starts or ends the ringing effect on the device. Used to indicate an incoming call.
Declaration
void Ring(bool shouldRing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | shouldRing |
|
Exceptions
Type | Condition |
---|---|
JabraException | TakeCallLock() throws if a call lock was not acquired prior to execution. |
TakeCallLock()
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.
Declaration
Task<bool> TakeCallLock()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | A System.Threading.Tasks.Task that resolves with |
Remarks
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 a JabraException being thrown.
Exceptions
Type | Condition |
---|---|
JabraException | When the device is already call locked. |