Call class

The call class contains methods for a wide range of call, messaging and video stream functionalities. It also contains events to help messaging and monitor callstates.

Constructor

ConstructorDescription
OzWebClient.createCall(targetNumber) Creates a call to the given number. You only need to provide it with the target number. If it is not provided, the default dial plan rule will be applied. Example usage:
var myFirstCall = OzWebClient.createCall("1000");

Methods

MethodDescription
accept()Accepts a call coming to the webclient.
attachCamera(camera)Attaches the video stream of a camera to the call.
forward(target)Forwards the call while not picked up.
getCallState()Returns the callstate of the current call.
getOtherParty()Returns the phone number of the other party.
hangUp()Hangs up the call.
hold()Holds the call.
reject()Rejects a call coming to the webclient.
sendMessage(message)Sends a message to the other party.
setRemoteDisplay(displayId)Displays the video stream coming from the other party.
start()Starts the call.
transfer(target)Transfers the call after its picked up.
unHold()Unholds the call.

Events

EventDescription
onCallStateChangedThis event occurs when the state of the call changes. Callstates: "RINGING", "NOT_FOUND", "REJECTED", "HOLD", "IN_CALL", "COMPLETED", "BUSY" and "ANSWERED".
onMessageReceivedThis event occurs when a message is received.

Enumerations

CallType:

  • TEXT: "TEXT"
  • AUDIO: "AUDIO"
  • VIDEO: "VIDEO"

CallState:

  • RINGING: "RINGING"
  • NOT_FOUND: "NOT_FOUND"
  • REJECTED: "REJECTED"
  • HOLD: "HOLD"
  • IN_CALL: "IN_CALL"
  • COMPLETED: "COMPLETED"
  • BUSY: "BUSY"
  • ANSWERED: "ANSWERED"

If you have any questions or need assistance, please contact us at  info@ozekiphone.com

More information