Options
All
  • Public
  • Public/Protected
  • All
Menu

Call hold a physical instance of a call. They provide useful information but also methods to change the state of the call.

callid

: unique identifier used for Jorel protocol

primarycallid

: link to first call of the chain if existing

rtcpeerconnection

: the WebRTC interface

channel

: holds the media stream (input/output)

verto

: holds a reference to Verto singleton

phonenumber

: peer phone number

direction

: call's direction

states

: array containing all the call's status update with a Datetime.

initialpayload

: complete payload received/sent to start the call

Hierarchy

  • Call

Index

Constructors

constructor

  • new Call(callId: string, verto: Verto, phoneNumber: string, login: string, rtcPeerConnection: RTCPeerConnection, direction: "outbound" | "inbound", initialPayload?: any): Call
  • Parameters

    • callId: string
    • verto: Verto
    • phoneNumber: string
    • login: string
    • rtcPeerConnection: RTCPeerConnection
    • direction: "outbound" | "inbound"
    • Optional initialPayload: any

    Returns Call

Properties

Readonly callId

callId: string

Readonly channel

channel: MediaChannel

Readonly direction

direction: "outbound" | "inbound" | "internal" | "service"

Private Optional Readonly initialPayload

initialPayload: any

Readonly phoneNumber

phoneNumber: string

Optional Readonly primaryCallId

primaryCallId: undefined | string

Readonly rtcPeerConnection

rtcPeerConnection: RTCPeerConnection

Readonly states

states: CallState[] = []

Readonly verto

verto: Verto

Methods

answer

  • answer(): void
  • Use when current state is ringing to switch the call to active

    Returns void

attendedTransfer

  • attendedTransfer(destination: string): Call | undefined
  • Start an attended transfer. Attended transfer set the current call on hold and call @destination Use proceedAttendedTransfer to confirm the transfer

    Parameters

    • destination: string

    Returns Call | undefined

blindTransfer

  • blindTransfer(destination: string): void
  • Stop the current call and directly forward the correspondant to @destination

    Parameters

    • destination: string

    Returns void

dtmf

  • dtmf(char: string): void
  • Use to send a digit

    Parameters

    • char: string

    Returns void

hangup

  • hangup(): void
  • Use when current state is 'ringing' or 'active' to stop the call

    Returns void

hold

  • hold(): void

mute

  • mute(): void

proceedAttendedTransfer

  • proceedAttendedTransfer(transferCall: Call): void
  • Confirm an attended transfer. Stop the current call and create a new call between the initial correspondant and the @destination

    Parameters

    • transferCall: Call

    Returns void

pushState

  • Push state add a new state in the stack and throw an event

    Parameters

    Returns void

recover

  • recover(): void
  • Recover the call currently in recovering state

    Returns void

Private toggleSelfStream

  • toggleSelfStream(enabled: boolean): void

unhold

  • unhold(): void

unmute

  • unmute(): void

Legend

  • Constructor
  • Property
  • Method
  • Private property
  • Private method
  • Static property
  • Static method
  • Property
  • Protected method

Generated using TypeDoc