ZiwoClient

public class ZiwoClient
extension ZiwoClient: VertoWebSocketDelegate

ZiwoClient is the main class of the SDK. Through this class, the websocket that will be used to communicate with Verto will be initialized. The delegates will tell the developper when a call is received, when a call starts and when a call is terminated. It also provide informations about websocket that is linked to the Verto protocol.

Verto Web Socket

Vars

  • ZiwoClientDelegate protocol will both notify about websocket connections state and call events.

    Declaration

    Swift

    public var delegate: ZiwoClientDelegate?
  • List of actives calls.

    Declaration

    Swift

    public var calls: [Call]
  • Boolean that define whether the debug logs of Verto websocket has to be displayed in console or not.

    Declaration

    Swift

    public var vertoDebug: Bool { get set }

Initialization Methods

  • Public ZiwoClient initilizer.

    Declaration

    Swift

    public init()
  • Method that initialize and configure the Ziwo client.

    Declaration

    Swift

    public func initializeClient()
  • Private method that instanciate VertoWebSocket and connect it to the correct endpoint based on the Ziwo domain.

    Declaration

    Swift

    private func initializeVertoWebSocket()

Client Call Methods

  • Call an agent or an external number (has to be in international format). Automatically instantiate a call and setup a RTC connection, create an offer then format a JSON RPC to communicate with Verto protocol.

    Declaration

    Swift

    public func call(number: String)

    Parameters

    number

    Number to call

  • Hangup a call.

    Declaration

    Swift

    public func hangUp(callID: String)

    Parameters

    callID

    ID of the call to hangup

  • Answer an incoming call.

    Declaration

    Swift

    public func answerIncomingCall(callID: String)

    Parameters

    callID

    ID of the call to hangup

In-Call Methods

  • Define the state of the speaker mode (activated / deactivated).

    Declaration

    Swift

    public func setSpeakerEnabled(callID: String, _ value: Bool)

    Parameters

    callID

    ID of the call.

    value

    Boolean that define the state of the speaker mode.

  • Define the state of the microphone (activated / deactivated).

    Declaration

    Swift

    public func setMuteEnabled(callID: String, _ value: Bool)

    Parameters

    callID

    ID of the call.

    value

    Boolean that define the state of the microphone.

  • Method to modify the state of the call to hold or unhold.

    Declaration

    Swift

    public func setPauseEnabled(callID: String, _ value: Bool)

    Parameters

    callID

    ID of the call.

    value

    Boolean that define the state of the call (hold / unhold).

Client Utils Methods

  • To know if the speaker mode is enabled or not.

    Declaration

    Swift

    public func isSpeakerOn(callID: String) -> Bool

    Parameters

    callID

    ID of the call.

    Return Value

    A boolean that defines if the speaker mode is enabled.

  • To know if the call is on hold state.

    Declaration

    Swift

    public func isPaused(callID: String) -> Bool

    Parameters

    callID

    ID of the call.

    Return Value

    A boolean that defines if the call is held or not.

  • To know if the microphone is muted for this call.

    Declaration

    Swift

    public func isMuteOn(callID: String) -> Bool

    Parameters

    callID

    ID of the call.

    Return Value

    A boolean that defines if the microphone is muted.

  • Allow user to retrieve a call in the active call list.

    Declaration

    Swift

    public func findCall(callID: String) -> Call?

    Parameters

    callID

    ID of the call.

    Return Value

    An active call based on its ID.

Verto Web Socket Related

Verto Protocol Related