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

restart

restartSocket

  • restartSocket(): void

startCall

  • startCall(phoneNumber: string): 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 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>

Legend

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

Generated using TypeDoc