new Call()
#CALL
Call class
- Source:
- See:
Methods
-
accept()
-
Accepts a call coming to the webclient.
- Source:
- See:
-
attachCamera(cam)
-
Attaches the video stream of a camera to the call.
Parameters:
Name Type Description cam
Camera The Camera object to be attached. - Source:
- See:
-
forward(target)
-
Forwards the call while not picked up.
Parameters:
Name Type Description target
string The target phone number. - Source:
- See:
Throws:
Will throw an exception if the target was not specified. -
getCallState() → {string}
-
Returns the callstate of the current call.
- Source:
- See:
Returns:
The current state of the call.- Type
- string
-
getOtherParty() → {string}
-
Returns the phone number of the other party.
- Source:
- See:
Returns:
The phone number of the other party.- Type
- string
-
hangUp()
-
Hangs up the call.
- Source:
- See:
-
hold()
-
Holds the calls
- Source:
- See:
-
onCallStateChanged(callback)
-
This event occurs when the state of the call changes.
Parameters:
Name Type Description callback
Call~callStateChangedCallback the callback function to handle the call state change event. -
onMessageReceived(callback)
-
This event occurs when a message is received.
Parameters:
Name Type Description callback
Call~messageReceivedCallback the callback function to handle the message received. -
reject()
-
Rejects a call coming to the webclient.
- Source:
- See:
-
sendMessage(message)
-
Sends a message to the other party.
Parameters:
Name Type Description message
string The message to be sent. - Source:
- See:
Throws:
Will throw an exception if no message is specified. -
setRemoteDisplay(displayId)
-
Displays the video stream coming from the other party.
Parameters:
Name Type Argument Default Description displayId
string <optional>
'local' The ID of the html element to where the camera stream will be shown. -
start()
-
Starts the call.
- Source:
- See:
-
transfer(target)
-
Transfers the call after its picked up.
Parameters:
Name Type Description target
string The target phone number. Throws:
Will throw an exception if the target was not specified. -
unHold()
-
Unholds the calls
- Source:
- See:
Type Definitions
-
callStateChangedCallback(state)
-
This callback is used to handle call state changes.
Parameters:
Name Type Description state
CallState The state of the call. - Source:
-
messageReceivedCallback(message)
-
This callback is used to handle message receiving.
Parameters:
Name Type Description message
string The message received. - Source: