Sequence Diagrams: Accepting and rejecting calls
This chapter provides examples of call control with sequence diagrams. The diagrams show how to handle signal acknowledgement in simple uses cases with one application (typically a Softphone or UC client).
Moreover, you can refer to examples in the Softphone meta-code for Jabra device interfacing document.
Be aware that the diagrams in the examples depict the user interaction with a Jabra device i.e., the communication between the Jabra device and the application.
Example 1: Accept Calls via Hardware Controls in Jabra Device
The following diagram illustrates a situation, where an incoming call is accepted by pressing the Answer button on the headset. The call is terminated by pressing the End button on the headset.
sequenceDiagram
participant User as User
participant App as Application
participant Device as Headset
App ->> App: Incoming call
Note over App: Acquire call lock
App -) Device: Ringer = 1
Note over Device: Headset starts ringing
User -->> Device: Accepts call by pressing the 'answer' button
Device ->> App: HookSwitch = 1
Note over App: App must acknowledge<br>this signal.
App -) Device: HookSwitch = 1
App -) Device: Ringer = 0
App -) App: Establish call
Device ->> App: LineBusy = 1
Note over User,Device: Call in progress...
User -->> Device: Ends call by pressing the 'end' button
Device ->> App: HookSwitch = 0
Note over App: App must acknowledge<br>this signal.
App -) Device: HookSwitch = 0
App -) App: Terminate call
Device ->> App: LineBusy = 0
Note over App: Release Call Lock
Example 2: Accept Calls via Software Button in Application
The following diagram illustrates a scenario where the user accepts an incoming call and ends the call, using the virtual buttons on the application UI.
sequenceDiagram
participant User as User
participant App as Application
participant Device as Headset
App ->> App: Incomimg call
Note over App: Acquire call lock
App -) Device: Ringer = 1
Note over Device: Headset starts ringer
User -->> App: Accepts call via the app UI
App -) Device: OffHook = 1
App -) Device: Ringer = 0
App -) App: Establish call
Note over Device: Headset stops ringing<br>and goes into call state
Device ->> App: OffHook = 1
Device ->> App: LineBusy = 1
Note over User,Device: Call in progress...
User -->> App: Ends call via the app UI
App -) App: Terminate call
App -) Device: OffHook = 0
Device ->> App: OffHook = 0
Device ->> App: LineBusy = 0
Note over App: Release Call Lock
Example 3: Reject call via Hardware Controls in Jabra Device
The following diagram illustrates a situation where the user rejects a call from the headset.
sequenceDiagram
participant User as User
participant App as Application
participant Device as Headset
App ->> App: Incomimg call
Note over App: Acquire call lock
App -) Device: Ringer = 1
Note over Device: Headset starts ringer
User -->> Device: Rejects call by double-pressing<br/>the 'multi-function' button
Device ->> App: Reject
App -) Device: Ringer = 0
Note over Device: Headset stops ringing
Note over App: Release Call Lock
For more information and sample codes on the examples, refer to the chapter Managing calls in the respective SDK documentation.