Interface IMultiCallControl
Defines the necessary functionality for easy call control, when handling multiple calls.
This functionality includes:
- being able to start an outgoing call,
- signaling an incoming call, and answer and reject it,
- mute/unmute the microphone,
- subscribing to device events
- ending a call, and
- holding/resuming/swapping a call (unlike ISingleCallControl).
Inherited Members
Namespace: Jabra.NET.Sdk.Modules.EasyCallControl.Types
Assembly: Jabra.NET.Sdk.dll
Syntax
public interface IMultiCallControl : IEasyCallControlBase
Remarks
All of this functionality is associated with a single physical device. For every connected Jabra headset, there is an additional instance of IMultiCallControl that is used to manipulate its call-related state and functionality.
Properties
HoldState
Emits the hold state of the device whenever that state changes.
Declaration
IObservable<HoldState> HoldState { get; }
Property Value
Type | Description |
---|---|
System.IObservable<HoldState> |
Remarks
This can happen due to interaction with the device (the hold command can differ between devices, but is often triggered by long-pressing the start/end-call button) or due to interaction with your softphone (e.g.pressing a hold button in the GUI).
OngoingCalls
Emits the number of calls currently in progress.
0
means that the device is idle with no calls in progress,
while 1
or more signifies the number of calls currently active.
Starting a new call - or accepting an incoming call - will increment this counter. Similarly, ending a call will decrement the counter, until it reaches 0.
Declaration
IObservable<int> OngoingCalls { get; }
Property Value
Type | Description |
---|---|
System.IObservable<System.Int32> |
Remarks
To handle multiple-call scenarios ensure you keep your application's list of ongoing calls in sync with this count. To handle one active call at a time, do one of the following:
- treat this value as an ON-OFF toggle,
- optionally throw an error if the count increases to more than 1, which would mean something went wrong in the application logic, or
- use ISingleCallControl instead.
SwapRequest
Emits whenever swap request is triggered.
This can happen due to interaction with the device (most often the same button that triggers hold) or due to interaction with your softphone (e.g. pressing a swap button in the GUI).
Declaration
IObservable<Unit> SwapRequest { get; }
Property Value
Type | Description |
---|---|
System.IObservable<System.Reactive.Unit> |
Remarks
The observable does not emit any value, and it does not keep track of what call was swapped to or from - this should be handled by your softphone application.
The most common implementation pattern would be to maintain a list of ongoing calls in the softphone application. Then, whenever swap is triggered, the active call is moved to the next call in line.
Methods
AcceptIncomingCall(AcceptIncomingCallBehavior)
Accepts an incoming call and sets the device into call state.
Declaration
Task AcceptIncomingCall(AcceptIncomingCallBehavior behavior = AcceptIncomingCallBehavior.EndCurrent)
Parameters
Type | Name | Description |
---|---|---|
AcceptIncomingCallBehavior | behavior | Optionally controls the behavior when accepting an incoming call, defaults to END_CURRENT. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
Accepting an incoming call behaves differently whether called from idle (1) or while another call is active (2).
- From idle: the device is simply set into call state and the call counter is increased by one.
- While another call is active: depends on the behavior parameter. It can either be to end the current call and start a new call (default), or hold the current call and start a new call.
Exceptions
Type | Condition |
---|---|
JabraException | If an incoming call is not pending. |
EndAll()
Ends all current calls.
Declaration
Task EndAll()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Exceptions
Type | Condition |
---|---|
JabraException | If a call is not active. |
Hold()
Sets the current call on hold.
Declaration
Task Hold()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
You can only change the hold state while the device is in an active call.
Exceptions
Type | Condition |
---|---|
JabraException | If a call is not active. |
Resume()
Resumes the current call when on hold.
Declaration
Task Resume()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
You can only change the hold state while the device is in an active call.
Exceptions
Type | Condition |
---|---|
JabraException | If a call is not active, or if no call is on hold. |