Key Flows (Sequence Diagrams)


10 Key Flows (Sequence Diagrams)

sequenceDiagram
    participant A
    participant B
    A->>B: ping
    B-->>A: pong

This chapter describes a recommended way to understand “operations + events”: after you call an operation, you receive the operation response first, then the subsequent process events.

Notes: Diagrams are written in Mermaid (some renderers require Mermaid support enabled).

1. Preview Outbound Call (previewObCall)

Involves:

  • Operation response: previewObCallResp
  • Process events: previewObCallResult / previewObCallStart / previewObCallRinging / previewObCallBridge
sequenceDiagram
    participant SDK
    participant WS
    participant SVC

    SDK->>WS: previewObCall(params)
    WS->>SVC: Forward previewObCall
    SVC-->>WS: previewObCallResp response code
    WS-->>SDK: previewObCallResp

    SVC-->>WS: previewObCallResult result
    WS-->>SDK: previewObCallResult
    SVC-->>WS: previewObCallStart start dialing customer
    WS-->>SDK: previewObCallStart
    SVC-->>WS: previewObCallRinging customer ringing
    WS-->>SDK: previewObCallRinging
    SVC-->>WS: previewObCallBridge bridged
    WS-->>SDK: previewObCallBridge

2. Consult (startAtxfer)

Involves:

  • Operation response: startAtxferResp
  • Process events: atxferStart / atxferLink / atxferEnded / atxferError
sequenceDiagram
    participant SDK
    participant WS
    participant SVC

    SDK->>WS: startAtxfer(params)
    WS->>SVC: Forward startAtxfer(params)
    SVC-->>WS: startAtxferResp response code
    WS-->>SDK: startAtxferResp

    SVC-->>WS: atxferStart consult started
    WS-->>SDK: atxferStart
    SVC-->>WS: atxferLink consult connected
    WS-->>SDK: atxferLink
    SVC-->>WS: atxferEnded consult ended
    WS-->>SDK: atxferEnded
    SVC-->>WS: atxferError consult failed
    WS-->>SDK: atxferError

3. Consult three-way (threewayAtxfer)

Involves:

  • Operation response: threewayAtxferResp
  • Process events: threewayAtxferResult / atxferThreewayUnlink
sequenceDiagram
    participant SDK
    participant WS
    participant SVC

    SDK->>WS: threewayAtxfer(params)
    WS->>SVC: Forward threewayAtxfer(params)
    SVC-->>WS: threewayAtxferResp response code
    WS-->>SDK: threewayAtxferResp

    SVC-->>WS: threewayAtxferResult three way result
    WS-->>SDK: threewayAtxferResult
    SVC-->>WS: atxferThreewayUnlink three way ended
    WS-->>SDK: atxferThreewayUnlink

4. Consult transfer (completeAtxfer)

Involves:

  • Operation response: completeAtxferResp
  • Process event: completeAtxferResult
sequenceDiagram
    participant SDK
    participant WS
    participant SVC

    SDK->>WS: completeAtxfer(params)
    WS->>SVC: Forward completeAtxfer(params)
    SVC-->>WS: completeAtxferResp response code
    WS-->>SDK: completeAtxferResp

    SVC-->>WS: completeAtxferResult consult transfer result
    WS-->>SDK: completeAtxferResult