Methods

active()

Boolean

Returns information about the call's media state (active/inactive)

Returns
  • Boolean

addEventListener(event, handler)

void

Register handler for specified event

Parameters
  • event: Function

    Event class (i.e. {@link VoxImplant.CallEvents.Connected}). See {@link VoxImplant.CallEvents}

  • handler: Function

    Handler function. A single parameter is passed - object with event information

answer(customData, extraHeaders)

void

Answer on incoming call

Parameters
  • customData: String (optional)

    Set custom string associated with call session. It can be later obtained from Call History using HTTP API

  • extraHeaders: Object (optional)

    Optional custom parameters (SIP headers) that should be sent after accepting incoming call. Parameter names must start with "X-" to be processed by application

decline(extraHeaders)

void

Reject incoming call

Parameters
  • extraHeaders: Object (optional)

    Optional custom parameters (SIP headers) that should be sent after rejecting incoming call. Parameter names must start with "X-" to be processed by application

displayName()

String

Returns display name

Returns
  • String

getAudioElementId()

void

Returns HTML audio element's id for the audio call (WebRTC mode)

getVideoElementId()

void

Returns HTML video element's id for the video call (WebRTC mode)

hangup(extraHeaders)

void

Hangup call

Parameters
  • extraHeaders: Object (optional)

    Optional custom parameters (SIP headers) that should be sent after disconnecting/cancelling call. Parameter names must start with "X-" to be processed by application

headers()

Object

Returns headers

Returns
  • Object

id()

String

Returns call id

Returns
  • String

muteMicrophone()

void

Mute microphone

mutePlayback()

void

Mute sound

number()

String

Returns dialed number or caller id

Returns
  • String

reject(extraHeaders)

void

Reject incoming call

Parameters
  • extraHeaders: Object (optional)

    Optional custom parameters (SIP headers) that should be sent after rejecting incoming call. Parameter names must start with "X-" to be processed by application

removeEventListener(event, handler)

void

Remove handler for specified event

Parameters
  • event: Function

    Event class (i.e. {@link VoxImplant.Events.SDKReady}). See {@link VoxImplant.Events}

  • handler: Function

    Handler function

sendInfo(mimeType, body, extraHeaders)

void

Send Info (SIP INFO) message inside the call

Parameters
  • mimeType: String

    MIME type of the message

  • body: String

    Message content

  • extraHeaders: Object (optional)

    Optional headers to be passed with the message

sendMessage(msg)

void

Send text message

Parameters
  • msg: String

    Message text

sendTone(key)

void

Send tone (DTMF)

Parameters
  • key: String

    Send tone according to pressed key: 0-9 , * , #

setRemoteVideoPosition(x, y)

void

Set remote video position

Parameters
  • x: Number

    Horizontal position (px)

  • y: Number

    Vertical position (px)

setRemoteVideoSize(width, height)

void

Set remote video size

Parameters
  • width: Number

    Width in pixels

  • height: Number

    Height in pixels

setVideoSettings(settings, successCallback, failedCallback)

void

Set video settings

Parameters
  • settings: VoxImplant.VideoSettings|VoxImplant.FlashVideoSettings

    Video settings for current call

  • successCallback: Function (optional)

    Called in WebRTC mode if video settings were applied successfully

  • failedCallback: Function (optional)

    Called in WebRTC mode if video settings couldn't be applied

showRemoteVideo(flag)

void

Show/hide remote party video

Parameters
  • flag: Boolean (optional)

    Show/hide - true/false

state()

String

Get call's current state

Returns
  • String

unmuteMicrophone()

void

Unmute microphone

unmutePlayback()

void

Unmute sound

useAudioOutput(id)

void

Use specified audio recording device for call audio playback, use audioOutputs to get the list of available audio playback devices

Parameters
  • id: Number|String

    Id of the audio output