Options
All
  • Public
  • Public/Protected
  • All
Menu

Ziwo Client allow your to setup the environment. It will setup the WebRTC, open the WebSocket and do the required authentications

See README#Ziwo Client to see how to instanciate a new client. Make sure to wait for connected event before doing further action.

Once the client is instancied and you received the connected event, Ziwo is ready to be used and you can start a call by using startCall(phoneNumber:string) or simply wait for events to proc.

Hierarchy

  • ZiwoClient

Index

Constructors

constructor

Properties

Private apiService

apiService: ApiService

Private calls

calls: Call[] = []

Optional connectedAgent

connectedAgent: AgentInfo
connectedagent

provide useful information about the connected user See src/authentication.service.ts#AgentInfo for more details

Private debug

debug: boolean

io

options

Private verto

verto: Verto

Methods

addListener

  • addListener(func: Function): void
  • Add a callback function for all events Can be used instead of addEventListener NoteL Event thrown through this support does not include the ziwo suffix nor the _jorel-dialog-state prefix

    Parameters

    • func: Function

    Returns void

connect

  • connect authenticate the user over Ziwo & our communication socket This function is required before proceeding with calls

    Returns Promise<void>

disconnect

optOutGoogleStunServer

  • optOutGoogleStunServer(): Promise<string[]>

restart

restartSocket

  • restartSocket(): void

startCall

  • startCall(phoneNumber: string): Promise<Call | undefined>
  • Start a phone call with the external phone number provided and return an instance of the Call Note: the call's instance will also be provided in all the events

    Parameters

    • phoneNumber: string

    Returns Promise<Call | undefined>

startClick2Call

  • startClick2Call(phoneNumber: string, roaming?: boolean): Promise<string | undefined>
  • Start a call using click2call return the call ID if the call is successful or undefined if an issue occured

    Parameters

    • phoneNumber: string
    • Default value roaming: boolean = false

    Returns Promise<string | undefined>

getActiveCall

  • getActiveCall(): Call | undefined
  • Get the active call or undefined if no active call

    Returns Call | undefined

answerActiveCall

  • answerActiveCall(): void
  • Answer the active call

    Returns void

hangupActiveCall

  • hangupActiveCall(): void
  • Hangup the active call

    In case of pending attended call: unhold and set the primary call as active

    Returns void

muteActiveCall

  • muteActiveCall(): void
  • Mute the active call

    Returns void

unmuteActiveCall

  • unmuteActiveCall(): void
  • Unmute the active call

    Returns void

holdActiveCall

  • holdActiveCall(): void
  • Hold the active call

    Returns void

unholdActiveCall

  • unholdActiveCall(): void
  • Unhold the active call

    Returns void

blindTransferActiveCall

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

    Parameters

    • destination: string

    Returns void

attendedTransferActiveCall

  • attendedTransferActiveCall(destination: string): void
  • Hold the active call

    Start a new call with @destination

    Parameters

    • destination: string

    Returns void

proceedAttendedTransferActiveCall

  • proceedAttendedTransferActiveCall(): void
  • Stop the active call and directly forward the initial correspondant to the new correspondant

    Returns void

cancelAttendedTransferActiveCall

  • cancelAttendedTransferActiveCall(): void
  • Stop the active call

    Unhold and set the initial call as active

    Returns void

Legend

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

Generated using TypeDoc