Class Call

Index

Properties

rearangeCodecs

rearangeCodecs: function

Callback for manual rearage or setup compatable codec list. If will set unknown/unsupported codec - it will be ignored

Type declaration

Methods

active

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

    Returns boolean

addEventListener

  • addEventListener(event: CallEvents, handler: Function): void

Protected addPendingReinvite

  • addPendingReinvite(item: pendingReinviteStruct): void
  • Parameters

    • item: pendingReinviteStruct

    Returns void

answer

  • answer(customData?: string, extraHeaders?: object, useVideo?: VideoFlags): void
  • Answer on incoming call

    Parameters

    • Optional customData: string
    • Optional extraHeaders: object

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

      • [id: string]: string
    • Optional useVideo: VideoFlags

      Optional parameter that can attach or detach video for current call. By default equal Config.videoSupport flag

    Returns void

displayName

  • displayName(): string
  • Returns display name

    Returns string

getAudioElementId

  • getAudioElementId(): string
  • Returns HTML audio element's id for the audio call

    Returns string

    string

getVideoElementId

  • getVideoElementId(): string
  • Returns HTML video element's id for the call

    Returns string

hangup

  • hangup(extraHeaders?: object): void
  • Hangup call

    Parameters

    • Optional extraHeaders: object

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

      • [id: string]: string

    Returns void

headers

  • headers(): object
  • Returns headers

    Returns object

    • [id: string]: string

id

  • id(): string
  • Returns call id

    Returns string

muteMicrophone

  • muteMicrophone(): void
  • Mute microphone

    Returns void

mutePlayback

  • mutePlayback(): void
  • Mute sound

    Returns void

number

  • number(): string
  • Returns dialed number or caller id

    Returns string

off

  • Remove handler for specified event

    Parameters

    • event: CallEvents

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

    • handler: Function

      Handler function, if not specified all event handlers will be removed

    Returns void

on

reject

  • reject(extraHeaders?: object): void
  • Reject incoming call

    Parameters

    • Optional extraHeaders: object

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

      • [id: string]: string

    Returns void

removeEventListener

  • removeEventListener(event: CallEvents, handler: Function): void

sendInfo

  • sendInfo(mimeType: string, body: string, extraHeaders?: object): void
  • Send Info (SIP INFO) message inside the call
    You can receive this message by VoxEngine CallEvents.InfoReceived in our cloud.
    You can receive this message by CallEvents.InfoReceived in WebSDK on other side.

    Parameters

    • mimeType: string

      MIME type of the message

    • body: string

      Message content

    • Optional extraHeaders: object

      Optional headers to be passed with the message

      • [id: string]: string

    Returns void

sendMessage

  • sendMessage(msg: string): void
  • Send text message

    Parameters

    • msg: string

      Message text

    Returns void

sendTone

  • sendTone(key: string): void
  • Send tone (DTMF)

    Parameters

    • key: string

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

    Returns void

sendVideo

  • sendVideo(flag: boolean): Promise<Updated>
  • Parameters

    • flag: boolean

    Returns Promise<Updated>

setActive

  • setActive(flag: boolean): Promise<Updated>
  • Parameters

    • flag: boolean

    Returns Promise<Updated>

setVideoSettings

  • setVideoSettings(settings: VideoSettings, successCallback?: Function, failedCallback?: Function): void
  • Set video settings

    Parameters

    • settings: VideoSettings

      Video settings for current call

    • Optional successCallback: Function
    • Optional failedCallback: Function

    Returns void

showRemoteVideo

  • showRemoteVideo(flag?: boolean): void
  • Show/hide remote party video

    Parameters

    • Default value flag: boolean = true

    Returns void

state

  • state(): string
  • Get call's current state may be "ALERTING", "PROGRESSING", "CONNECTED", "ENDED"

    Returns string

stopSharingScreen

  • stopSharingScreen(): void
  • Returns void

unmuteMicrophone

  • unmuteMicrophone(): void
  • Unmute microphone

    Returns void

unmutePlayback

  • unmutePlayback(): void
  • Unmute sound

    Returns void

useAudioOutput

  • useAudioOutput(id: string): Promise<void>
  • Use specified audio output , use audioOutputs to get the list of available audio output

    Parameters

    • id: string

      Id of the audio source

    Returns Promise<void>