NAV
Version: 1.6.0

Introduction

Telenia TVox Client SDK permits to connecting to TVox as user ad interact with it.

Exposed functionality is:

@telenia/tvox-client-sdk / Exports

To use sdk you must firstly instantiate Client class then you can interact using client instance attribute and events

var client = new TVox.Client({
        url: 'https://<hostname or ip of TVox>'
    })
    .on("logged_in", function(user) {
        // user parameter is same as client.user attribute 
        console.log(`user ${user.info.username} is logged`);
    })
    .on("logged_out", function(user) {
        // user parameter is same as client.user attribute
        console.log("user is logged out");
    })
    .on("login_in_progress", function(user, credential) {
        // user parameter is same as client.user attribute
        console.log("user login in progress");
    })
    .on("ready", function() {
        console.log("client is ready to use");
        // now we can use client attribute to interact with tvox
    });

then must execute login method to start connection to TVox ad try to identify myself

client.login({username: "foo", password: "bar"})
    .catch(function(error) {
        console.error("Error on login", error);
    })
    .then(function() {
        console.log("login is done");
    });

@telenia/tvox-client-sdk / Exports / Action

Class: Action

Action represents place to interact with server

Methods

generateFeedbackData

▸ generateFeedbackData(message?, attachments?): Promise<Data>

generate feedback data

Parameters

Name Type Default value
message? string undefined
attachments File[] []

Returns

Promise<Data>


sendFeedback

▸ sendFeedback(message?, attachments?, options?): Promise<boolean>

send feedback

Parameters

Name Type Default value
message? string undefined
attachments File[] []
options Object {}
options.compress? Object undefined
options.compress.callbacks? Object undefined
options.compress.callbacks.onProgress? (percent: number) => void undefined
options.compress.level number undefined
options.upload? Options undefined

Returns

Promise<boolean>


uploadFile

▸ uploadFile(file, options?): FileUploader

upload file

Parameters

Name Type
file File
options? Options

Returns

FileUploader

@telenia/tvox-client-sdk / Exports / Call

Class: Call

Call represent manager for every call instance

Type parameters

Name Type Description
T extends DeviceTypes is DeviceSip or DeviceWebrtc
E extends EventTypes = any is interface of event emitted

Hierarchy

↳ Call

↳↳ CallSip

↳↳ CallWebrtc

Properties

callId

• Readonly callId: string


detail

• Readonly detail: Detail


direction

• Readonly direction: Direction


lookup

• Readonly lookup: Lookup


recording

• Readonly recording: Recording

manager for call recording


prefixed

▪ Static prefixed: string | boolean

Inherited from

EventEmitter.prefixed

Accessors

callData

• get callData(): undefined | string

extra data used for customization

Deprecated

use detail.callData

Returns

undefined | string


duration

• get duration(): undefined | number

call duration when end

Deprecated

use detail.duration

Returns

undefined | number


endTime

• get endTime(): undefined | Date

call end time

Deprecated

use detail.endTime

Returns

undefined | Date


features

• get features(): CallFeature[]

Returns

CallFeature[]


id

• get id(): string

unique identifier of call inside TVox for TVox version <= 22.1.0 is same as callId

Deprecated

use detail.id

Returns

string


lastUpdateMessageDate

• get lastUpdateMessageDate(): null | Date

Returns

null | Date


service

• get service(): undefined | { code: string ; description: string }

service assigned to call

Deprecated

use detail.service

Returns

undefined | { code: string ; description: string }


startTime

• get startTime(): Date

call start

Deprecated

use detail.startTime

Returns

Date

Methods

addListener

▸ addListener<T>(event, fn, context?): Call<T, E>

Type parameters

Name Type
T extends string \

Parameters

Name Type
event T
fn EventListener<E, T>
context? any

Returns

Call<T, E>

Inherited from

EventEmitter.addListener


eventNames

▸ eventNames(): EventNames<E>[]

Return an array listing the events for which the emitter has registered listeners.

Returns

EventNames<E>[]

Inherited from

EventEmitter.eventNames


hasFeature

▸ hasFeature(feature): boolean

utility function to check if call has feature

Parameters

Name Type
feature CallFeature

Returns

boolean


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event EventNames<E>

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

▸ listeners<T>(event): EventListener<E, T>[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends string \

Parameters

Name Type
event T

Returns

EventListener<E, T>[]

Inherited from

EventEmitter.listeners


off

▸ off<T>(event, fn?, context?, once?): Call<T, E>

Type parameters

Name Type
T extends string \

Parameters

Name Type
event T
fn? EventListener<E, T>
context? any
once? boolean

Returns

Call<T, E>

Inherited from

EventEmitter.off


on

▸ on<T>(event, fn, context?): Call<T, E>

Add a listener for a given event.

Type parameters

Name Type
T extends string \

Parameters

Name Type
event T
fn EventListener<E, T>
context? any

Returns

Call<T, E>

Inherited from

EventEmitter.on


once

▸ once<T>(event, fn, context?): Call<T, E>

Add a one-time listener for a given event.

Type parameters

Name Type
T extends string \

Parameters

Name Type
event T
fn EventListener<E, T>
context? any

Returns

Call<T, E>

Inherited from

EventEmitter.once


removeAllListeners

▸ removeAllListeners(event?): Call<T, E>

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? EventNames<E>

Returns

Call<T, E>

Inherited from

EventEmitter.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): Call<T, E>

Remove the listeners of a given event.

Type parameters

Name Type
T extends string \

Parameters

Name Type
event T
fn? EventListener<E, T>
context? any
once? boolean

Returns

Call<T, E>

Inherited from

EventEmitter.removeListener


setCallData

▸ setCallData(data): Promise<boolean>

set callData on server

Parameters

Name Type
data string

Returns

Promise<boolean>

@telenia/tvox-client-sdk / Exports / Call / Detail

Class: Detail

Call.Detail

Hierarchy

↳ Detail

Properties

prefixed

▪ Static prefixed: string | boolean

Inherited from

EventEmitter.prefixed

Events

update_detail

▪ Static update_detail: string = "update_detail"

Fired when receiving updated call detail

Accessors

callData

• get callData(): undefined | string

Returns

undefined | string


duration

• get duration(): undefined | number

Returns

undefined | number


endTime

• get endTime(): undefined | Date

Returns

undefined | Date


id

• get id(): string

unique identifier of call inside TVox for TVox version <= 22.1.0 is same as callId

Returns

string


ivrLabel

• get ivrLabel(): undefined | null | string

Returns

undefined | null | string


outboundCampaignId

• get outboundCampaignId(): undefined | null | string

Returns

undefined | null | string


outboundListId

• get outboundListId(): undefined | null | string

Returns

undefined | null | string


popupInfo

• get popupInfo(): undefined | { [index: string]: string; }

Returns

undefined | { [index: string]: string; }


rawInfo

• get rawInfo(): undefined | { [index: string]: string | null | undefined; abandoned_call_id?: null | string ; callback_call_id?: null | string ; campagna?: null | string ; cli?: null | string ; dnis?: null | string ; idlastcall?: null | string ; interview_service?: null | string ; ivr_label?: null | string ; lista?: null | string ; mc_description?: null | string ; mc_id?: null | string ; mc_session?: null | string ; mc_text?: null | string ; popupinfo: null | string ; servizio?: null | string ; sito?: null | string ; sito_distribuzione?: null | string ; skillset?: null | string ; tipochiamata?: null | string }

Unparsed info

Returns

undefined | { [index: string]: string | null | undefined; abandoned_call_id?: null | string ; callback_call_id?: null | string ; campagna?: null | string ; cli?: null | string ; dnis?: null | string ; idlastcall?: null | string ; interview_service?: null | string ; ivr_label?: null | string ; lista?: null | string ; mc_description?: null | string ; mc_id?: null | string ; mc_session?: null | string ; mc_text?: null | string ; popupinfo: null | string ; servizio?: null | string ; sito?: null | string ; sito_distribuzione?: null | string ; skillset?: null | string ; tipochiamata?: null | string }


remoteNumber

• get remoteNumber(): undefined | string

Returns

undefined | string


service

• get service(): undefined | { code: string ; description: string }

Returns

undefined | { code: string ; description: string }


skillset

• get skillset(): undefined | null | string

Returns

undefined | null | string


startTime

• get startTime(): Date

Returns

Date

Methods

addListener

▸ addListener<T>(event, fn, context?): Detail

Type parameters

Name Type
T extends "update_detail"

Parameters

Name Type
event T
fn (...args: ArgumentMap<DetailEventMap>[Extract<T, "update_detail">]) => void
context? any

Returns

Detail

Inherited from

EventEmitter.addListener


eventNames

▸ eventNames(): "update_detail"[]

Return an array listing the events for which the emitter has registered listeners.

Returns

"update_detail"[]

Inherited from

EventEmitter.eventNames


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event "update_detail"

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<DetailEventMap>[Extract<T, "update_detail">]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends "update_detail"

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<DetailEventMap>[Extract<T, "update_detail">]) => void[]

Inherited from

EventEmitter.listeners


off

▸ off<T>(event, fn?, context?, once?): Detail

Type parameters

Name Type
T extends "update_detail"

Parameters

Name Type
event T
fn? (...args: ArgumentMap<DetailEventMap>[Extract<T, "update_detail">]) => void
context? any
once? boolean

Returns

Detail

Inherited from

EventEmitter.off


on

▸ on<T>(event, fn, context?): Detail

Add a listener for a given event.

Type parameters

Name Type
T extends "update_detail"

Parameters

Name Type
event T
fn (...args: ArgumentMap<DetailEventMap>[Extract<T, "update_detail">]) => void
context? any

Returns

Detail

Inherited from

EventEmitter.on


once

▸ once<T>(event, fn, context?): Detail

Add a one-time listener for a given event.

Type parameters

Name Type
T extends "update_detail"

Parameters

Name Type
event T
fn (...args: ArgumentMap<DetailEventMap>[Extract<T, "update_detail">]) => void
context? any

Returns

Detail

Inherited from

EventEmitter.once


removeAllListeners

▸ removeAllListeners(event?): Detail

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? "update_detail"

Returns

Detail

Inherited from

EventEmitter.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): Detail

Remove the listeners of a given event.

Type parameters

Name Type
T extends "update_detail"

Parameters

Name Type
event T
fn? (...args: ArgumentMap<DetailEventMap>[Extract<T, "update_detail">]) => void
context? any
once? boolean

Returns

Detail

Inherited from

EventEmitter.removeListener

@telenia/tvox-client-sdk / Exports / Call / Lookup

Class: Lookup

Call.Lookup

Hierarchy

↳ Lookup

Properties

_contact

• Optional _contact: Contact


display

• Readonly display: LookupDisplay = {}


prefixed

▪ Static prefixed: string | boolean

Inherited from

EventEmitter.prefixed

Events

end

▪ Static end: string = "end"

Fired when lookup end


update_contact

▪ Static update_contact: string = "update_contact"

Fired when lookup update contact


update_display

▪ Static update_display: string = "update_display"

Fired when lookup update display data

Accessors

contact

• get contact(): undefined | Contact

Returns

undefined | Contact


result

• get result(): undefined | LookupResult

Returns

undefined | LookupResult


status

• get status(): "end" | "progress"

Returns

"end" | "progress"

Methods

addListener

▸ addListener<T>(event, fn, context?): Lookup

Type parameters

Name Type
T extends keyof LookupEventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<LookupEventMap>[Extract<T, keyof LookupEventMap>]) => void
context? any

Returns

Lookup

Inherited from

EventEmitter.addListener


eventNames

▸ eventNames(): keyof LookupEventMap[]

Return an array listing the events for which the emitter has registered listeners.

Returns

keyof LookupEventMap[]

Inherited from

EventEmitter.eventNames


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event keyof LookupEventMap

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<LookupEventMap>[Extract<T, keyof LookupEventMap>]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends keyof LookupEventMap

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<LookupEventMap>[Extract<T, keyof LookupEventMap>]) => void[]

Inherited from

EventEmitter.listeners


off

▸ off<T>(event, fn?, context?, once?): Lookup

Type parameters

Name Type
T extends keyof LookupEventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<LookupEventMap>[Extract<T, keyof LookupEventMap>]) => void
context? any
once? boolean

Returns

Lookup

Inherited from

EventEmitter.off


on

▸ on<T>(event, fn, context?): Lookup

Add a listener for a given event.

Type parameters

Name Type
T extends keyof LookupEventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<LookupEventMap>[Extract<T, keyof LookupEventMap>]) => void
context? any

Returns

Lookup

Inherited from

EventEmitter.on


once

▸ once<T>(event, fn, context?): Lookup

Add a one-time listener for a given event.

Type parameters

Name Type
T extends keyof LookupEventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<LookupEventMap>[Extract<T, keyof LookupEventMap>]) => void
context? any

Returns

Lookup

Inherited from

EventEmitter.once


removeAllListeners

▸ removeAllListeners(event?): Lookup

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? keyof LookupEventMap

Returns

Lookup

Inherited from

EventEmitter.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): Lookup

Remove the listeners of a given event.

Type parameters

Name Type
T extends keyof LookupEventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<LookupEventMap>[Extract<T, keyof LookupEventMap>]) => void
context? any
once? boolean

Returns

Lookup

Inherited from

EventEmitter.removeListener

@telenia/tvox-client-sdk / Exports / Call / Recording

Class: Recording

Call.Recording

Hierarchy

↳ Recording

Events

automatic_type_change

▪ Static automatic_type_change: string = "automatic_type_set"

Fired when automatic recording type change


on_demand_error

▪ Static on_demand_error: string = "on_demand_error"

Fired when on demand recording error


on_demand_start

▪ Static on_demand_start: string = "on_demand_start"

Fired when on demand recording start


on_demand_stop

▪ Static on_demand_stop: string = "on_demand_stop"

Fired when on demand recording stop

Properties

prefixed

▪ Static prefixed: string | boolean

Inherited from

EventEmitter.prefixed

Accessors

addNoteEnabled

• get addNoteEnabled(): boolean

Get add note enabled

Returns

boolean


automaticEnabled

• get automaticEnabled(): boolean

Get automatic recording enabled

Returns

boolean


automaticType

• get automaticType(): AutomaticCallRecordingType

Get automatic recording type

Returns

AutomaticCallRecordingType


onDemandEnabled

• get onDemandEnabled(): boolean

Get on demand recording enabled

Returns

boolean

Methods

addListener

▸ addListener<T>(event, fn, context?): Recording

Type parameters

Name Type
T extends keyof RecordingEventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<RecordingEventMap>[Extract<T, keyof RecordingEventMap>]) => void
context? any

Returns

Recording

Inherited from

EventEmitter.addListener


addNote

▸ addNote(note, additionalData?): Promise<boolean>

add note to call recording

Parameters

Name Type
note string
additionalData? string

Returns

Promise<boolean>


eventNames

▸ eventNames(): keyof RecordingEventMap[]

Return an array listing the events for which the emitter has registered listeners.

Returns

keyof RecordingEventMap[]

Inherited from

EventEmitter.eventNames


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event keyof RecordingEventMap

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<RecordingEventMap>[Extract<T, keyof RecordingEventMap>]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends keyof RecordingEventMap

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<RecordingEventMap>[Extract<T, keyof RecordingEventMap>]) => void[]

Inherited from

EventEmitter.listeners


off

▸ off<T>(event, fn?, context?, once?): Recording

Type parameters

Name Type
T extends keyof RecordingEventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<RecordingEventMap>[Extract<T, keyof RecordingEventMap>]) => void
context? any
once? boolean

Returns

Recording

Inherited from

EventEmitter.off


on

▸ on<T>(event, fn, context?): Recording

Add a listener for a given event.

Type parameters

Name Type
T extends keyof RecordingEventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<RecordingEventMap>[Extract<T, keyof RecordingEventMap>]) => void
context? any

Returns

Recording

Inherited from

EventEmitter.on


onDemandRecordingStarted

▸ onDemandRecordingStarted(): boolean

get on demand recording started

Returns

boolean


once

▸ once<T>(event, fn, context?): Recording

Add a one-time listener for a given event.

Type parameters

Name Type
T extends keyof RecordingEventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<RecordingEventMap>[Extract<T, keyof RecordingEventMap>]) => void
context? any

Returns

Recording

Inherited from

EventEmitter.once


removeAllListeners

▸ removeAllListeners(event?): Recording

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? keyof RecordingEventMap

Returns

Recording

Inherited from

EventEmitter.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): Recording

Remove the listeners of a given event.

Type parameters

Name Type
T extends keyof RecordingEventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<RecordingEventMap>[Extract<T, keyof RecordingEventMap>]) => void
context? any
once? boolean

Returns

Recording

Inherited from

EventEmitter.removeListener


startRecord

▸ startRecord(): Promise<boolean>

Start on demand recording

Returns

Promise<boolean>


stopRecord

▸ stopRecord(): Promise<boolean>

Stop on demand recording

Returns

Promise<boolean>

@telenia/tvox-client-sdk / Exports / CallHistory / CallHistoryResult

Class: CallHistoryResult

CallHistory.CallHistoryResult

Hierarchy

↳ CallHistoryResult

Properties

options

• Readonly options: CallHistoryRequest


prefixed

▪ Static prefixed: string | boolean

Inherited from

SearchResult.prefixed

Events

complete

▪ Static complete: string = "complete"

Fired when response complete

Param

result.on("complete", function() {
  console.log("result complete");
});

#### Inherited from

[SearchResult](#classessearchresultmd).[complete](#complete)

___

### data

▪ `Static` **data**: `string` = `"data"`

Fired when response return data

**`Param`**

T data received

**`Param`**

number indexed data

**`Param`**

total result to received

```javascript
result.on("data", function(data, index, tot) {
  console.log("received " + index + " of " + tot + " data", data);
});

Inherited from

SearchResult.data


error

▪ Static error: string = "error"

Fired when response return error

Param

data received

result.on("error", function(error) {
  console.log("error on receive result", error);
});

Inherited from

SearchResult.error

Methods

addListener

▸ addListener<T>(event, fn, context?): CallHistoryResult

Type parameters

Name Type
T extends keyof SearchResultEventMap<CallHistoryItem>

Parameters

Name Type
event T
fn (...args: ArgumentMap<SearchResultEventMap<CallHistoryItem>>[Extract<T, keyof SearchResultEventMap<CallHistoryItem>>]) => void
context? any

Returns

CallHistoryResult

Inherited from

SearchResult.addListener


eventNames

▸ eventNames(): keyof SearchResultEventMap<CallHistoryItem>[]

Return an array listing the events for which the emitter has registered listeners.

Returns

keyof SearchResultEventMap<CallHistoryItem>[]

Inherited from

SearchResult.eventNames


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event keyof SearchResultEventMap<CallHistoryItem>

Returns

number

Inherited from

SearchResult.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<SearchResultEventMap<CallHistoryItem>>[Extract<T, keyof SearchResultEventMap<CallHistoryItem>>]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends keyof SearchResultEventMap<CallHistoryItem>

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<SearchResultEventMap<CallHistoryItem>>[Extract<T, keyof SearchResultEventMap<CallHistoryItem>>]) => void[]

Inherited from

SearchResult.listeners


off

▸ off<T>(event, fn?, context?, once?): CallHistoryResult

Type parameters

Name Type
T extends keyof SearchResultEventMap<CallHistoryItem>

Parameters

Name Type
event T
fn? (...args: ArgumentMap<SearchResultEventMap<CallHistoryItem>>[Extract<T, keyof SearchResultEventMap<CallHistoryItem>>]) => void
context? any
once? boolean

Returns

CallHistoryResult

Inherited from

SearchResult.off


on

▸ on<T>(event, fn, context?): CallHistoryResult

Add a listener for a given event.

Type parameters

Name Type
T extends keyof SearchResultEventMap<CallHistoryItem>

Parameters

Name Type
event T
fn (...args: ArgumentMap<SearchResultEventMap<CallHistoryItem>>[Extract<T, keyof SearchResultEventMap<CallHistoryItem>>]) => void
context? any

Returns

CallHistoryResult

Inherited from

SearchResult.on


once

▸ once<T>(event, fn, context?): CallHistoryResult

Add a one-time listener for a given event.

Type parameters

Name Type
T extends keyof SearchResultEventMap<CallHistoryItem>

Parameters

Name Type
event T
fn (...args: ArgumentMap<SearchResultEventMap<CallHistoryItem>>[Extract<T, keyof SearchResultEventMap<CallHistoryItem>>]) => void
context? any

Returns

CallHistoryResult

Inherited from

SearchResult.once


removeAllListeners

▸ removeAllListeners(event?): CallHistoryResult

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? keyof SearchResultEventMap<CallHistoryItem>

Returns

CallHistoryResult

Inherited from

SearchResult.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): CallHistoryResult

Remove the listeners of a given event.

Type parameters

Name Type
T extends keyof SearchResultEventMap<CallHistoryItem>

Parameters

Name Type
event T
fn? (...args: ArgumentMap<SearchResultEventMap<CallHistoryItem>>[Extract<T, keyof SearchResultEventMap<CallHistoryItem>>]) => void
context? any
once? boolean

Returns

CallHistoryResult

Inherited from

SearchResult.removeListener

@telenia/tvox-client-sdk / Exports / CallSip

Class: CallSip

Call represent manager for every call instance

Hierarchy

↳ CallSip

Properties

callId

• Readonly callId: string

Inherited from

Call.callId


detail

• Readonly detail: Detail

Inherited from

Call.detail


direction

• Readonly direction: Direction

Inherited from

Call.direction


lookup

• Readonly lookup: Lookup

Inherited from

Call.lookup


recording

• Readonly recording: Recording

manager for call recording

Inherited from

Call.recording


type

• Readonly type: LineType = C.LineType.SIP


prefixed

▪ Static prefixed: string | boolean

Inherited from

Call.prefixed

Events

accepted

▪ Static accepted: string = "accepted"

Fired when the call is accepted

Param

call.on("accepted", function() {
  console.log("call accepted");
});

change_features

▪ Static change_features: string = "change_features"

Fired when feature change

Param

[] new features

Param

[] previousFeatures

call.on("change_features", function(features, previousFeatures) {
  console.log("call change features", features, previousFeatures);
});

connecting

▪ Static connecting: string = "connecting"

Fired after server confirm call

Param

call.on("connecting", function() {
  console.log("call connecting");
});

ended

▪ Static ended: string = "ended"

Fired when the call is ended

Param

call.on("ended", function() {
  console.log("call ended");
});

ended_request

▪ Static ended_request: string = "ended_request"

Fired when the call is requested to ended

Param

call.on("ended_request", function() {
  console.log("call ended is requested");
});

hold

▪ Static hold: string = "hold"

Fired when the user puts call on hold.

Param

call.on("hold", function() {
  console.log("call hold");
});

newDTMF

▪ Static newDTMF: string = "newDTMF"

Fired for DTMF

Param

string|number dtmf managed

call.on("newDTMF", function(dtmf) {
  console.log("call newDTMF", dtmf);
});

new_call_for_transfer

▪ Static new_call_for_transfer: string = "new_call_for_transfer"

Fired when dialForTransfer has done

Param

CallSipForTransfer callForTranseferInstance

call.on("new_call_for_transfer", function(callForTransfer) {
  console.log("callForTransfer done");
});

progress

▪ Static progress: string = "progress"

Fired after server update call data

Param

call.on("progress", function() {
  console.log("call progress");
});

unhold

▪ Static unhold: string = "unhold"

Fired when the user resumes call from hold.

Param

call.on("unhold", function() {
  console.log("call unhold");
});

Accessors

callData

• get callData(): undefined | string

extra data used for customization

Deprecated

use detail.callData

Returns

undefined | string

Inherited from

Call.callData


callSipForTransferInstance

• get callSipForTransferInstance(): undefined | CallSipForTransfer

Returns

undefined | CallSipForTransfer


duration

• get duration(): undefined | number

call duration when end

Deprecated

use detail.duration

Returns

undefined | number

Inherited from

Call.duration


endTime

• get endTime(): undefined | Date

call end time

Deprecated

use detail.endTime

Returns

undefined | Date

Inherited from

Call.endTime


features

• get features(): CallFeature[]

Returns

CallFeature[]

Inherited from

Call.features


id

• get id(): string

unique identifier of call inside TVox for TVox version <= 22.1.0 is same as callId

Deprecated

use detail.id

Returns

string

Inherited from

Call.id


lastUpdateMessageDate

• get lastUpdateMessageDate(): null | Date

Returns

null | Date

Inherited from

Call.lastUpdateMessageDate


service

• get service(): undefined | { code: string ; description: string }

service assigned to call

Deprecated

use detail.service

Returns

undefined | { code: string ; description: string }

Inherited from

Call.service


startTime

• get startTime(): Date

call start

Deprecated

use detail.startTime

Returns

Date

Inherited from

Call.startTime

Methods

addListener

▸ addListener<T>(event, fn, context?): CallSip

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

CallSip

Inherited from

Call.addListener


answer

▸ answer(): Promise<boolean>

answer the incoming call. This method is available for incoming call only.

Returns

Promise<boolean>


dialForTransfer

▸ dialForTransfer(phoneNumber, param?): Promise<CallSipForTransfer>

On CallSip generated by generic sip device we can execute dial in purpose of future attendant transfer

Parameters

Name Type
phoneNumber string
param? DialParam

Returns

Promise<CallSipForTransfer>


eventNames

▸ eventNames(): keyof EventMap[]

Return an array listing the events for which the emitter has registered listeners.

Returns

keyof EventMap[]

Inherited from

Call.eventNames


hasFeature

▸ hasFeature(feature): boolean

utility function to check if call has feature

Parameters

Name Type
feature CallFeature

Returns

boolean

Inherited from

Call.hasFeature


hold

▸ hold(): Promise<boolean>

puts the call on hold

Returns

Promise<boolean>

Overrides

Call.hold


isDialForTransferEnabled

▸ isDialForTransferEnabled(): boolean

The purpose is for check if we can call method dialForTransfer CallSip

Returns

boolean


isEnded

▸ isEnded(): boolean

return true if the call is ended.

Returns

boolean

Overrides

Call.isEnded


isEstablished

▸ isEstablished(): boolean

return true if the call is established.

Returns

boolean

Overrides

Call.isEstablished


isInProgress

▸ isInProgress(): boolean

return true if the call is in progress state (not established and not ended).

Returns

boolean

Overrides

Call.isInProgress


isOnHold

▸ isOnHold(): boolean

return true if the call is on hold.

Returns

boolean

Overrides

Call.isOnHold


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event keyof EventMap

Returns

number

Inherited from

Call.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void[]

Inherited from

Call.listeners


off

▸ off<T>(event, fn?, context?, once?): CallSip

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any
once? boolean

Returns

CallSip

Inherited from

Call.off


on

▸ on<T>(event, fn, context?): CallSip

Add a listener for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

CallSip

Inherited from

Call.on


once

▸ once<T>(event, fn, context?): CallSip

Add a one-time listener for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

CallSip

Inherited from

Call.once


removeAllListeners

▸ removeAllListeners(event?): CallSip

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? keyof EventMap

Returns

CallSip

Inherited from

Call.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): CallSip

Remove the listeners of a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any
once? boolean

Returns

CallSip

Inherited from

Call.removeListener


sendDTMF

▸ sendDTMF(tone): Promise<boolean>

send one or multiple DTMF tones

Parameters

Name Type
tone string \

Returns

Promise<boolean>


setCallData

▸ setCallData(data): Promise<boolean>

set callData on server

Parameters

Name Type
data string

Returns

Promise<boolean>

Inherited from

Call.setCallData


terminate

▸ terminate(): Promise<boolean>

terminate current call

Returns

Promise<boolean>


transferToCall

▸ transferToCall(call): Promise<boolean>

transfer call to other sip call, this is like attended tranfer

Parameters

Name Type
call CallSip

Returns

Promise<boolean>


transferToNumber

▸ transferToNumber(number): Promise<boolean>

transfer call to phone number, this is like blind transfer. Calling the desired number on behalf of the caller, the original call then drops-off without waiting for the called number to be picked up

Parameters

Name Type
number string

Returns

Promise<boolean>


unhold

▸ unhold(): Promise<boolean>

resumes the call from hold

Returns

Promise<boolean>

Overrides

Call.unhold

@telenia/tvox-client-sdk / Exports / CallSipForTransfer

Class: CallSipForTransfer

Hierarchy

↳ CallSipForTransfer

Events

ended

▪ Static ended: string = "ended"

Fired when the callSipForTransfer is ended

Param

callSipForTransfer.on("ended", function() {
  console.log("call for transfer is ended");
});

Properties

prefixed

▪ Static prefixed: string | boolean

Inherited from

EventEmitter.prefixed

Accessors

callSip

• get callSip(): CallSip

CallSip instance associated of this CallSipForTransefer instance

Returns

CallSip

Methods

addListener

▸ addListener<T>(event, fn, context?): CallSipForTransfer

Type parameters

Name Type
T extends "ended"

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "ended">]) => void
context? any

Returns

CallSipForTransfer

Inherited from

EventEmitter.addListener


eventNames

▸ eventNames(): "ended"[]

Return an array listing the events for which the emitter has registered listeners.

Returns

"ended"[]

Inherited from

EventEmitter.eventNames


isEnded

▸ isEnded(): boolean

Returns

boolean


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event "ended"

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<EventMap>[Extract<T, "ended">]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends "ended"

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<EventMap>[Extract<T, "ended">]) => void[]

Inherited from

EventEmitter.listeners


off

▸ off<T>(event, fn?, context?, once?): CallSipForTransfer

Type parameters

Name Type
T extends "ended"

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, "ended">]) => void
context? any
once? boolean

Returns

CallSipForTransfer

Inherited from

EventEmitter.off


on

▸ on<T>(event, fn, context?): CallSipForTransfer

Add a listener for a given event.

Type parameters

Name Type
T extends "ended"

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "ended">]) => void
context? any

Returns

CallSipForTransfer

Inherited from

EventEmitter.on


once

▸ once<T>(event, fn, context?): CallSipForTransfer

Add a one-time listener for a given event.

Type parameters

Name Type
T extends "ended"

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "ended">]) => void
context? any

Returns

CallSipForTransfer

Inherited from

EventEmitter.once


removeAllListeners

▸ removeAllListeners(event?): CallSipForTransfer

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? "ended"

Returns

CallSipForTransfer

Inherited from

EventEmitter.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): CallSipForTransfer

Remove the listeners of a given event.

Type parameters

Name Type
T extends "ended"

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, "ended">]) => void
context? any
once? boolean

Returns

CallSipForTransfer

Inherited from

EventEmitter.removeListener


terminate

▸ terminate(): Promise<boolean>

Returns

Promise<boolean>


transfer

▸ transfer(): Promise<boolean>

Returns

Promise<boolean>

@telenia/tvox-client-sdk / Exports / CallWebrtc

Class: CallWebrtc

Call represent manager for every call instance

Hierarchy

↳ CallWebrtc

Properties

callId

• Readonly callId: string

Inherited from

Call.callId


detail

• Readonly detail: Detail

Inherited from

Call.detail


direction

• Readonly direction: Direction

Inherited from

Call.direction


lookup

• Readonly lookup: Lookup

Inherited from

Call.lookup


recording

• Readonly recording: Recording

manager for call recording

Inherited from

Call.recording


type

• Readonly type: LineType = C.LineType.WEBRTC


prefixed

▪ Static prefixed: string | boolean

Inherited from

Call.prefixed

Events

accepted

▪ Static accepted: string = "accepted"

Fired when the call is accepted

Param

call.on("accepted", function() {
  console.log("call accepted");
});

connecting

▪ Static connecting: string = "connecting"

Fired after server confirm call

Param

call.on("connecting", function() {
  console.log("call connecting");
});

ended

▪ Static ended: string = "ended"

Fired when the call is ended

Param

call.on("ended", function() {
  console.log("call ended");
});

ended_request

▪ Static ended_request: string = "ended_request"

Fired when the call is requested to ended

Param

call.on("ended_request", function() {
  console.log("call ended is requested");
});

hold

▪ Static hold: string = "hold"

Fired when the user puts call on hold.

Param

call.on("hold", function() {
  console.log("call hold");
});

newDTMF

▪ Static newDTMF: string = "newDTMF"

Fired for DTMF

Param

string|number dtmf managed

call.on("newDTMF", function(dtmf) {
  console.log("call newDTMF", dtmf);
});

progress

▪ Static progress: string = "progress"

Fired after server update call data

Param

call.on("progress", function() {
  console.log("call progress");
});

unhold

▪ Static unhold: string = "unhold"

Fired when the user resumes call from hold.

Param

call.on("unhold", function() {
  console.log("call unhold");
});

Accessors

callData

• get callData(): undefined | string

extra data used for customization

Deprecated

use detail.callData

Returns

undefined | string

Inherited from

Call.callData


connectionManager

• get connectionManager(): ConnectionManager

Returns

ConnectionManager


duration

• get duration(): undefined | number

call duration when end

Deprecated

use detail.duration

Returns

undefined | number

Inherited from

Call.duration


endTime

• get endTime(): undefined | Date

call end time

Deprecated

use detail.endTime

Returns

undefined | Date

Inherited from

Call.endTime


features

• get features(): CallFeature[]

Returns

CallFeature[]

Inherited from

Call.features


id

• get id(): string

unique identifier of call inside TVox for TVox version <= 22.1.0 is same as callId

Deprecated

use detail.id

Returns

string

Inherited from

Call.id


lastUpdateMessageDate

• get lastUpdateMessageDate(): null | Date

Returns

null | Date

Inherited from

Call.lastUpdateMessageDate


service

• get service(): undefined | { code: string ; description: string }

service assigned to call

Deprecated

use detail.service

Returns

undefined | { code: string ; description: string }

Inherited from

Call.service


startTime

• get startTime(): Date

call start

Deprecated

use detail.startTime

Returns

Date

Inherited from

Call.startTime

Methods

addListener

▸ addListener<T>(event, fn, context?): CallWebrtc

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

CallWebrtc

Inherited from

Call.addListener


answerAudio

▸ answerAudio(customFields?): Promise<boolean>

answer the incoming call. This method is available for incoming call only.

Parameters

Name Type
customFields? Map<string, string>

Returns

Promise<boolean>


answerVideo

▸ answerVideo(customFields?, videoContainer?): Promise<boolean>

answer the incoming call. This method is available for incoming call only.

Parameters

Name Type
customFields? Map<string, string>
videoContainer? HTMLElement

Returns

Promise<boolean>


eventNames

▸ eventNames(): keyof EventMap[]

Return an array listing the events for which the emitter has registered listeners.

Returns

keyof EventMap[]

Inherited from

Call.eventNames


hasFeature

▸ hasFeature(feature): boolean

utility function to check if call has feature

Parameters

Name Type
feature CallFeature

Returns

boolean

Inherited from

Call.hasFeature


hold

▸ hold(): Promise<boolean>

puts the call on hold

Returns

Promise<boolean>

Overrides

Call.hold


isEnded

▸ isEnded(): boolean

return true if the call is ended.

Returns

boolean

Overrides

Call.isEnded


isEstablished

▸ isEstablished(): boolean

return true if the call is established.

Returns

boolean

Overrides

Call.isEstablished


isInProgress

▸ isInProgress(): boolean

return true if the call is in progress state (not established and not ended).

Returns

boolean

Overrides

Call.isInProgress


isOnHold

▸ isOnHold(): boolean

return true if the call is on hold.

Returns

boolean

Overrides

Call.isOnHold


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event keyof EventMap

Returns

number

Inherited from

Call.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void[]

Inherited from

Call.listeners


mute

▸ mute(options): Promise<boolean>

Mutes the local audio and/or video.

Parameters

Name Type
options MuteOptions

Returns

Promise<boolean>


off

▸ off<T>(event, fn?, context?, once?): CallWebrtc

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any
once? boolean

Returns

CallWebrtc

Inherited from

Call.off


on

▸ on<T>(event, fn, context?): CallWebrtc

Add a listener for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

CallWebrtc

Inherited from

Call.on


once

▸ once<T>(event, fn, context?): CallWebrtc

Add a one-time listener for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

CallWebrtc

Inherited from

Call.once


removeAllListeners

▸ removeAllListeners(event?): CallWebrtc

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? keyof EventMap

Returns

CallWebrtc

Inherited from

Call.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): CallWebrtc

Remove the listeners of a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any
once? boolean

Returns

CallWebrtc

Inherited from

Call.removeListener


sendDTMF

▸ sendDTMF(tone, playTone?): Promise<boolean>

send one or multiple DTMF tones

Parameters

Name Type Default value
tone string \ number
playTone boolean true

Returns

Promise<boolean>


setCallData

▸ setCallData(data): Promise<boolean>

set callData on server

Parameters

Name Type
data string

Returns

Promise<boolean>

Inherited from

Call.setCallData


terminate

▸ terminate(): Promise<boolean>

terminate the current call

Returns

Promise<boolean>


transferToCall

▸ transferToCall(target): Promise<boolean>

transfer call to other call

Parameters

Name Type
target Call<DeviceTypes, any>

Returns

Promise<boolean>


transferToNunber

▸ transferToNunber(number, accessCode?, data?): Promise<boolean>

transfer call to phone number. Calling the desired number on behalf of the caller, the original call then drops-off without waiting for the called number to be picked up

Parameters

Name Type
number string
accessCode? string
data? string[]

Returns

Promise<boolean>


unhold

▸ unhold(): Promise<boolean>

resumes the call from hold

Returns

Promise<boolean>

Overrides

Call.unhold


unmute

▸ unmute(options): Promise<boolean>

Unmutes the local audio and/or video.

Parameters

Name Type
options MuteOptions

Returns

Promise<boolean>

@telenia/tvox-client-sdk / Exports / CallWebrtc / ConnectionManager

Class: ConnectionManager

CallWebrtc.ConnectionManager

Hierarchy

↳ ConnectionManager

Properties

prefixed

▪ Static prefixed: string | boolean

Inherited from

EventEmitter.prefixed

Methods

addListener

▸ addListener<T>(event, fn, context?): ConnectionManager

Type parameters

Name Type
T extends "state" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<{ connection_error: (error: any) => void ; local_audio_level: (level: number) => void ; remote_audio_level: (level: number) => void ; state: (state: State) => void ; stats: (stats: StatsEvent) => void }>[Extract<T, "state" \
context? any

Returns

ConnectionManager

Inherited from

EventEmitter.addListener


eventNames

▸ eventNames(): ("state" | "stats" | "connection_error" | "local_audio_level" | "remote_audio_level")[]

Return an array listing the events for which the emitter has registered listeners.

Returns

("state" | "stats" | "connection_error" | "local_audio_level" | "remote_audio_level")[]

Inherited from

EventEmitter.eventNames


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event "state" \

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<{ connection_error: (error: any) => void ; local_audio_level: (level: number) => void ; remote_audio_level: (level: number) => void ; state: (state: State) => void ; stats: (stats: StatsEvent) => void }>[Extract<T, "state" | "stats" | "connection_error" | "local_audio_level" | "remote_audio_level">]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends "state" \

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<{ connection_error: (error: any) => void ; local_audio_level: (level: number) => void ; remote_audio_level: (level: number) => void ; state: (state: State) => void ; stats: (stats: StatsEvent) => void }>[Extract<T, "state" | "stats" | "connection_error" | "local_audio_level" | "remote_audio_level">]) => void[]

Inherited from

EventEmitter.listeners


off

▸ off<T>(event, fn?, context?, once?): ConnectionManager

Type parameters

Name Type
T extends "state" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<{ connection_error: (error: any) => void ; local_audio_level: (level: number) => void ; remote_audio_level: (level: number) => void ; state: (state: State) => void ; stats: (stats: StatsEvent) => void }>[Extract<T, "state" \
context? any
once? boolean

Returns

ConnectionManager

Inherited from

EventEmitter.off


on

▸ on<T>(event, fn, context?): ConnectionManager

Add a listener for a given event.

Type parameters

Name Type
T extends "state" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<{ connection_error: (error: any) => void ; local_audio_level: (level: number) => void ; remote_audio_level: (level: number) => void ; state: (state: State) => void ; stats: (stats: StatsEvent) => void }>[Extract<T, "state" \
context? any

Returns

ConnectionManager

Inherited from

EventEmitter.on


once

▸ once<T>(event, fn, context?): ConnectionManager

Add a one-time listener for a given event.

Type parameters

Name Type
T extends "state" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<{ connection_error: (error: any) => void ; local_audio_level: (level: number) => void ; remote_audio_level: (level: number) => void ; state: (state: State) => void ; stats: (stats: StatsEvent) => void }>[Extract<T, "state" \
context? any

Returns

ConnectionManager

Inherited from

EventEmitter.once


removeAllListeners

▸ removeAllListeners(event?): ConnectionManager

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? "state" \

Returns

ConnectionManager

Inherited from

EventEmitter.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): ConnectionManager

Remove the listeners of a given event.

Type parameters

Name Type
T extends "state" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<{ connection_error: (error: any) => void ; local_audio_level: (level: number) => void ; remote_audio_level: (level: number) => void ; state: (state: State) => void ; stats: (stats: StatsEvent) => void }>[Extract<T, "state" \
context? any
once? boolean

Returns

ConnectionManager

Inherited from

EventEmitter.removeListener


startConnectionStats

▸ startConnectionStats(): void

Returns

void


startLocalAudioLevel

▸ startLocalAudioLevel(): void

Returns

void


startRemoteAudioLevel

▸ startRemoteAudioLevel(): void

Returns

void


stopConnectionStats

▸ stopConnectionStats(): void

Returns

void


stopLocalAudioLevel

▸ stopLocalAudioLevel(): void

Returns

void


stopRemoteAudioLevel

▸ stopRemoteAudioLevel(): void

Returns

void

@telenia/tvox-client-sdk / Exports / Client

Class: Client

Client class represents a client access to TVox.

Hierarchy

↳ Client

Constructors

constructor

• new Client(configuration)

Creates an instance of Client

Parameters

Name Type
configuration ClientParameter

Overrides

EventEmitter<Client.EventMap&gt;.constructor

Properties

action

• Readonly action: Action

place for interact with server (eg. upload file, send feedback)


configuration

• Readonly configuration: ClientParameter

parameter used to instantiate client


phone

• Readonly phone: Phone

manage phone


transport

• Readonly transport: Transport

transport messages with TVox


user

• Readonly user: User

manage user data


prefixed

▪ Static prefixed: string | boolean

Inherited from

EventEmitter.prefixed

Events

logged_in

▪ Static logged_in: string = "logged_in"

Fired for a successfull login.

Param

User user is same as client.user

Param

LoginData loginData is same as client.loginData

client.on("logged_in", function(user, loginData) {
  console.log("user is logged in");
});

logged_out

▪ Static logged_out: string = "logged_out"

Fired for a successfull logout.

Param

User user is same as client.user

client.on("logged_out", function(user) {
  console.log("user is logged out");
});

login_failed

▪ Static login_failed: string = "login_failed"

Fired after a login is failed

Param

LoginError

Param

User user is same as client.user

code attribute value of error can be

any value greater or equal to 500 is consider internal server error and must be notified to Telenia Customer Service

client.on("login_failed", function(error, user) {
  console.log("user login failed", error);
});

login_in_progress

▪ Static login_in_progress: string = "login_in_progress"

Fired after a login il called

Param

User user is same as client.user

Param

BasicCredential or BerearCredential or ExternalSessionIdCredential credential used

client.on("login_in_progress", function(user, credential) {
  console.log("user is trying to login", credential);
});

ready

▪ Static ready: string = "ready"

Fired after login ad user initalization is done

Accessors

instanceId

• get instanceId(): string

identification of Client instance

Returns

string


logConfigurator

• get logConfigurator(): ClientLogger

client log configurator

Returns

ClientLogger


loginData

• get loginData(): undefined | LoginData

login data

Returns

undefined | LoginData


state

• get state(): ClientState

current state of this client instance

Returns

ClientState

Methods

addListener

▸ addListener<T>(event, fn, context?): Client

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

Client

Inherited from

EventEmitter.addListener


eventNames

▸ eventNames(): keyof EventMap[]

Return an array listing the events for which the emitter has registered listeners.

Returns

keyof EventMap[]

Inherited from

EventEmitter.eventNames


isLogged

▸ isLogged(): boolean

check if this instance is logged

Returns

boolean

true if this client is logged


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event keyof EventMap

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void[]

Inherited from

EventEmitter.listeners


login

▸ login(credential): Promise<void>

login with BasicCredential or BerearCredential or JWTCredential or ExternalSessionIdCredential

// login with BasicCredential
client.login({username: "foo", password: "bar"}).then(() => {
          console.log("login ok");
      }, (err) => {
          console.error("login failed", err);
      });

// login with BerearCredential
client.login({token: "aabbcc"}).then(() => {
          console.log("login ok");
      }, (err) => {
          console.error("login failed", err);
      });

// login with JWTCredential
client.login({jwt: "xxxxx.yyyyy.zzzzz"}).then(() => {
          console.log("login ok");
      }, (err) => {
          console.error("login failed", err);
      });

// login with ExternalSessionIdCredential
client.login({externalSessionId: "aabbcc"}).then(() => {
          console.log("login ok");
      }, (err) => {
          console.error("login failed", err);
      });

Parameters

Name Type
credential Credential

Returns

Promise<void>


logout

▸ logout(reason?, note?): Promise<boolean>

run logout

Parameters

Name Type Description
reason? string set reason for logout, example "end of shift"
note? string optional additional note of logout

Returns

Promise<boolean>

a promise resolved when the logout is done


off

▸ off<T>(event, fn?, context?, once?): Client

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any
once? boolean

Returns

Client

Inherited from

EventEmitter.off


on

▸ on<T>(event, fn, context?): Client

Add a listener for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

Client

Inherited from

EventEmitter.on


once

▸ once<T>(event, fn, context?): Client

Add a one-time listener for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

Client

Inherited from

EventEmitter.once


removeAllListeners

▸ removeAllListeners(event?): Client

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? keyof EventMap

Returns

Client

Inherited from

EventEmitter.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): Client

Remove the listeners of a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any
once? boolean

Returns

Client

Inherited from

EventEmitter.removeListener

@telenia/tvox-client-sdk / Exports / Client / ClientLogger

Class: ClientLogger

Client.ClientLogger

Hierarchy

↳ ClientLogger

Accessors

enabled

• get enabled(): boolean

Returns

boolean

• set enabled(enabled): void

Parameters

Name Type
enabled boolean

Returns

void


instanceIdLogged

• get instanceIdLogged(): boolean

enabled to log identification of Client instance on every log line

Returns

boolean

Overrides

Log.Logger.instanceIdLogged

• set instanceIdLogged(instanceIdLogged): void

Parameters

Name Type
instanceIdLogged boolean

Returns

void

Overrides

Log.Logger.instanceIdLogged


logLevel

• get logLevel(): LogLevel

get current log level

Returns

LogLevel

Overrides

Log.Logger.logLevel

• set logLevel(logLevel): void

Parameters

Name Type
logLevel LogLevel

Returns

void

Overrides

Log.Logger.logLevel


objectToJson

• get objectToJson(): boolean

do JSON.stringify of logged args instead of direct print

Returns

boolean

Overrides

Log.Logger.objectToJson

• set objectToJson(objectToJson): void

Parameters

Name Type
objectToJson boolean

Returns

void

Overrides

Log.Logger.objectToJson


prefix

• get prefix(): string

prefix added to every log line

Returns

string

Overrides

Log.Logger.prefix

• set prefix(prefix): void

Parameters

Name Type
prefix string

Returns

void

Overrides

Log.Logger.prefix


timestamp

• get timestamp(): boolean

enabled to print timestamp on every log line

Returns

boolean

Overrides

Log.Logger.timestamp

• set timestamp(timestamp): void

Parameters

Name Type
timestamp boolean

Returns

void

Overrides

Log.Logger.timestamp

@telenia/tvox-client-sdk / Exports / Client / LoginData

Class: LoginData

Client.LoginData

Properties

accessToken

• Readonly accessToken: string

access token assigned to current login


apiVersion

• Readonly apiVersion: string

api version where logged in


credential

• Readonly credential: Credential

credential used on login


serverVersion

• Readonly serverVersion: string

server version where logged in


sessionId

• Readonly sessionId: string

session id of current login

@telenia/tvox-client-sdk / Exports / Contact

Class: Contact

Hierarchy

↳ InternalUserContact

↳ InternalServiceContact

↳ InternalShortNumberContact

↳ ExternalItemContact

↳ ExternalOrganizationContact

↳ PersonalContact

Properties

id

• Readonly id: string


subtype

• Readonly subtype: null | InternalSubType | ORGANIZATION = null


type

• Readonly type: Type

@telenia/tvox-client-sdk / Exports / Contact / SearchContactResult

Class: SearchContactResult

Contact.SearchContactResult

represent result of searchContact methods.

Hierarchy

↳ SearchContactResult

Properties

requestOptions

• Readonly requestOptions: SearchContactOptions


prefixed

▪ Static prefixed: string | boolean

Inherited from

SearchResult.prefixed

Events

complete

▪ Static complete: string = "complete"

Fired when response complete

Param

result.on("complete", function() {
  console.log("result complete");
});

#### Inherited from

[SearchResult](#classessearchresultmd).[complete](#complete)

___

### data

▪ `Static` **data**: `string` = `"data"`

Fired when response return data

**`Param`**

T data received

**`Param`**

number indexed data

**`Param`**

total result to received

```javascript
result.on("data", function(data, index, tot) {
  console.log("received " + index + " of " + tot + " data", data);
});

Inherited from

SearchResult.data


error

▪ Static error: string = "error"

Fired when response return error

Param

data received

result.on("error", function(error) {
  console.log("error on receive result", error);
});

Inherited from

SearchResult.error

Methods

addListener

▸ addListener<T>(event, fn, context?): SearchContactResult

Type parameters

Name Type
T extends keyof SearchResultEventMap<Contact>

Parameters

Name Type
event T
fn (...args: ArgumentMap<SearchResultEventMap<Contact>>[Extract<T, keyof SearchResultEventMap<Contact>>]) => void
context? any

Returns

SearchContactResult

Inherited from

SearchResult.addListener


eventNames

▸ eventNames(): keyof SearchResultEventMap<Contact>[]

Return an array listing the events for which the emitter has registered listeners.

Returns

keyof SearchResultEventMap<Contact>[]

Inherited from

SearchResult.eventNames


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event keyof SearchResultEventMap<Contact>

Returns

number

Inherited from

SearchResult.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<SearchResultEventMap<Contact>>[Extract<T, keyof SearchResultEventMap<Contact>>]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends keyof SearchResultEventMap<Contact>

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<SearchResultEventMap<Contact>>[Extract<T, keyof SearchResultEventMap<Contact>>]) => void[]

Inherited from

SearchResult.listeners


off

▸ off<T>(event, fn?, context?, once?): SearchContactResult

Type parameters

Name Type
T extends keyof SearchResultEventMap<Contact>

Parameters

Name Type
event T
fn? (...args: ArgumentMap<SearchResultEventMap<Contact>>[Extract<T, keyof SearchResultEventMap<Contact>>]) => void
context? any
once? boolean

Returns

SearchContactResult

Inherited from

SearchResult.off


on

▸ on<T>(event, fn, context?): SearchContactResult

Add a listener for a given event.

Type parameters

Name Type
T extends keyof SearchResultEventMap<Contact>

Parameters

Name Type
event T
fn (...args: ArgumentMap<SearchResultEventMap<Contact>>[Extract<T, keyof SearchResultEventMap<Contact>>]) => void
context? any

Returns

SearchContactResult

Inherited from

SearchResult.on


once

▸ once<T>(event, fn, context?): SearchContactResult

Add a one-time listener for a given event.

Type parameters

Name Type
T extends keyof SearchResultEventMap<Contact>

Parameters

Name Type
event T
fn (...args: ArgumentMap<SearchResultEventMap<Contact>>[Extract<T, keyof SearchResultEventMap<Contact>>]) => void
context? any

Returns

SearchContactResult

Inherited from

SearchResult.once


removeAllListeners

▸ removeAllListeners(event?): SearchContactResult

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? keyof SearchResultEventMap<Contact>

Returns

SearchContactResult

Inherited from

SearchResult.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): SearchContactResult

Remove the listeners of a given event.

Type parameters

Name Type
T extends keyof SearchResultEventMap<Contact>

Parameters

Name Type
event T
fn? (...args: ArgumentMap<SearchResultEventMap<Contact>>[Extract<T, keyof SearchResultEventMap<Contact>>]) => void
context? any
once? boolean

Returns

SearchContactResult

Inherited from

SearchResult.removeListener

@telenia/tvox-client-sdk / Exports / DeviceSip

Class: DeviceSip

Implements

Properties

exten

• Readonly exten: string


label

• Readonly label: string


type

• Readonly type: LineType = C.LineType.SIP

Methods

dial

▸ dial(phoneNumber, dialParamValue?): Promise<void>

run dial

Parameters

Name Type
phoneNumber string
dialParamValue? DialParam

Returns

Promise<void>

a promise resolved if call is placed

@telenia/tvox-client-sdk / Exports / DeviceWebrtc

Class: DeviceWebrtc

Implements

Properties

configuration

• Readonly configuration: Configuration


exten

• Readonly exten: string


label

• Readonly label: string


media

• Readonly media: DeviceWebrtcMedia


type

• Readonly type: LineType = C.LineType.WEBRTC

Methods

dialAudio

▸ dialAudio(phoneNumber, param?): Promise<void>

run dialAudio

Parameters

Name Type
phoneNumber string
param? DialParam

Returns

Promise<void>

a promise resolved if call is placed


dialVideo

▸ dialVideo(phoneNumber, param?, videoContainer?): Promise<void>

run dialVideo

Parameters

Name Type
phoneNumber string
param? DialParam
videoContainer? HTMLElement

Returns

Promise<void>

a promise resolved if call is placed

@telenia/tvox-client-sdk / Exports / DeviceWebrtc / Configuration

Class: Configuration

DeviceWebrtc.Configuration

Constructors

constructor

• new Configuration(device)

Parameters

Name Type
device DeviceWebrtc

Accessors

media

• get media(): WebrtDeviceManager

Returns

WebrtDeviceManager


options

• get options(): Options

Returns

Options

@telenia/tvox-client-sdk / Exports / DeviceWebrtc / Configuration / Options

Class: Options

DeviceWebrtc.Configuration.Options

Constructors

constructor

• new Options(config)

Parameters

Name Type
config WebrtcConfig

Accessors

connectionTimeout

• get connectionTimeout(): undefined | number

Returns

undefined | number

• set connectionTimeout(connectionTimeout): void

Parameters

Name Type
connectionTimeout undefined \

Returns

void


deadStreamTimeout

• get deadStreamTimeout(): undefined | number

Returns

undefined | number

• set deadStreamTimeout(deadStreamTimeout): void

Parameters

Name Type
deadStreamTimeout undefined \

Returns

void


iceGatherPolicy

• get iceGatherPolicy(): undefined | Type[]

Returns

undefined | Type[]

• set iceGatherPolicy(iceGatherPolicy): void

Parameters

Name Type
iceGatherPolicy undefined \

Returns

void


iceServers

• get iceServers(): undefined | IceServer[]

Returns

undefined | IceServer[]

• set iceServers(iceServers): void

Parameters

Name Type
iceServers undefined \

Returns

void


immediateRingback

• get immediateRingback(): undefined | boolean

Returns

undefined | boolean

• set immediateRingback(immediateRingback): void

Parameters

Name Type
immediateRingback undefined \

Returns

void


mediaConfiguration

• get mediaConfiguration(): undefined | MediaConfiguration

Returns

undefined | MediaConfiguration


trickleIcePolicy

• get trickleIcePolicy(): undefined | TrickleIcePolicy

Returns

undefined | TrickleIcePolicy

• set trickleIcePolicy(trickleIcePolicy): void

Parameters

Name Type
trickleIcePolicy undefined \

Returns

void

@telenia/tvox-client-sdk / Exports / DeviceWebrtcMedia

Class: DeviceWebrtcMedia

Hierarchy

↳ DeviceWebrtcMedia

Events

device_change

▪ Static device_change: string = "device_change"

Fired after device is connected/disconnected from system

Param

call.on("device_change", function(status: MediaDeviceStatus, devices: MediaDevice) {
  console.log("device change", status);
  console.log("system devices is", devices);
});

unused_device_added

▪ Static unused_device_added: string = "unused_device_added"

Fired after detected connect devices that is never been managed

Param

call.on("unused_device_added", function(devices) {
  console.log("new devices is added to system", devices);
});

use_device_when_device_change

▪ Static use_device_when_device_change: string = "use_device_when_device_change"

Fired after automatically select device to use after device is connected/disconnected from system

Param

call.on("use_device_when_device_change", function(deviceToUpdate, ejectedDevice) {
  console.log("used device is ejected", ejectedDevice);
  console.log("some used device switch to", deviceToUpdate);
});

Properties

prefixed

▪ Static prefixed: string | boolean

Inherited from

EventEmitter.prefixed

Accessors

audioInput

• get audioInput(): undefined | null | AudioInput

audio input device to use null or undefined means using default device

Returns

undefined | null | AudioInput


audioOutput

• get audioOutput(): undefined | null | AudioOutput

audio output device to use null or undefined means using default device

Returns

undefined | null | AudioOutput


audioSignalOutput

• get audioSignalOutput(): undefined | null | AudioOutput

audio output device to use for signaling (eg. ring) null or undefined means using default device

Returns

undefined | null | AudioOutput


videoInput

• get videoInput(): undefined | null | false | AudioInput

video input device to use null or undefined means using default device false means never use video input

Returns

undefined | null | false | AudioInput


deviceIdToIgnore

• Static get deviceIdToIgnore(): string[]

Returns

string[]

Methods

addListener

▸ addListener<T>(event, fn, context?): DeviceWebrtcMedia

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

DeviceWebrtcMedia

Inherited from

EventEmitter.addListener


checkDevicePermission

▸ checkDevicePermission(permission): Promise<{ audio: boolean ; video: boolean }>

Request permission of audio device, video device or both. Return true if given, false or DOMException otherwise

Parameters

Name Type
permission Object
permission.audio boolean
permission.video boolean

Returns

Promise<{ audio: boolean ; video: boolean }>


eventNames

▸ eventNames(): keyof EventMap[]

Return an array listing the events for which the emitter has registered listeners.

Returns

keyof EventMap[]

Inherited from

EventEmitter.eventNames


getMediaDevice

▸ getMediaDevice(startMedia, acquireAudio?, acquireVideo?): Promise<MediaDevice>

Get an enumeration of available device. If startMedia is true it request permission to usage devices (default was audio and video if available) to retrive description of every device, otherwise return only id

Parameters

Name Type Default value
startMedia boolean undefined
acquireAudio boolean true
acquireVideo boolean true

Returns

Promise<MediaDevice>


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event keyof EventMap

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void[]

Inherited from

EventEmitter.listeners


off

▸ off<T>(event, fn?, context?, once?): DeviceWebrtcMedia

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any
once? boolean

Returns

DeviceWebrtcMedia

Inherited from

EventEmitter.off


on

▸ on<T>(event, fn, context?): DeviceWebrtcMedia

Add a listener for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

DeviceWebrtcMedia

Inherited from

EventEmitter.on


once

▸ once<T>(event, fn, context?): DeviceWebrtcMedia

Add a one-time listener for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

DeviceWebrtcMedia

Inherited from

EventEmitter.once


removeAllListeners

▸ removeAllListeners(event?): DeviceWebrtcMedia

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? keyof EventMap

Returns

DeviceWebrtcMedia

Inherited from

EventEmitter.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): DeviceWebrtcMedia

Remove the listeners of a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any
once? boolean

Returns

DeviceWebrtcMedia

Inherited from

EventEmitter.removeListener


testMediaDevice

▸ testMediaDevice(audioInput, videoInput, audioOutput, videoContainer): Promise<MediaDeviceTest>

testing devices Remember to call stop when test end, otherwise devices is keep engaged

---- audioInput and videoInput ----- object: exact device null: system default device boolean: false disabled - true system default device

---- audioOutput ----- object: exact device null: system default device

Parameters

Name Type
audioInput null \
videoInput null \
audioOutput null \
videoContainer HTMLElement

Returns

Promise<MediaDeviceTest>


useDevice

▸ useDevice(audioInput, audioOutput, videoInput, audioSignalOutput, audioNotificationOutput): Promise<void>

use device for webrtc call In call is in progress it switch his device

Parameters

Name Type
audioInput null \
audioOutput null \
videoInput null \
audioSignalOutput null \
audioNotificationOutput null \

Returns

Promise<void>

@telenia/tvox-client-sdk / Exports / DeviceWebrtcMedia / MediaDeviceTest

Class: MediaDeviceTest

DeviceWebrtcMedia.MediaDeviceTest

Hierarchy

↳ MediaDeviceTest

Properties

prefixed

▪ Static prefixed: string | boolean

Inherited from

EventEmitter.prefixed

Methods

addListener

▸ addListener<T>(event, fn, context?): MediaDeviceTest

Type parameters

Name Type
T extends "audio_level"

Parameters

Name Type
event T
fn (...args: ArgumentMap<{ audio_level: (value: number) => void }>[Extract<T, "audio_level">]) => void
context? any

Returns

MediaDeviceTest

Inherited from

EventEmitter.addListener


changeAudioOutput

▸ changeAudioOutput(audioOutput?): Promise<void>

Parameters

Name Type
audioOutput? null \

Returns

Promise<void>


changeAudioVideoInput

▸ changeAudioVideoInput(audioInput?, videoInput?): Promise<void>

Parameters

Name Type
audioInput? null \
videoInput? null \

Returns

Promise<void>


eventNames

▸ eventNames(): "audio_level"[]

Return an array listing the events for which the emitter has registered listeners.

Returns

"audio_level"[]

Inherited from

EventEmitter.eventNames


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event "audio_level"

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<{ audio_level: (value: number) => void }>[Extract<T, "audio_level">]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends "audio_level"

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<{ audio_level: (value: number) => void }>[Extract<T, "audio_level">]) => void[]

Inherited from

EventEmitter.listeners


off

▸ off<T>(event, fn?, context?, once?): MediaDeviceTest

Type parameters

Name Type
T extends "audio_level"

Parameters

Name Type
event T
fn? (...args: ArgumentMap<{ audio_level: (value: number) => void }>[Extract<T, "audio_level">]) => void
context? any
once? boolean

Returns

MediaDeviceTest

Inherited from

EventEmitter.off


on

▸ on<T>(event, fn, context?): MediaDeviceTest

Add a listener for a given event.

Type parameters

Name Type
T extends "audio_level"

Parameters

Name Type
event T
fn (...args: ArgumentMap<{ audio_level: (value: number) => void }>[Extract<T, "audio_level">]) => void
context? any

Returns

MediaDeviceTest

Inherited from

EventEmitter.on


once

▸ once<T>(event, fn, context?): MediaDeviceTest

Add a one-time listener for a given event.

Type parameters

Name Type
T extends "audio_level"

Parameters

Name Type
event T
fn (...args: ArgumentMap<{ audio_level: (value: number) => void }>[Extract<T, "audio_level">]) => void
context? any

Returns

MediaDeviceTest

Inherited from

EventEmitter.once


removeAllListeners

▸ removeAllListeners(event?): MediaDeviceTest

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? "audio_level"

Returns

MediaDeviceTest

Inherited from

EventEmitter.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): MediaDeviceTest

Remove the listeners of a given event.

Type parameters

Name Type
T extends "audio_level"

Parameters

Name Type
event T
fn? (...args: ArgumentMap<{ audio_level: (value: number) => void }>[Extract<T, "audio_level">]) => void
context? any
once? boolean

Returns

MediaDeviceTest

Inherited from

EventEmitter.removeListener


start

▸ start(): Promise<void>

Returns

Promise<void>


stop

▸ stop(): Promise<void>

Returns

Promise<void>

@telenia/tvox-client-sdk / Exports / EventEmitter

Class: EventEmitter

Type parameters

Name Type
E extends EventTypes = string \
Context extends any = any

Hierarchy

↳ EventEmitter

↳↳ Client

↳↳ DeviceWebrtcMedia

↳↳ MediaDeviceTest

↳↳ Call

↳↳ Lookup

↳↳ Recording

↳↳ Detail

↳↳ CallSipForTransfer

↳↳ ConnectionManager

↳↳ Transport

↳↳ User

↳↳ UserStatusMonitor

↳↳ Profile

↳↳ Phone

↳↳ SearchResult

Properties

prefixed

▪ Static prefixed: string | boolean

Inherited from

EventEmitterProto.prefixed

Methods

addListener

▸ addListener<T>(event, fn, context?): EventEmitter<E, Context>

Type parameters

Name Type
T extends string \

Parameters

Name Type
event T
fn EventListener<E, T>
context? Context

Returns

EventEmitter<E, Context>

Inherited from

EventEmitterProto.addListener


eventNames

▸ eventNames(): EventNames<E>[]

Return an array listing the events for which the emitter has registered listeners.

Returns

EventNames<E>[]

Inherited from

EventEmitterProto.eventNames


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event EventNames<E>

Returns

number

Inherited from

EventEmitterProto.listenerCount


listeners

▸ listeners<T>(event): EventListener<E, T>[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends string \

Parameters

Name Type
event T

Returns

EventListener<E, T>[]

Inherited from

EventEmitterProto.listeners


off

▸ off<T>(event, fn?, context?, once?): EventEmitter<E, Context>

Type parameters

Name Type
T extends string \

Parameters

Name Type
event T
fn? EventListener<E, T>
context? Context
once? boolean

Returns

EventEmitter<E, Context>

Inherited from

EventEmitterProto.off


on

▸ on<T>(event, fn, context?): EventEmitter<E, Context>

Add a listener for a given event.

Type parameters

Name Type
T extends string \

Parameters

Name Type
event T
fn EventListener<E, T>
context? Context

Returns

EventEmitter<E, Context>

Inherited from

EventEmitterProto.on


once

▸ once<T>(event, fn, context?): EventEmitter<E, Context>

Add a one-time listener for a given event.

Type parameters

Name Type
T extends string \

Parameters

Name Type
event T
fn EventListener<E, T>
context? Context

Returns

EventEmitter<E, Context>

Inherited from

EventEmitterProto.once


removeAllListeners

▸ removeAllListeners(event?): EventEmitter<E, Context>

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? EventNames<E>

Returns

EventEmitter<E, Context>

Inherited from

EventEmitterProto.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): EventEmitter<E, Context>

Remove the listeners of a given event.

Type parameters

Name Type
T extends string \

Parameters

Name Type
event T
fn? EventListener<E, T>
context? Context
once? boolean

Returns

EventEmitter<E, Context>

Inherited from

EventEmitterProto.removeListener

@telenia/tvox-client-sdk / Exports / ExternalItemContact

Class: ExternalItemContact

Hierarchy

↳ ExternalItemContact

Properties

data

• Readonly data: ExternalContact

Inherited from

Contact.data


id

• Readonly id: string

Inherited from

Contact.id


subtype

• Readonly subtype: null | InternalSubType | ORGANIZATION = null

Inherited from

Contact.subtype


type

• Readonly type: Type

Inherited from

Contact.type

@telenia/tvox-client-sdk / Exports / ExternalOrganizationContact

Class: ExternalOrganizationContact

Hierarchy

↳ ExternalOrganizationContact

Properties

data

• Readonly data: ExternalOrganizationContact

Inherited from

Contact.data


id

• Readonly id: string

Inherited from

Contact.id


subtype

• Readonly subtype: null | InternalSubType | ORGANIZATION = null

Inherited from

Contact.subtype


type

• Readonly type: Type

Inherited from

Contact.type

@telenia/tvox-client-sdk / Exports / Feedback / Data

Class: Data

Feedback.Data

Properties

attachments

• attachments: File[]

populated by generateData


body

• body: string

populated by generateData


logFile

• logFile: Blob

populated by generateData


name

• name: string


time

• time: Date

Methods

toZipFile

▸ toZipFile(options?): Promise<File>

Parameters

Name Type
options? CompressOptions

Returns

Promise<File>

@telenia/tvox-client-sdk / Exports / InternalServiceContact

Class: InternalServiceContact

Hierarchy

↳ InternalServiceContact

Properties

data

• Readonly data: ServiceContact

Inherited from

Contact.data


id

• Readonly id: string

Inherited from

Contact.id


subtype

• Readonly subtype: null | InternalSubType | ORGANIZATION = null

Inherited from

Contact.subtype


type

• Readonly type: Type

Inherited from

Contact.type

@telenia/tvox-client-sdk / Exports / InternalShortNumberContact

Class: InternalShortNumberContact

Hierarchy

↳ InternalShortNumberContact

Properties

data

• Readonly data: ShortNumberContact

Inherited from

Contact.data


id

• Readonly id: string

Inherited from

Contact.id


subtype

• Readonly subtype: null | InternalSubType | ORGANIZATION = null

Inherited from

Contact.subtype


type

• Readonly type: Type

Inherited from

Contact.type

@telenia/tvox-client-sdk / Exports / InternalUserContact

Class: InternalUserContact

Hierarchy

↳ InternalUserContact

Properties

data

• Readonly data: UserContact

Inherited from

Contact.data


id

• Readonly id: string

Inherited from

Contact.id


subtype

• Readonly subtype: null | InternalSubType | ORGANIZATION = null

Inherited from

Contact.subtype


type

• Readonly type: Type

Inherited from

Contact.type

Accessors

statusMonitor

• get statusMonitor(): UserStatusMonitor

Returns

UserStatusMonitor

@telenia/tvox-client-sdk / Exports / Log

Class: Log

Accessors

config

• get config(): Logger

Returns

Logger


debug

• get debug(): (message: any, ...args: any) => void

Returns

fn

▸ (message, ...args): void

Parameters
Name Type
message any
...args any
Returns

void


error

• get error(): (message: any, ...args: any) => void

Returns

fn

▸ (message, ...args): void

Parameters
Name Type
message any
...args any
Returns

void


fatal

• get fatal(): (message: any, ...args: any) => void

Returns

fn

▸ (message, ...args): void

Parameters
Name Type
message any
...args any
Returns

void


info

• get info(): (message: any, ...args: any) => void

Returns

fn

▸ (message, ...args): void

Parameters
Name Type
message any
...args any
Returns

void


verbose

• get verbose(): (message: any, ...args: any) => void

Returns

fn

▸ (message, ...args): void

Parameters
Name Type
message any
...args any
Returns

void


warn

• get warn(): (message: any, ...args: any) => void

Returns

fn

▸ (message, ...args): void

Parameters
Name Type
message any
...args any
Returns

void

Methods

log

▸ log(): (level: LogLevel, message: any, ...args: any) => void

Returns

fn

▸ (level, message, ...args): void

Parameters
Name Type
level LogLevel
message any
...args any
Returns

void


of

▸ Static of(pkg, client?): Log

create instance of Log that log with pkg prefix

Parameters

Name Type
pkg string
client? Client

Returns

Log

@telenia/tvox-client-sdk / Exports / Log / Logger

Class: Logger

Log.Logger

Hierarchy

↳ ClientLogger

Accessors

instanceIdLogged

• Abstract get instanceIdLogged(): boolean

enabled to log identification of Client instance on every log line

Returns

boolean


logLevel

• Abstract get logLevel(): LogLevel

get current log level

Returns

LogLevel


objectToJson

• Abstract get objectToJson(): boolean

do JSON.stringify of logged args instead of direct print

Returns

boolean


prefix

• Abstract get prefix(): string

prefix added to every log line

Returns

string


timestamp

• Abstract get timestamp(): boolean

enabled to print timestamp on every log line

Returns

boolean

@telenia/tvox-client-sdk / Exports / PersonalContact

Class: PersonalContact

Hierarchy

↳ PersonalContact

Properties

data

• Readonly data: PersonalContact

Inherited from

Contact.data


id

• Readonly id: string

Inherited from

Contact.id


subtype

• Readonly subtype: null | InternalSubType | ORGANIZATION = null

Inherited from

Contact.subtype


type

• Readonly type: Type

Inherited from

Contact.type

@telenia/tvox-client-sdk / Exports / Phone

Class: Phone

A Phone represents place to manage phone activity

Hierarchy

↳ Phone

Properties

availableDevice

• Readonly availableDevice: (DeviceSip | DeviceWebrtc)[] = []


prefixed

▪ Static prefixed: string | boolean

Inherited from

EventEmitter.prefixed

Events

device_change

▪ Static device_change: string = "device_change"

Fired when device to use is changed

Param

DeviceSip or DeviceWebrtc

Param

DeviceSip or DeviceWebrtc

client.phone.on("device_change", function(newDevice, oldDevice) {
  console.log("device change", oldDevice, newDevice);
});

newcall

▪ Static newcall: string = "newcall"

Fired when new call is incoming or outgoing

Param

CallSip or CallWebrtc call to manage

client.phone.on("newcall", function(call, detail) {
  console.log("new call is placed", call, detail);
});

tvoxclient_state_change

▪ Static tvoxclient_state_change: string = "tvoxclient_state_change"

Fired when TVox Client state change

Param

TVoxClientState

Param

TVoxClientDetail

client.phone.on("tvoxclient_state_change", function(state, detail) {
  console.log("TVox Client state change", state, detail);
});

Accessors

device

• get device(): null | DeviceSip | DeviceWebrtc

Returns

null | DeviceSip | DeviceWebrtc


managedByTVoxClient

• get managedByTVoxClient(): boolean

phone managed by TVox Client

Returns

boolean

• set managedByTVoxClient(managedByTVoxClient): void

Parameters

Name Type
managedByTVoxClient boolean

Returns

void


state

• get state(): Status

Returns

Status


tvoxClientState

• get tvoxClientState(): TVoxClientState

Returns

TVoxClientState


tvoxClientStateDetail

• get tvoxClientStateDetail(): TVoxClientDetail

Returns

TVoxClientDetail

Methods

addListener

▸ addListener<T>(event, fn, context?): Phone

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

Phone

Inherited from

EventEmitter.addListener


eventNames

▸ eventNames(): keyof EventMap[]

Return an array listing the events for which the emitter has registered listeners.

Returns

keyof EventMap[]

Inherited from

EventEmitter.eventNames


getCall

▸ getCall(id): null | CallSip | CallWebrtc

get calll instance by callid

Parameters

Name Type Description
id string call id to retrive

Returns

null | CallSip | CallWebrtc

null if callid is not available


handleChannelNotification

▸ handleChannelNotification(channelEvent): Promise<void>

Parameters

Name Type
channelEvent ChannelEvent

Returns

Promise<void>


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event keyof EventMap

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void[]

Inherited from

EventEmitter.listeners


off

▸ off<T>(event, fn?, context?, once?): Phone

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any
once? boolean

Returns

Phone

Inherited from

EventEmitter.off


on

▸ on<T>(event, fn, context?): Phone

Add a listener for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

Phone

Inherited from

EventEmitter.on


once

▸ once<T>(event, fn, context?): Phone

Add a one-time listener for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

Phone

Inherited from

EventEmitter.once


removeAllListeners

▸ removeAllListeners(event?): Phone

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? keyof EventMap

Returns

Phone

Inherited from

EventEmitter.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): Phone

Remove the listeners of a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any
once? boolean

Returns

Phone

Inherited from

EventEmitter.removeListener


useDevice

▸ useDevice(device): Promise<boolean>

run useDevice to set current device to use this method must be called after client initialization

Parameters

Name Type Description
device DeviceSip \ DeviceWebrtc

Returns

Promise<boolean>

a promise resolved true if device is ready to use

@telenia/tvox-client-sdk / Exports / Profile

Class: Profile

Type parameters

Name Type
E extends EventTypes = any

Hierarchy

↳ Profile

↳↳ ProfileAgent

Properties

id

• Readonly id: number


type

• Readonly type: ProfileType


prefixed

▪ Static prefixed: string | boolean

Inherited from

EventEmitter.prefixed

Accessors

callRecording

• get callRecording(): CallRecording

return how a profile can record call

Returns

CallRecording


isInUse

• get isInUse(): boolean

return this is profile in use

Returns

boolean


label

• get label(): string

Returns

string

Methods

addListener

▸ addListener<T>(event, fn, context?): Profile<E>

Type parameters

Name Type
T extends string \

Parameters

Name Type
event T
fn EventListener<E, T>
context? any

Returns

Profile<E>

Inherited from

EventEmitter.addListener


eventNames

▸ eventNames(): EventNames<E>[]

Return an array listing the events for which the emitter has registered listeners.

Returns

EventNames<E>[]

Inherited from

EventEmitter.eventNames


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event EventNames<E>

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

▸ listeners<T>(event): EventListener<E, T>[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends string \

Parameters

Name Type
event T

Returns

EventListener<E, T>[]

Inherited from

EventEmitter.listeners


off

▸ off<T>(event, fn?, context?, once?): Profile<E>

Type parameters

Name Type
T extends string \

Parameters

Name Type
event T
fn? EventListener<E, T>
context? any
once? boolean

Returns

Profile<E>

Inherited from

EventEmitter.off


on

▸ on<T>(event, fn, context?): Profile<E>

Add a listener for a given event.

Type parameters

Name Type
T extends string \

Parameters

Name Type
event T
fn EventListener<E, T>
context? any

Returns

Profile<E>

Inherited from

EventEmitter.on


once

▸ once<T>(event, fn, context?): Profile<E>

Add a one-time listener for a given event.

Type parameters

Name Type
T extends string \

Parameters

Name Type
event T
fn EventListener<E, T>
context? any

Returns

Profile<E>

Inherited from

EventEmitter.once


removeAllListeners

▸ removeAllListeners(event?): Profile<E>

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? EventNames<E>

Returns

Profile<E>

Inherited from

EventEmitter.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): Profile<E>

Remove the listeners of a given event.

Type parameters

Name Type
T extends string \

Parameters

Name Type
event T
fn? EventListener<E, T>
context? any
once? boolean

Returns

Profile<E>

Inherited from

EventEmitter.removeListener


useProfile

▸ useProfile(): Promise<void>

Returns

Promise<void>

@telenia/tvox-client-sdk / Exports / ProfileAgent

Class: ProfileAgent

Hierarchy

↳ ProfileAgent

Properties

id

• Readonly id: number

Inherited from

Profile.id


type

• Readonly type: ProfileType

Inherited from

Profile.type


prefixed

▪ Static prefixed: string | boolean

Inherited from

Profile.prefixed

Events

call_on_queue

▪ Static call_on_queue: string = "call_on_queue"

Fired after server notify call on queue

Param

call.on("call_on_queue", function(totalCallOnQueue) {
  console.log("call on queue " + totalCallOnQueue);
});

service_call_on_queue

▪ Static service_call_on_queue: string = "service_call_on_queue"

Fired after server notify call on queue

Param

call.on("progress", function(serviceCode, callOnQueue) {
  console.log("call on queue " + callOnQueue + " for service " + serviceCode);
});

Accessors

callRecording

• get callRecording(): CallRecording

return how a profile can record call

Returns

CallRecording

Inherited from

Profile.callRecording


isInUse

• get isInUse(): boolean

return this is profile in use

Returns

boolean

Inherited from

Profile.isInUse


label

• get label(): string

Returns

string

Inherited from

Profile.label


status

• get status(): string

Returns

string

Methods

addListener

▸ addListener<T>(event, fn, context?): ProfileAgent

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

ProfileAgent

Inherited from

Profile.addListener


eventNames

▸ eventNames(): keyof EventMap[]

Return an array listing the events for which the emitter has registered listeners.

Returns

keyof EventMap[]

Inherited from

Profile.eventNames


getAllActivityCode

▸ getAllActivityCode(): Promise<ActivityCode[]>

Returns

Promise<ActivityCode[]>


getCurrentSkillsetsWithProfiles

▸ getCurrentSkillsetsWithProfiles(): Promise<any>

Returns

Promise<any>


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event keyof EventMap

Returns

number

Inherited from

Profile.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void[]

Inherited from

Profile.listeners


off

▸ off<T>(event, fn?, context?, once?): ProfileAgent

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any
once? boolean

Returns

ProfileAgent

Inherited from

Profile.off


on

▸ on<T>(event, fn, context?): ProfileAgent

Add a listener for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

ProfileAgent

Inherited from

Profile.on


once

▸ once<T>(event, fn, context?): ProfileAgent

Add a one-time listener for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

ProfileAgent

Inherited from

Profile.once


removeAllListeners

▸ removeAllListeners(event?): ProfileAgent

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? keyof EventMap

Returns

ProfileAgent

Inherited from

Profile.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): ProfileAgent

Remove the listeners of a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any
once? boolean

Returns

ProfileAgent

Inherited from

Profile.removeListener


setActivityCode

▸ setActivityCode(action): Promise<boolean>

Parameters

Name Type
action SetActivityCodeAction

Returns

Promise<boolean>


setNotReady

▸ setNotReady(): Promise<boolean>

Returns

Promise<boolean>


setReady

▸ setReady(): Promise<boolean>

Returns

Promise<boolean>


startNotifyServiceCallQueue

▸ startNotifyServiceCallQueue(): Promise<void>

Returns

Promise<void>


stopNotifyServiceCallQueue

▸ stopNotifyServiceCallQueue(): Promise<void>

Returns

Promise<void>


useProfile

▸ useProfile(): Promise<void>

Returns

Promise<void>

Inherited from

Profile.useProfile

@telenia/tvox-client-sdk / Exports / SearchResult

Class: SearchResult

Type parameters

Name
T

Hierarchy

↳ SearchResult

↳↳ SearchContactResult

↳↳ CallHistoryResult

Events

complete

▪ Static complete: string = "complete"

Fired when response complete

Param

result.on("complete", function() {
  console.log("result complete");
});

___

### data

▪ `Static` **data**: `string` = `"data"`

Fired when response return data

**`Param`**

T data received

**`Param`**

number indexed data

**`Param`**

total result to received

```javascript
result.on("data", function(data, index, tot) {
  console.log("received " + index + " of " + tot + " data", data);
});

error

▪ Static error: string = "error"

Fired when response return error

Param

data received

result.on("error", function(error) {
  console.log("error on receive result", error);
});

Properties

prefixed

▪ Static prefixed: string | boolean

Inherited from

EventEmitter.prefixed

Methods

addListener

▸ addListener<T>(event, fn, context?): SearchResult<T>

Type parameters

Name Type
T extends keyof SearchResultEventMap<T>

Parameters

Name Type
event T
fn (...args: ArgumentMap<SearchResultEventMap<T>>[Extract<T, keyof SearchResultEventMap<T>>]) => void
context? any

Returns

SearchResult<T>

Inherited from

EventEmitter.addListener


eventNames

▸ eventNames(): keyof SearchResultEventMap<T>[]

Return an array listing the events for which the emitter has registered listeners.

Returns

keyof SearchResultEventMap<T>[]

Inherited from

EventEmitter.eventNames


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event keyof SearchResultEventMap<T>

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<SearchResultEventMap<T>>[Extract<T, keyof SearchResultEventMap<T>>]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends keyof SearchResultEventMap<T>

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<SearchResultEventMap<T>>[Extract<T, keyof SearchResultEventMap<T>>]) => void[]

Inherited from

EventEmitter.listeners


off

▸ off<T>(event, fn?, context?, once?): SearchResult<T>

Type parameters

Name Type
T extends keyof SearchResultEventMap<T>

Parameters

Name Type
event T
fn? (...args: ArgumentMap<SearchResultEventMap<T>>[Extract<T, keyof SearchResultEventMap<T>>]) => void
context? any
once? boolean

Returns

SearchResult<T>

Inherited from

EventEmitter.off


on

▸ on<T>(event, fn, context?): SearchResult<T>

Add a listener for a given event.

Type parameters

Name Type
T extends keyof SearchResultEventMap<T>

Parameters

Name Type
event T
fn (...args: ArgumentMap<SearchResultEventMap<T>>[Extract<T, keyof SearchResultEventMap<T>>]) => void
context? any

Returns

SearchResult<T>

Inherited from

EventEmitter.on


once

▸ once<T>(event, fn, context?): SearchResult<T>

Add a one-time listener for a given event.

Type parameters

Name Type
T extends keyof SearchResultEventMap<T>

Parameters

Name Type
event T
fn (...args: ArgumentMap<SearchResultEventMap<T>>[Extract<T, keyof SearchResultEventMap<T>>]) => void
context? any

Returns

SearchResult<T>

Inherited from

EventEmitter.once


removeAllListeners

▸ removeAllListeners(event?): SearchResult<T>

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? keyof SearchResultEventMap<T>

Returns

SearchResult<T>

Inherited from

EventEmitter.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): SearchResult<T>

Remove the listeners of a given event.

Type parameters

Name Type
T extends keyof SearchResultEventMap<T>

Parameters

Name Type
event T
fn? (...args: ArgumentMap<SearchResultEventMap<T>>[Extract<T, keyof SearchResultEventMap<T>>]) => void
context? any
once? boolean

Returns

SearchResult<T>

Inherited from

EventEmitter.removeListener

@telenia/tvox-client-sdk / Exports / Transport

Class: Transport

A Transport represents place to manage communication to TVox

Hierarchy

↳ Transport

Events

connect

▪ Static connect: string = "connect"

Fired for each transport connection.

Param

client.transport.on("connect", function(user) {
  console.log("transport connected");
});

disconnect

▪ Static disconnect: string = "disconnect"

Fired for each transport disconnect.

Param

client.transport.on("disconnect", function(user) {
  console.log("transport disconnected");
});

Properties

prefixed

▪ Static prefixed: string | boolean

Inherited from

EventEmitter.prefixed

Accessors

state

• get state(): Status

Returns

Status

Methods

addListener

▸ addListener<T>(event, fn, context?): Transport

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

Transport

Inherited from

EventEmitter.addListener


connect

▸ connect(): void

run connect

Returns

void

a promise resolved when connect is done


disconnect

▸ disconnect(): void

run disconnect

Returns

void

a promise resolved when disconnect is done


eventNames

▸ eventNames(): keyof EventMap[]

Return an array listing the events for which the emitter has registered listeners.

Returns

keyof EventMap[]

Inherited from

EventEmitter.eventNames


isConnected

▸ isConnected(): boolean

Returns

boolean

true if transport is connected


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event keyof EventMap

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void[]

Inherited from

EventEmitter.listeners


off

▸ off<T>(event, fn?, context?, once?): Transport

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any
once? boolean

Returns

Transport

Inherited from

EventEmitter.off


on

▸ on<T>(event, fn, context?): Transport

Add a listener for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

Transport

Inherited from

EventEmitter.on


once

▸ once<T>(event, fn, context?): Transport

Add a one-time listener for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

Transport

Inherited from

EventEmitter.once


removeAllListeners

▸ removeAllListeners(event?): Transport

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? keyof EventMap

Returns

Transport

Inherited from

EventEmitter.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): Transport

Remove the listeners of a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any
once? boolean

Returns

Transport

Inherited from

EventEmitter.removeListener

@telenia/tvox-client-sdk / Exports / User

Class: User

A User represents place to manage user activity

Hierarchy

↳ User

Properties

availableProfile

• Readonly availableProfile: Profile<any>[] = []

profile available to user, for select one use method useProfile


info

• Readonly info: Data = {}

current user info


prefixed

▪ Static prefixed: string | boolean

Inherited from

EventEmitter.prefixed

Events

error_no_profile

▪ Static error_no_profile: string = "error_no_profile"

Fired after error on useDevice

Param

client.on("error_no_profile", function() {
  console.log("user logged use wrong profile");
});

error_no_profile_available

▪ Static error_no_profile_available: string = "error_no_profile_available"

Fired for error on profile available

Param

client.on("error_no_profile_available", function() {
  console.log("user logged has any available profile");
});

profile_added

▪ Static profile_added: string = "profile_added"

Fired after TVox notify that one profile is added

Param

Profile profile selected

client.on("profile_added", function(profile) {
  console.log("new profile is added to availableProfile");
});

profile_removed

▪ Static profile_removed: string = "profile_removed"

Fired after TVox notify that one profile is removed

Param

Profile profile selected

client.on("profile_removed", function(profile) {
  console.log("profile is removed from availableProfile");
});

profile_selected

▪ Static profile_selected: string = "profile_selected"

Fired after succesful useProfile

Param

Profile profile selected

client.on("profile_selected", function(profile) {
  console.log("user logged select profile");
});

Accessors

state

• get state(): State

current state of this client instance

Returns

State


statusMonitor

• get statusMonitor(): UserStatusMonitor

Returns

UserStatusMonitor

Methods

addListener

▸ addListener<T>(event, fn, context?): User

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

User

Inherited from

EventEmitter.addListener


eventNames

▸ eventNames(): keyof EventMap[]

Return an array listing the events for which the emitter has registered listeners.

Returns

keyof EventMap[]

Inherited from

EventEmitter.eventNames


getCallHistory

▸ getCallHistory(options): Promise<CallHistoryResult>

get call history

Parameters

Name Type
options CallHistoryRequest

Returns

Promise<CallHistoryResult>

a promise resolved when get call history is done

client.user.getCallHistory({pageNumber: 1, pageSize: "20"})
.catch(function(error) {
     console.error("Error on searchContact", error);
})
.then(function(result) {
   result
       .on("data", function(data, index, total){
             console.log("searchContact - result - DATA", data);
         })
      .on("error", function(error) {
             console.error("searchContact - result - ERROR", error);
         })
      .on("complete", function() {
             console.log("searchContact - result - COMPLETE");
         });
});

getContact

▸ getContact(id): Promise<null | Contact>

run getContact

Parameters

Name Type
id string

Returns

Promise<null | Contact>

a promise resolved when getContact is done

client.user.getContact("0009922b-f9b4-409c-bca4-e476e34b1553")
.catch(function(error) {
     console.error("getContact - error", error);
})
.then(function(result) {
     console.log("getContact - response", result);
});

getUserContactStatus

▸ getUserContactStatus(username): Promise<UserContact>

Parameters

Name Type
username string

Returns

Promise<UserContact>


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event keyof EventMap

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void[]

Inherited from

EventEmitter.listeners


off

▸ off<T>(event, fn?, context?, once?): User

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any
once? boolean

Returns

User

Inherited from

EventEmitter.off


on

▸ on<T>(event, fn, context?): User

Add a listener for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

User

Inherited from

EventEmitter.on


once

▸ once<T>(event, fn, context?): User

Add a one-time listener for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

User

Inherited from

EventEmitter.once


removeAllListeners

▸ removeAllListeners(event?): User

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? keyof EventMap

Returns

User

Inherited from

EventEmitter.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): User

Remove the listeners of a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any
once? boolean

Returns

User

Inherited from

EventEmitter.removeListener


searchContact

▸ searchContact(options): Promise<SearchContactResult>

search addressbook contacts

Parameters

Name Type
options SearchContactOptions

Returns

Promise<SearchContactResult>

a promise resolved when search is done

client.user.searchContact({toSearch: "john woo", pageNumber: 1, pageSize: "20"})
.catch(function(error) {
     console.error("searchContact - ERROR", error);
})
.then(function(result) {
   result
       .on("data", function(data, index, total){
             console.log("searchContact - result - DATA", data);
         })
      .on("error", function(error) {
             console.error("searchContact - result - ERROR");
         })
      .on("complete", function() {
             console.log("searchContact - result - COMPLETE");
         });
});

useProfile

▸ useProfile(profile?): Promise<void>

tell server what profile to use. If param is null or undefined it select one from availableProfile by this logic:

  1. availableProfile[0] if availableProfile.length = 1
  2. first UC profile
  3. first AG profile

If passed profile is unavailable or any of previous step can select one it change state to ERROR_NO_PROFILE If availableProfile.length = 0 it change state to ERROR_NO_PROFILE_AVAILABLE

Parameters

Name Type
profile? Profile<any>

Returns

Promise<void>

@telenia/tvox-client-sdk / Exports / UserStatusMonitor

Class: UserStatusMonitor

Hierarchy

↳ UserStatusMonitor

Events

phone_status_changed

▪ Static phone_status_changed: string = "phone_status_changed"

Fired after phone status has changed

Param

PhoneChannelStatus user status data

client.on("phone_status_changed", function(data) {
  console.log("phone status changed to" + data.status);
});

presence_status_changed

▪ Static presence_status_changed: string = "presence_status_changed"

Fired after presence status has changed

Param

PresenceStatus user status data

client.on("presence_status_changed", function(data) {
  console.log("presence status changed to" + data.status);
});

Properties

prefixed

▪ Static prefixed: string | boolean

Inherited from

EventEmitter.prefixed

Accessors

phoneChannelStatus

• get phoneChannelStatus(): undefined | PhoneChannelStatus

Returns

undefined | PhoneChannelStatus


presenceStatus

• get presenceStatus(): undefined | PresenceStatus

Returns

undefined | PresenceStatus

Methods

addListener

▸ addListener<T>(event, fn, context?): UserStatusMonitor

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

UserStatusMonitor

Inherited from

EventEmitter.addListener


eventNames

▸ eventNames(): keyof EventMap[]

Return an array listing the events for which the emitter has registered listeners.

Returns

keyof EventMap[]

Inherited from

EventEmitter.eventNames


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event keyof EventMap

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void[]

Inherited from

EventEmitter.listeners


off

▸ off<T>(event, fn?, context?, once?): UserStatusMonitor

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any
once? boolean

Returns

UserStatusMonitor

Inherited from

EventEmitter.off


on

▸ on<T>(event, fn, context?): UserStatusMonitor

Add a listener for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

UserStatusMonitor

Inherited from

EventEmitter.on


once

▸ once<T>(event, fn, context?): UserStatusMonitor

Add a one-time listener for a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any

Returns

UserStatusMonitor

Inherited from

EventEmitter.once


removeAllListeners

▸ removeAllListeners(event?): UserStatusMonitor

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? keyof EventMap

Returns

UserStatusMonitor

Inherited from

EventEmitter.removeAllListeners


removeListener

▸ removeListener<T>(event, fn?, context?, once?): UserStatusMonitor

Remove the listeners of a given event.

Type parameters

Name Type
T extends keyof EventMap

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, keyof EventMap>]) => void
context? any
once? boolean

Returns

UserStatusMonitor

Inherited from

EventEmitter.removeListener


start

▸ start(): Promise<void>

Returns

Promise<void>


stop

▸ stop(): Promise<void>

Returns

Promise<void>

@telenia/tvox-client-sdk / Exports / UserStatusMonitor / PhoneChannelStatus

Class: PhoneChannelStatus

UserStatusMonitor.PhoneChannelStatus

Properties

activityCode

• Optional Readonly activityCode: string


activityCodeLevel2

• Optional Readonly activityCodeLevel2: string


dnCallIn

• Optional Readonly dnCallIn: string


dnCallOut

• Optional Readonly dnCallOut: string


started

• Readonly started: Date


status

• Readonly status: PhoneStatusValue

Accessors

timeInStateMillis

• get timeInStateMillis(): number

Returns

number

Methods

equals

▸ equals(status): boolean

Parameters

Name Type
status PhoneChannelStatus

Returns

boolean

@telenia/tvox-client-sdk / Exports / UserStatusMonitor / PresenceStatus

Class: PresenceStatus

UserStatusMonitor.PresenceStatus

Constructors

constructor

• new PresenceStatus(status, message?, until?)

Parameters

Name Type
status PresenceStatusValue
message? string
until? Date

Properties

message

• Optional Readonly message: string


status

• Readonly status: PresenceStatusValue


until

• Optional Readonly until: Date

Methods

equals

▸ equals(status): boolean

Parameters

Name Type
status PresenceStatus

Returns

boolean

@telenia/tvox-client-sdk / Exports / C / LineType

Enumeration: LineType

C.LineType

Enumeration Members

SIP

• SIP = "SIP"


WEBRTC

• WEBRTC = "WEBRTC"

@telenia/tvox-client-sdk / Exports / Call / AutomaticCallRecordingType

Enumeration: AutomaticCallRecordingType

Call.AutomaticCallRecordingType

Enumeration Members

AUTOMATIC_BY_SERVICE

• AUTOMATIC_BY_SERVICE = "AUTOMATIC_BY_SERVICE"


AUTOMATIC_BY_USER

• AUTOMATIC_BY_USER = "AUTOMATIC_BY_USER"


DISABLED

• DISABLED = "DISABLED"

@telenia/tvox-client-sdk / Exports / Call / CallFeature

Enumeration: CallFeature

Call.CallFeature

Enumeration Members

ACCEPT

• ACCEPT = "ACCEPT"


ANSWER

• ANSWER = "ANSWER"


ATXFER_CANCEL

• ATXFER_CANCEL = "ATXFER_CANCEL"


CANCEL

• CANCEL = "CANCEL"


CONFERENCE

• CONFERENCE = "CONFERENCE"


DIAL

• DIAL = "DIAL"


DIAL_ATXFER

• DIAL_ATXFER = "DIAL_ATXFER"


GENERATE_DTMF

• GENERATE_DTMF = "GENERATE_DTMF"


HOLD

• HOLD = "HOLD"


MONITOR_START

• MONITOR_START = "MONITOR_START"


MONITOR_STOP

• MONITOR_STOP = "MONITOR_STOP"


REJECT

• REJECT = "REJECT"


SETCALLDATA

• SETCALLDATA = "SETCALLDATA"


TRANSFER_ATTENDED

• TRANSFER_ATTENDED = "TRANSFER_ATTENDED"


TRANSFER_BLIND

• TRANSFER_BLIND = "TRANSFER_BLIND"


UNHOLD

• UNHOLD = "UNHOLD"

@telenia/tvox-client-sdk / Exports / Call / Direction

Enumeration: Direction

Call.Direction

Enumeration Members

INBOUND

• INBOUND = "inbound"


OUTBOUND

• OUTBOUND = "outbound"

@telenia/tvox-client-sdk / Exports / Call / LookupResult

Enumeration: LookupResult

Call.LookupResult

Enumeration Members

ERROR

• ERROR = "ERROR"

error on lookup


MULTIPLE

• MULTIPLE = "MULTIPLE"

lookup result is multiple


NONE

• NONE = "NONE"

no result on lookup


SUCCESS

• SUCCESS = "SUCCESS"

success - we found an unique result to identify contact on lookup

@telenia/tvox-client-sdk / Exports / CallHistory / CallHistoryDevStatus

Enumeration: CallHistoryDevStatus

CallHistory.CallHistoryDevStatus

Values: - TRASF - transfer - TRASF_CANCEL - transfer and caller hangup - TRASF_ANSWER - transfer with success - TRASF_VM - transfer to voicemail and caller rec a message - TRASF_VM_NO - transfer to voicemail and caller hangup without a message - RETURN - call return to caller

Enumeration Members

RETURN

• RETURN = "RETURN"

call return to caller


TRASF

• TRASF = "TRASF"

transfer


TRASF_ANSWER

• TRASF_ANSWER = "TRASF_ANSWER"

transfer with success


TRASF_CANCEL

• TRASF_CANCEL = "TRASF_CANCEL"

transfer and caller hangup


TRASF_VM

• TRASF_VM = "TRASF_VM"

transfer to voicemail and caller rec a message


TRASF_VM_NO

• TRASF_VM_NO = "TRASF_VM_NO"

transfer to voicemail and caller hangup without a message

@telenia/tvox-client-sdk / Exports / CallHistory / CallHistoryDialStatus

Enumeration: CallHistoryDialStatus

CallHistory.CallHistoryDialStatus

call status

Values: - CHANUNAVAIL - Channel unavailable. - CONGESTION - Congestion - NOANSWER - No answer - BUSY - Busy call - ANSWER - Answered - CANCEL - Call is cancelled by caller - ERROR - generic error - NON_PRESENTE - ALWAYS - unconditionally foward - ENABLE_FROM_PHONE - foward enable by phone - PICKUPED - pickuped call - PICKUPER - user pickup call - TVOX_NO_PERMISSION - user can not call number - DONTCALL - DND - REJECTED - call rejected from called user

Enumeration Members

ALWAYS

• ALWAYS = "ALWAYS"

unconditionally foward


ANSWER

• ANSWER = "ANSWER"

Answered


BUSY

• BUSY = "BUSY"

Busy call


CANCEL

• CANCEL = "CANCEL"

Call is cancelled by caller


CHANUNAVAIL

• CHANUNAVAIL = "CHANUNAVAIL"

Channel unavailable.


CONGESTION

• CONGESTION = "CONGESTION"

Congestion


DONTCALL

• DONTCALL = "DONTCALL"

DND


ENABLE_FROM_PHONE

• ENABLE_FROM_PHONE = "ENABLE_FROM_PHONE"

foward enable by phone


ERROR

• ERROR = "ERROR"

generic error


NOANSWER

• NOANSWER = "NOANSWER"

No answer


NON_PRESENTE

• NON_PRESENTE = "NON_PRESENTE"


PICKUPED

• PICKUPED = "PICKUPED"

pickuped call


PICKUPER

• PICKUPER = "PICKUPER"

user pickup call


REJECTED

• REJECTED = "REJECTED"

call rejected from called user


TVOX_NO_PERMISSION

• TVOX_NO_PERMISSION = "TVOX_NO_PERMISSION"

user can not call number

@telenia/tvox-client-sdk / Exports / CallHistory / CallHistoryType

Enumeration: CallHistoryType

CallHistory.CallHistoryType

Enumeration Members

INBOUND

• INBOUND = "INBOUND"


OUTBOUND

• OUTBOUND = "OUTBOUND"

@telenia/tvox-client-sdk / Exports / CallHistory / TransportType

Enumeration: TransportType

CallHistory.TransportType

Enumeration Members

FAX

• FAX = "FAX"


PHONE

• PHONE = "PHONE"


SMS

• SMS = "SMS"


VOICEMAIL

• VOICEMAIL = "VOICEMAIL"

@telenia/tvox-client-sdk / Exports / CallWebrtc / ConnectionManager / State

Enumeration: State

CallWebrtc.ConnectionManager.State

Enumeration Members

Closed

• Closed = "closed"


Closing

• Closing = "closing"


Connected

• Connected = "connected"


Connecting

• Connecting = "connecting"


Failed

• Failed = "failed"


Failing

• Failing = "failing"


Initializing

• Initializing = "initializing"


New

• New = "new"

@telenia/tvox-client-sdk / Exports / Client / ClientState

Enumeration: ClientState

Client.ClientState

Enumeration Members

LOGIN_FAILED

• LOGIN_FAILED = "LOGIN_FAILED"

login is requested and is failed


LOGIN_IN_PROGRESS

• LOGIN_IN_PROGRESS = "LOGIN_IN_PROGRESS"

login is in progress


LOGIN_REQUIRED

• LOGIN_REQUIRED = "LOGIN_REQUIRED"

login is required


READY

• READY = "READY"

ready to use

@telenia/tvox-client-sdk / Exports / Contact / AddressBookContactAddressType

Enumeration: AddressBookContactAddressType

Contact.AddressBookContactAddressType

Enumeration Members

MAIN

• MAIN = "MAIN"


OTHER

• OTHER = "OTHER"

@telenia/tvox-client-sdk / Exports / Contact / AddressBookContactMailType

Enumeration: AddressBookContactMailType

Contact.AddressBookContactMailType

Enumeration Members

INTERNET_HOME

• INTERNET_HOME = "INTERNET_HOME"


INTERNET_WORK

• INTERNET_WORK = "INTERNET_WORK"

@telenia/tvox-client-sdk / Exports / Contact / AddressBookContactNumberType

Enumeration: AddressBookContactNumberType

Contact.AddressBookContactNumberType

Enumeration Members

CELL

• CELL = "CELL"


CELL_HOME

• CELL_HOME = "CELL_HOME"


CELL_WORK

• CELL_WORK = "CELL_WORK"


FAX

• FAX = "FAX"


FAX_HOME

• FAX_HOME = "FAX_HOME"


FAX_WORK

• FAX_WORK = "FAX_WORK"


HOME

• HOME = "HOME"


MAIN

• MAIN = "MAIN"


OTHER

• OTHER = "OTHER"


WORK

• WORK = "WORK"

@telenia/tvox-client-sdk / Exports / Contact / AddressBookContactWebType

Enumeration: AddressBookContactWebType

Contact.AddressBookContactWebType

Enumeration Members

HOME

• HOME = "HOME"


WORK

• WORK = "WORK"

@telenia/tvox-client-sdk / Exports / Contact / ExternalSubType

Enumeration: ExternalSubType

Contact.ExternalSubType

Enumeration Members

ORGANIZATION

• ORGANIZATION = "ORGANIZATION"

@telenia/tvox-client-sdk / Exports / Contact / InternalSubType

Enumeration: InternalSubType

Contact.InternalSubType

Enumeration Members

SERVICE

• SERVICE = "SERVICE"


SHORT_NUMBER

• SHORT_NUMBER = "SHORT_NUMBER"


USER

• USER = "USER"

@telenia/tvox-client-sdk / Exports / Contact / Type

Enumeration: Type

Contact.Type

Enumeration Members

EXTERNAL

• EXTERNAL = "EXTERNAL"


INTERNAL

• INTERNAL = "INTERNAL"


PERSONAL

• PERSONAL = "PERSONAL"

@telenia/tvox-client-sdk / Exports / Log / LogLevel

Enumeration: LogLevel

Log.LogLevel

Enumeration Members

Debug

• Debug = 2


Error

• Error = 5


Fatal

• Fatal = 6


Info

• Info = 3


None

• None = 7


Verbose

• Verbose = 1


Warn

• Warn = 4

@telenia/tvox-client-sdk / Exports / Phone / Status

Enumeration: Status

Phone.Status

Enumeration Members

ERROR_NO_DEVICE

• ERROR_NO_DEVICE = "ERROR_NO_DEVICE"


ERROR_NO_DEVICE_AVAILABLE

• ERROR_NO_DEVICE_AVAILABLE = "ERROR_NO_DEVICE_AVAILABLE"


READY

• READY = "READY"

@telenia/tvox-client-sdk / Exports / Phone / TVoxClientPlatform

Enumeration: TVoxClientPlatform

Phone.TVoxClientPlatform

Enumeration Members

APPLICATION

• APPLICATION = "APPLICATION"


BROWSER

• BROWSER = "BROWSER"

@telenia/tvox-client-sdk / Exports / Phone / TVoxClientState

Enumeration: TVoxClientState

Phone.TVoxClientState

Enumeration Members

ACTIVATING

• ACTIVATING = "ACTIVATING"


ACTIVE

• ACTIVE = "ACTIVE"


DISCONNETING

• DISCONNETING = "DISCONNETING"


INACTIVE

• INACTIVE = "INACTIVE"


UNKNOWN

• UNKNOWN = "UNKNOWN"

@telenia/tvox-client-sdk / Exports / Profile / CallRecording

Enumeration: CallRecording

Profile.CallRecording

how a profile can record call.

Enumeration Members

AUTOMATIC

• AUTOMATIC = "AUTOMATIC"

registration is automatic enabled for every call


AUTOMATIC_WITH_NOTE

• AUTOMATIC_WITH_NOTE = "AUTOMATIC_WITH_NOTE"

registration is automatic enabled for every call with ability to adding note


DISABLED

• DISABLED = "DISABLED"

no registration enabled


ENABLED_ON_PHONE

• ENABLED_ON_PHONE = "ENABLED_ON_PHONE"

registration is available with service digits on telephone


ON_DEMAND

• ON_DEMAND = "ON_DEMAND"

registration is available on demand


ON_DEMAND_WITH_NOTE

• ON_DEMAND_WITH_NOTE = "ON_DEMAND_WITH_NOTE"

registration is available on demand with ability to adding note

@telenia/tvox-client-sdk / Exports / ProfileType

Enumeration: ProfileType

Enumeration Members

AG

• AG = "AG"

contact center agent profile


AG_EXTERNAL

• AG_EXTERNAL = "AG_EXTERNAL"

external agent profile


AG_REMOTE

• AG_REMOTE = "AG_REMOTE"

remote agent profile


TQM

• TQM = "TQM"

telenia queue manager profile


UC

• UC = "UC"

unify communication common profile

@telenia/tvox-client-sdk / Exports / Transport / Status

Enumeration: Status

Transport.Status

Enumeration Members

CONNECTED

• CONNECTED = "CONNECTED"


DISCONNECTED

• DISCONNECTED = "DISCONNECTED"

@telenia/tvox-client-sdk / Exports / User / State

Enumeration: State

User.State

Enumeration Members

ERROR_NO_PROFILE

• ERROR_NO_PROFILE = "ERROR_NO_PROFILE"


ERROR_NO_PROFILE_AVAILABLE

• ERROR_NO_PROFILE_AVAILABLE = "ERROR_NO_PROFILE_AVAILABLE"


LOGGED

• LOGGED = "LOGGED"


NOTLOGGED

• NOTLOGGED = "NOTLOGGED"

@telenia/tvox-client-sdk / Exports / UserStatusMonitor / PhoneStatusValue

Enumeration: PhoneStatusValue

UserStatusMonitor.PhoneStatusValue

Enumeration Members

BOOKED

• BOOKED = "BOOKED"

Booked for service call


BUSY

• BUSY = "BUSY"

Busy in call


NOTLOGGED

• NOTLOGGED = "NOTLOGGED"

Not logged


NR

• NR = "NR"

Not ready to receive service call


NR_BUSY

• NR_BUSY = "NR_BUSY"

Not ready to receive service call due to busy in other call


READY

• READY = "READY"

Ready to receive service call


WNR

• WNR = "WNR"

Not ready for some time after service call end

@telenia/tvox-client-sdk / Exports / UserStatusMonitor / PresenceStatusValue

Enumeration: PresenceStatusValue

UserStatusMonitor.PresenceStatusValue

Enumeration Members

AVAILABLE

• AVAILABLE = "AVAILABLE"

Available (the default).


AWAY

• AWAY = "AWAY"

Away.


CHAT

• CHAT = "CHAT"

Free to chat.


DND

• DND = "DND"

Please do not disturb


UNAVAILABLE

• UNAVAILABLE = "UNAVAILABLE"

unavailable


XA

• XA = "XA"

Away for an extended period of time.

@telenia/tvox-client-sdk / Exports / Call / DetailEventMap

Interface: DetailEventMap

Call.DetailEventMap

Properties

update_detail

• update_detail: () => void

Type declaration

▸ (): void

Returns

void

@telenia/tvox-client-sdk / Exports / Call / LookupDisplay

Interface: LookupDisplay

Call.LookupDisplay

Properties

company

• Optional company: string


name

• Optional name: string


number

• Optional number: string

@telenia/tvox-client-sdk / Exports / Call / LookupEventMap

Interface: LookupEventMap

Call.LookupEventMap

Properties

end

• end: () => void

Type declaration

▸ (): void

Returns

void


update_contact

• update_contact: (contact: null | Contact, lookup: Lookup) => void

Type declaration

▸ (contact, lookup): void

Parameters
Name Type
contact null \
lookup Lookup
Returns

void


update_display

• update_display: (display: LookupDisplay, lookup: Lookup) => void

Type declaration

▸ (display, lookup): void

Parameters
Name Type
display LookupDisplay
lookup Lookup
Returns

void

@telenia/tvox-client-sdk / Exports / Call / RecordingEventMap

Interface: RecordingEventMap

Call.RecordingEventMap

Properties

automatic_type_change

• automatic_type_change: (value: AutomaticCallRecordingType) => void

Type declaration

▸ (value): void

Parameters
Name Type
value AutomaticCallRecordingType
Returns

void


on_demand_error

• on_demand_error: () => void

Type declaration

▸ (): void

Returns

void


on_demand_start

• on_demand_start: () => void

Type declaration

▸ (): void

Returns

void


on_demand_stop

• on_demand_stop: () => void

Type declaration

▸ (): void

Returns

void

@telenia/tvox-client-sdk / Exports / CallHistory / CallHistoryItem

Interface: CallHistoryItem

CallHistory.CallHistoryItem

Properties

devStatuses

• Optional devStatuses: CallHistoryDevStatus[]


dialStatuses

• Optional dialStatuses: CallHistoryDialStatus[]


transportType

• Optional transportType: TransportType


type

• Optional type: CallHistoryType

@telenia/tvox-client-sdk / Exports / CallHistory / CallHistoryRequest

Interface: CallHistoryRequest

CallHistory.CallHistoryRequest

Properties

pageNumber

• pageNumber: number


pageSize

• pageSize: number

@telenia/tvox-client-sdk / Exports / CallSip / EventMap

Interface: EventMap

CallSip.EventMap

Properties

accepted

• accepted: () => void

Type declaration

▸ (): void

Returns

void


change_features

• change_features: (features: CallFeature[], previousFeatures: CallFeature[]) => void

Type declaration

▸ (features, previousFeatures): void

Parameters
Name Type
features CallFeature[]
previousFeatures CallFeature[]
Returns

void


connecting

• connecting: () => void

Type declaration

▸ (): void

Returns

void


ended

• ended: () => void

Type declaration

▸ (): void

Returns

void


ended_request

• ended_request: () => void

Type declaration

▸ (): void

Returns

void


hold

• hold: () => void

Type declaration

▸ (): void

Returns

void


newDTMF

• newDTMF: (tone: string | number) => void

Type declaration

▸ (tone): void

Parameters
Name Type
tone string \
Returns

void


new_call_for_transfer

• new_call_for_transfer: (call: CallSipForTransfer) => void

Type declaration

▸ (call): void

Parameters
Name Type
call CallSipForTransfer
Returns

void


progress

• progress: () => void

Type declaration

▸ (): void

Returns

void


unhold

• unhold: () => void

Type declaration

▸ (): void

Returns

void

@telenia/tvox-client-sdk / Exports / CallSipForTransfer / EventMap

Interface: EventMap

CallSipForTransfer.EventMap

Properties

ended

• ended: (call: CallSipForTransfer) => void

Type declaration

▸ (call): void

Parameters
Name Type
call CallSipForTransfer
Returns

void

@telenia/tvox-client-sdk / Exports / CallWebrtc / EventMap

Interface: EventMap

CallWebrtc.EventMap

Properties

accepted

• accepted: () => void

Type declaration

▸ (): void

Returns

void


change_features

• change_features: (features: CallFeature[], previousFeatures: CallFeature[]) => void

Type declaration

▸ (features, previousFeatures): void

Parameters
Name Type
features CallFeature[]
previousFeatures CallFeature[]
Returns

void


connecting

• connecting: () => void

Type declaration

▸ (): void

Returns

void


ended

• ended: () => void

Type declaration

▸ (): void

Returns

void


ended_request

• ended_request: () => void

Type declaration

▸ (): void

Returns

void


hold

• hold: () => void

Type declaration

▸ (): void

Returns

void


newDTMF

• newDTMF: (tone: string | number) => void

Type declaration

▸ (tone): void

Parameters
Name Type
tone string \
Returns

void


progress

• progress: () => void

Type declaration

▸ (): void

Returns

void


unhold

• unhold: () => void

Type declaration

▸ (): void

Returns

void

@telenia/tvox-client-sdk / Exports / CallWebrtc / MuteOptions

Interface: MuteOptions

CallWebrtc.MuteOptions

Properties

audio

• Optional audio: boolean


video

• Optional video: boolean

@telenia/tvox-client-sdk / Exports / Client / BasicCredential

Interface: BasicCredential

Client.BasicCredential

Standard authentication (also called token authentication)

Properties

password

• password: string


username

• username: string

@telenia/tvox-client-sdk / Exports / Client / BerearCredential

Interface: BerearCredential

Client.BerearCredential

Bearer authentication (also called token authentication) involves security tokens called bearer tokens that must be valid for TVox

Properties

token

• token: string

@telenia/tvox-client-sdk / Exports / Client / ClientParameter

Interface: ClientParameter

Client.ClientParameter

Properties

log

• Optional log: LogConfig

log configuration


phoneManagedByTVoxClient

• phoneManagedByTVoxClient: boolean

Set phone is managed by TVox Client

Default

false


retryOptions

• Optional retryOptions: RetryOptions

Reconnecting configuration


url

• url: string

Url of WebApi Server

Required


webrtc

• Optional webrtc: ClientWebrtcParameter

Webrtc parameter

@telenia/tvox-client-sdk / Exports / Client / ClientWebrtcParameter

Interface: ClientWebrtcParameter

Client.ClientWebrtcParameter

Properties

useDeviceHistoryStore

• Optional useDeviceHistoryStore: Object

custom useDevice history store

Type declaration

Name Type
get () => Promise<UseDeviceHistory>
set (history: UseDeviceHistory) => Promise<UseDeviceHistory>

@telenia/tvox-client-sdk / Exports / Client / EventMap

Interface: EventMap

Client.EventMap

Properties

logged_in

• logged_in: (user: User, loginData: LoginData) => void

Type declaration

▸ (user, loginData): void

Parameters
Name Type
user User
loginData LoginData
Returns

void


logged_out

• logged_out: (user: User) => void

Type declaration

▸ (user): void

Parameters
Name Type
user User
Returns

void


login_failed

• login_failed: (error: LoginError, user: User) => void

Type declaration

▸ (error, user): void

Parameters
Name Type
error LoginError
user User
Returns

void


login_in_progress

• login_in_progress: (user: User, credential: Credential) => void

Type declaration

▸ (user, credential): void

Parameters
Name Type
user User
credential Credential
Returns

void


ready

• ready: () => void

Type declaration

▸ (): void

Returns

void

@telenia/tvox-client-sdk / Exports / Client / ExternalSessionIdCredential

Interface: ExternalSessionIdCredential

Client.ExternalSessionIdCredential

Authentication that involve sessionId or custom data validated outside of TVox

Properties

externalSessionId

• externalSessionId: string

@telenia/tvox-client-sdk / Exports / Client / JWTCredential

Interface: JWTCredential

Client.JWTCredential

Authentication through jwt.

JWT (json web token) represents a standard for exchanging claims securely between two parties.

To use this credential, we need to generate a public and private key pair. - Private key is used to sign JWT token and must be placed in a safe environment. - Public key is used to verify JWT token and must be uploaded to TVox through OCC, from the section "External IDMs"

Note: When creating a new external IDM on TVox, "code" and "alias" values are required, and they must be used in the JWT payload as explained below.

JWT string is composed of three parts coded in Base64-URL strings: the header, the payload, and the signature separated by dots (.) ( see https://jwt.io )

Properties

jwt

• jwt: string

@telenia/tvox-client-sdk / Exports / Client / LoginError

Interface: LoginError

Client.LoginError

Structure for error received by login method or login_failed event

Properties

code

• code: number


exceptionName

• exceptionName: string


message

• message: string

@telenia/tvox-client-sdk / Exports / Client / RetryOptions

Interface: RetryOptions

Client.RetryOptions

Properties

factor

• Optional factor: number

The exponential factor to use.

Default

1.2


forever

• Optional forever: boolean

Never stop retry

Default

true


maxTimeout

• Optional maxTimeout: number

The maximum number of milliseconds between two retries.

Default

30000


minTimeout

• Optional minTimeout: number

The number of milliseconds before starting the first retry.

Default

5000


randomize

• Optional randomize: boolean

Randomizes the timeouts by multiplying a factor between 1-2.

Default

true


retries

• Optional retries: number

The maximum amount of times to retry the operation. If forever is true, retry will repeatedly use the timeouts array. Once all of its timeouts have been used up, it restarts with the first timeout, then uses the second and so on. The formula used to calculate the individual timeouts is: Math.min(random * minTimeout * Math.pow(factor, attempt), maxTimeout)

Default

10

@telenia/tvox-client-sdk / Exports / Contact / AddressBookCategory

Interface: AddressBookCategory

Contact.AddressBookCategory

Properties

value

• Optional value: string

@telenia/tvox-client-sdk / Exports / Contact / AddressBookContact

Interface: AddressBookContact

Contact.AddressBookContact

Hierarchy

↳ UserContact

↳ ServiceContact

↳ ShortNumberContact

↳ ExternalContact

↳ ExternalOrganizationContact

↳ PersonalContact

Properties

addresses

• Optional addresses: AddressBookContactAddress[]


categories

• Optional categories: AddressBookCategory[]


department

• Optional department: string


display

• Optional display: string


emails

• Optional emails: AddressBookContactMail[]


note

• Optional note: string


numbers

• Optional numbers: AddressBookContactNumber[]


site

• Optional site: string


• Optional webLinks: AddressBookContactWeb[]

@telenia/tvox-client-sdk / Exports / Contact / AddressBookContactAddress

Interface: AddressBookContactAddress

Contact.AddressBookContactAddress

Properties

cap

• Optional cap: string


city

• Optional city: string


country

• Optional country: string


district

• Optional district: string


street

• Optional street: string


type

• Optional type: AddressBookContactAddressType

@telenia/tvox-client-sdk / Exports / Contact / AddressBookContactMail

Interface: AddressBookContactMail

Contact.AddressBookContactMail

Properties

type

• Optional type: AddressBookContactMailType


value

• Optional value: string

@telenia/tvox-client-sdk / Exports / Contact / AddressBookContactNumber

Interface: AddressBookContactNumber

Contact.AddressBookContactNumber

Properties

type

• Optional type: AddressBookContactNumberType


value

• Optional value: string

@telenia/tvox-client-sdk / Exports / Contact / AddressBookContactWeb

Interface: AddressBookContactWeb

Contact.AddressBookContactWeb

Properties

type

• Optional type: AddressBookContactWebType


value

• Optional value: string

@telenia/tvox-client-sdk / Exports / Contact / ExternalContact

Interface: ExternalContact

Contact.ExternalContact

Hierarchy

↳ ExternalContact

Properties

addresses

• Optional addresses: AddressBookContactAddress[]

Inherited from

AddressBookContact.addresses


categories

• Optional categories: AddressBookCategory[]

Inherited from

AddressBookContact.categories


company

• Optional company: string


customFields

• Optional customFields: Object

Index signature

▪ [index: string]: string


customerCode

• Optional customerCode: string

customer's code


department

• Optional department: string

Inherited from

AddressBookContact.department


display

• Optional display: string

Inherited from

AddressBookContact.display


emails

• Optional emails: AddressBookContactMail[]

Inherited from

AddressBookContact.emails


memberof

• Optional memberof: string


name

• Optional name: string


note

• Optional note: string

Inherited from

AddressBookContact.note


numbers

• Optional numbers: AddressBookContactNumber[]

Inherited from

AddressBookContact.numbers


otherName

• Optional otherName: string


role

• Optional role: string


site

• Optional site: string

Inherited from

AddressBookContact.site


surname

• Optional surname: string


vip

• Optional vip: boolean


• Optional webLinks: AddressBookContactWeb[]

Inherited from

AddressBookContact.webLinks

@telenia/tvox-client-sdk / Exports / Contact / ExternalOrganizationContact

Interface: ExternalOrganizationContact

Contact.ExternalOrganizationContact

Hierarchy

↳ ExternalOrganizationContact

Properties

addresses

• Optional addresses: AddressBookContactAddress[]

Inherited from

AddressBookContact.addresses


categories

• Optional categories: AddressBookCategory[]

Inherited from

AddressBookContact.categories


company

• Optional company: string


customFields

• Optional customFields: Object

Index signature

▪ [index: string]: string


department

• Optional department: string

Inherited from

AddressBookContact.department


display

• Optional display: string

Inherited from

AddressBookContact.display


emails

• Optional emails: AddressBookContactMail[]

Inherited from

AddressBookContact.emails


name

• Optional name: string


note

• Optional note: string

Inherited from

AddressBookContact.note


numbers

• Optional numbers: AddressBookContactNumber[]

Inherited from

AddressBookContact.numbers


otherName

• Optional otherName: string


role

• Optional role: string


site

• Optional site: string

Inherited from

AddressBookContact.site


surname

• Optional surname: string


vip

• Optional vip: boolean


• Optional webLinks: AddressBookContactWeb[]

Inherited from

AddressBookContact.webLinks

@telenia/tvox-client-sdk / Exports / Contact / GetContactOptions

Interface: GetContactOptions

Contact.GetContactOptions

@telenia/tvox-client-sdk / Exports / Contact / PersonalContact

Interface: PersonalContact

Contact.PersonalContact

Hierarchy

↳ PersonalContact

Properties

addresses

• Optional addresses: AddressBookContactAddress[]

Inherited from

AddressBookContact.addresses


categories

• Optional categories: AddressBookCategory[]

Inherited from

AddressBookContact.categories


department

• Optional department: string

Inherited from

AddressBookContact.department


display

• Optional display: string

Inherited from

AddressBookContact.display


emails

• Optional emails: AddressBookContactMail[]

Inherited from

AddressBookContact.emails


name

• Optional name: string


note

• Optional note: string

Inherited from

AddressBookContact.note


numbers

• Optional numbers: AddressBookContactNumber[]

Inherited from

AddressBookContact.numbers


otherName

• Optional otherName: string


site

• Optional site: string

Inherited from

AddressBookContact.site


surname

• Optional surname: string


• Optional webLinks: AddressBookContactWeb[]

Inherited from

AddressBookContact.webLinks

@telenia/tvox-client-sdk / Exports / Contact / SearchContactOptions

Interface: SearchContactOptions

Contact.SearchContactOptions

Properties

pageNumber

• pageNumber: number


pageSize

• pageSize: number


searchMethods

• searchMethods: "startWith" | "contains"

set with method to use for search


toSearch

• toSearch: string


type

• Optional type: Type

@telenia/tvox-client-sdk / Exports / Contact / ServiceContact

Interface: ServiceContact

Contact.ServiceContact

Hierarchy

↳ ServiceContact

Properties

addresses

• Optional addresses: AddressBookContactAddress[]

Inherited from

AddressBookContact.addresses


categories

• Optional categories: AddressBookCategory[]

Inherited from

AddressBookContact.categories


code

• Optional code: string


department

• Optional department: string

Inherited from

AddressBookContact.department


display

• Optional display: string

Inherited from

AddressBookContact.display


emails

• Optional emails: AddressBookContactMail[]

Inherited from

AddressBookContact.emails


note

• Optional note: string

Inherited from

AddressBookContact.note


numbers

• Optional numbers: AddressBookContactNumber[]

Inherited from

AddressBookContact.numbers


site

• Optional site: string

Inherited from

AddressBookContact.site


• Optional webLinks: AddressBookContactWeb[]

Inherited from

AddressBookContact.webLinks

@telenia/tvox-client-sdk / Exports / Contact / ShortNumberContact

Interface: ShortNumberContact

Contact.ShortNumberContact

Hierarchy

↳ ShortNumberContact

Properties

addresses

• Optional addresses: AddressBookContactAddress[]

Inherited from

AddressBookContact.addresses


categories

• Optional categories: AddressBookCategory[]

Inherited from

AddressBookContact.categories


department

• Optional department: string

Inherited from

AddressBookContact.department


display

• Optional display: string

Inherited from

AddressBookContact.display


emails

• Optional emails: AddressBookContactMail[]

Inherited from

AddressBookContact.emails


note

• Optional note: string

Inherited from

AddressBookContact.note


numbers

• Optional numbers: AddressBookContactNumber[]

Inherited from

AddressBookContact.numbers


site

• Optional site: string

Inherited from

AddressBookContact.site


• Optional webLinks: AddressBookContactWeb[]

Inherited from

AddressBookContact.webLinks

@telenia/tvox-client-sdk / Exports / Contact / UserContact

Interface: UserContact

Contact.UserContact

Hierarchy

↳ UserContact

Properties

addresses

• Optional addresses: AddressBookContactAddress[]

Inherited from

AddressBookContact.addresses


categories

• Optional categories: AddressBookCategory[]

Inherited from

AddressBookContact.categories


customFields

• Optional customFields: Object

Index signature

▪ [index: string]: string


department

• Optional department: string

Inherited from

AddressBookContact.department


display

• Optional display: string

Inherited from

AddressBookContact.display


emails

• Optional emails: AddressBookContactMail[]

Inherited from

AddressBookContact.emails


name

• Optional name: string


note

• Optional note: string

Inherited from

AddressBookContact.note


numbers

• Optional numbers: AddressBookContactNumber[]

Inherited from

AddressBookContact.numbers


site

• Optional site: string

Inherited from

AddressBookContact.site


surname

• Optional surname: string


username

• Optional username: string


• Optional webLinks: AddressBookContactWeb[]

Inherited from

AddressBookContact.webLinks

@telenia/tvox-client-sdk / Exports / Device

Interface: Device

Implemented by

@telenia/tvox-client-sdk / Exports / Device / DialParam

Interface: DialParam

Device.DialParam

Properties

accessCode

• Optional accessCode: string


contact

• Optional contact: Contact


note1

• Optional note1: string


note2

• Optional note2: string


privateCall

• Optional privateCall: boolean


serviceCode

• Optional serviceCode: string

@telenia/tvox-client-sdk / Exports / DeviceWebrtcMedia / AudioInput

Interface: AudioInput

DeviceWebrtcMedia.AudioInput

Hierarchy

↳ AudioInput

Properties

deviceId

• Readonly deviceId: string

MDN Reference

Inherited from

DeviceInfo.deviceId


groupId

• Readonly groupId: string

MDN Reference

Inherited from

DeviceInfo.groupId


kind

• Readonly kind: "audioinput" | "audiooutput" | "videoinput"

MDN Reference

Inherited from

DeviceInfo.kind


label

• Readonly label: string

MDN Reference

Inherited from

DeviceInfo.label

@telenia/tvox-client-sdk / Exports / DeviceWebrtcMedia / AudioOutput

Interface: AudioOutput

DeviceWebrtcMedia.AudioOutput

Hierarchy

↳ AudioOutput

Properties

deviceId

• Readonly deviceId: string

MDN Reference

Inherited from

DeviceInfo.deviceId


groupId

• Readonly groupId: string

MDN Reference

Inherited from

DeviceInfo.groupId


kind

• Readonly kind: "audioinput" | "audiooutput" | "videoinput"

MDN Reference

Inherited from

DeviceInfo.kind


label

• Readonly label: string

MDN Reference

Inherited from

DeviceInfo.label

@telenia/tvox-client-sdk / Exports / DeviceWebrtcMedia / DeviceInfo

Interface: DeviceInfo

DeviceWebrtcMedia.DeviceInfo

Hierarchy

↳ AudioInput

↳ VideoInput

↳ AudioOutput

Properties

deviceId

• Readonly deviceId: string

MDN Reference


groupId

• Readonly groupId: string

MDN Reference


kind

• Readonly kind: "audioinput" | "audiooutput" | "videoinput"

MDN Reference


label

• Readonly label: string

MDN Reference

@telenia/tvox-client-sdk / Exports / DeviceWebrtcMedia / EventMap

Interface: EventMap

DeviceWebrtcMedia.EventMap

Properties

device_change

• device_change: (status: MediaDeviceStatus, devices: MediaDevice) => void

Type declaration

▸ (status, devices): void

Parameters
Name Type
status MediaDeviceStatus
devices MediaDevice
Returns

void


unused_device_added

• unused_device_added: (device: { audioInput?: AudioInput[] ; audioOutput?: AudioOutput[] ; videoInput?: VideoInput[] }) => void

Type declaration

▸ (device): void

Parameters
Name Type
device Object
device.audioInput? AudioInput[]
device.audioOutput? AudioOutput[]
device.videoInput? VideoInput[]
Returns

void


use_device_when_device_change

• use_device_when_device_change: (deviceToUpdate: { audioInput?: UseDeviceStored<AudioInput> ; audioOutput?: UseDeviceStored<AudioOutput> ; audioSignalOutput?: UseDeviceStored<AudioOutput> ; videoInput?: UseDeviceStored<VideoInput> }, ejectedDevice: boolean) => void

Type declaration

▸ (deviceToUpdate, ejectedDevice): void

Parameters
Name Type
deviceToUpdate Object
deviceToUpdate.audioInput? UseDeviceStored<AudioInput>
deviceToUpdate.audioOutput? UseDeviceStored<AudioOutput>
deviceToUpdate.audioSignalOutput? UseDeviceStored<AudioOutput>
deviceToUpdate.videoInput? UseDeviceStored<VideoInput>
ejectedDevice boolean
Returns

void

@telenia/tvox-client-sdk / Exports / DeviceWebrtcMedia / MediaDevice

Interface: MediaDevice

DeviceWebrtcMedia.MediaDevice

Properties

audioInput

• Readonly audioInput: AudioInput[]


audioOutput

• Readonly audioOutput: AudioOutput[]


videoInput

• Readonly videoInput: VideoInput[]

@telenia/tvox-client-sdk / Exports / DeviceWebrtcMedia / MediaDeviceStatus

Interface: MediaDeviceStatus

DeviceWebrtcMedia.MediaDeviceStatus

Properties

added

• Readonly added: MediaDevice


deleted

• Readonly deleted: MediaDevice


none

• Readonly none: MediaDevice

@telenia/tvox-client-sdk / Exports / DeviceWebrtcMedia / UseDeviceHistory

Interface: UseDeviceHistory

DeviceWebrtcMedia.UseDeviceHistory

Represent history of usage devices by type Devices is order by lastUsedAt

Properties

audioInput

• Optional audioInput: UseDeviceStored<AudioInput>[]


audioOutput

• Optional audioOutput: UseDeviceStored<AudioOutput>[]


audioSignalOutput

• Optional audioSignalOutput: UseDeviceStored<AudioOutput>[]


videoInput

• Optional videoInput: UseDeviceStored<VideoInput>[]

@telenia/tvox-client-sdk / Exports / DeviceWebrtcMedia / UseDeviceStored

Interface: UseDeviceStored

DeviceWebrtcMedia.UseDeviceStored

Used to attach usage info of device

Type parameters

Name Type
Info extends DeviceInfo

Properties

device

• Optional Readonly device: null | false | Info

device is device used object: exact device null: system default device boolean: false disabled - true system default device


lastUsedAt

• Readonly lastUsedAt: Date

last instant of device is set as used


setByUser

• Readonly setByUser: boolean

device is explicitly used by user request

Methods

isDeviceDefault

▸ isDeviceDefault(): boolean

return true if device is null or undefined

Returns

boolean


isDeviceDisabled

▸ isDeviceDisabled(): boolean

return true if device is false

Returns

boolean

@telenia/tvox-client-sdk / Exports / DeviceWebrtcMedia / VideoInput

Interface: VideoInput

DeviceWebrtcMedia.VideoInput

Hierarchy

↳ VideoInput

Properties

deviceId

• Readonly deviceId: string

MDN Reference

Inherited from

DeviceInfo.deviceId


groupId

• Readonly groupId: string

MDN Reference

Inherited from

DeviceInfo.groupId


kind

• Readonly kind: "audioinput" | "audiooutput" | "videoinput"

MDN Reference

Inherited from

DeviceInfo.kind


label

• Readonly label: string

MDN Reference

Inherited from

DeviceInfo.label

@telenia/tvox-client-sdk / Exports / Feedback / CompressOptions

Interface: CompressOptions

Feedback.CompressOptions

Properties

callbacks

• Optional callbacks: Object

Type declaration

Name Type
onProgress? (percent: number) => void

level

• level: number

compression level between 1 (best speed) and 9 (best compression), 0 for no compression

@telenia/tvox-client-sdk / Exports / Feedback / GenerateOptions

Interface: GenerateOptions

Feedback.GenerateOptions

Properties

compress

• Optional compress: CompressOptions


upload

• Optional upload: Options

@telenia/tvox-client-sdk / Exports / FileUploader

Interface: FileUploader

Manage single file upload/delete action

Accessors

options

• get options(): Options

Returns

Options

Methods

delete

▸ delete(): Promise<void>

Returns

Promise<void>


upload

▸ upload(): Promise<void>

Returns

Promise<void>

@telenia/tvox-client-sdk / Exports / FileUploader / ChunkData

Interface: ChunkData

FileUploader.ChunkData

Properties

endByte

• endByte: number

the last byte of the current chunk


partIndex

• partIndex: number

the 0-based index of the associated partition


startByte

• startByte: number

the byte offset of the current chunk


totalParts

• totalParts: number

the total number of partitions associated with the File or Blob

@telenia/tvox-client-sdk / Exports / FileUploader / Options

Interface: Options

FileUploader.Options

Properties

callbacks

• Optional callbacks: Object

Type declaration

Name Type
onProgress? (uploadedBytes: number, totalBytes: number) => void
onUploadChunk? (chunkData: ChunkData) => void \
onUploadChunkSuccess? (chunkData: ChunkData, response: XMLHttpRequest) => void

chunking

• Optional chunking: Object

Type declaration

Name Type Description
partSize? number The maximum size of each chunk, in bytes Default 2000000

@telenia/tvox-client-sdk / Exports / Log / LogConfig

Interface: LogConfig

Log.LogConfig

Properties

enabled

• Optional enabled: boolean

enable logging

Default

true


logLevel

• Optional logLevel: LogLevel

minimun log level (included)

Default

Level.debug


objectToJson

• Optional objectToJson: boolean

log plain object as json object

Default

false


storage

• Optional storage: LogStorageConfig

storage log configuration if not set use IndexedDBLogStore (with 1hour retention)

Default

undefined


timestamp

• Optional timestamp: boolean

log timestamp

Default

true

@telenia/tvox-client-sdk / Exports / Log / LogStorageConfig

Interface: LogStorageConfig

Log.LogStorageConfig

Properties

dump

• Optional dump: () => Promise<Iterable<LogEntry>>

Type declaration

▸ (): Promise<Iterable<LogEntry>>

request stored log entry

Returns

Promise<Iterable<LogEntry>>


store

• Optional store: (entry: LogEntry) => Promise<void>

Type declaration

▸ (entry): Promise<void>

store log entry

Parameters
Name Type
entry LogEntry
Returns

Promise<void>

@telenia/tvox-client-sdk / Exports / LogEntry

Interface: LogEntry

Properties

level

• level: LogLevel


message

• message: string


time

• time: Date

@telenia/tvox-client-sdk / Exports / Phone / EventMap

Interface: EventMap

Phone.EventMap

Properties

device_change

• device_change: (newDevice: null | DeviceSip | DeviceWebrtc, oldDevice: null | DeviceSip | DeviceWebrtc) => void

Type declaration

▸ (newDevice, oldDevice): void

Parameters
Name Type
newDevice null \
oldDevice null \
Returns

void


newcall

• newcall: (call: CallSip | CallWebrtc, detail: { previousConnected: boolean }) => void

Type declaration

▸ (call, detail): void

Parameters
Name Type
call CallSip \
detail Object
detail.previousConnected boolean
Returns

void


tvoxclient_state_change

• tvoxclient_state_change: (state: TVoxClientState, detail: TVoxClientDetail) => void

Type declaration

▸ (state, detail): void

Parameters
Name Type
state TVoxClientState
detail TVoxClientDetail
Returns

void

@telenia/tvox-client-sdk / Exports / Phone / TVoxClientDetail

Interface: TVoxClientDetail

Phone.TVoxClientDetail

Properties

lastUpdate

• lastUpdate: Date


platform

• Optional platform: TVoxClientPlatform


userAgent

• Optional userAgent: string

@telenia/tvox-client-sdk / Exports / ProfileAgent / EventMap

Interface: EventMap

ProfileAgent.EventMap

Properties

call_on_queue

• call_on_queue: (callOnQueue: number) => void

Type declaration

▸ (callOnQueue): void

Parameters
Name Type
callOnQueue number
Returns

void


service_call_on_queue

• service_call_on_queue: (serviceCode: string, callOnQueue: number) => void

Type declaration

▸ (serviceCode, callOnQueue): void

Parameters
Name Type
serviceCode string
callOnQueue number
Returns

void


status_changed

• status_changed: (state: string) => void

Type declaration

▸ (state): void

Parameters
Name Type
state string
Returns

void

@telenia/tvox-client-sdk / Exports / Transport / EventMap

Interface: EventMap

Transport.EventMap

Properties

connect

• connect: () => void

Type declaration

▸ (): void

Returns

void


disconnect

• disconnect: () => void

Type declaration

▸ (): void

Returns

void

@telenia/tvox-client-sdk / Exports / User / Data

Interface: Data

User.Data

Properties

name

• Optional name: string


profile

• Optional profile: Profile<any>


surname

• Optional surname: string


userId

• Optional userId: string


username

• Optional username: string

@telenia/tvox-client-sdk / Exports / User / EventMap

Interface: EventMap

User.EventMap

Properties

error_no_profile

• error_no_profile: () => void

Type declaration

▸ (): void

Returns

void


error_no_profile_available

• error_no_profile_available: () => void

Type declaration

▸ (): void

Returns

void


profile_added

• profile_added: (profile: Profile<any>) => void

Type declaration

▸ (profile): void

Parameters
Name Type
profile Profile<any>
Returns

void


profile_removed

• profile_removed: (profile: Profile<any>) => void

Type declaration

▸ (profile): void

Parameters
Name Type
profile Profile<any>
Returns

void


profile_selected

• profile_selected: (profile: Profile<any>) => void

Type declaration

▸ (profile): void

Parameters
Name Type
profile Profile<any>
Returns

void

@telenia/tvox-client-sdk / Exports / UserStatusMonitor / EventMap

Interface: EventMap

UserStatusMonitor.EventMap

Properties

phone_status_changed

• phone_status_changed: (status: PhoneChannelStatus) => void

Type declaration

▸ (status): void

Parameters
Name Type
status PhoneChannelStatus
Returns

void


presence_status_changed

• presence_status_changed: (status: PresenceStatus) => void

Type declaration

▸ (status): void

Parameters
Name Type
status PresenceStatus
Returns

void

@telenia/tvox-client-sdk / Exports

@telenia/tvox-client-sdk

Namespaces

Enumerations

Classes

Interfaces

Type Aliases

DeviceTypes

Ƭ DeviceTypes: DeviceSip | DeviceWebrtc


EventTypes

Ƭ EventTypes: EventEmitterProto.ValidEventTypes

Variables

LIB_VERSION

• Const LIB_VERSION: string = versionData.lib


SDK_VERSION

• Const SDK_VERSION: string = versionData.sdk

@telenia/tvox-client-sdk / Exports / C

Namespace: C

Enumerations

@telenia/tvox-client-sdk / Exports / Call

Namespace: Call

Enumerations

Classes

Interfaces

@telenia/tvox-client-sdk / Exports / CallHistory

Namespace: CallHistory

Enumerations

Classes

Interfaces

@telenia/tvox-client-sdk / Exports / CallSip

Namespace: CallSip

Interfaces

@telenia/tvox-client-sdk / Exports / CallSipForTransfer

Namespace: CallSipForTransfer

Interfaces

@telenia/tvox-client-sdk / Exports / CallWebrtc / ConnectionManager

Namespace: ConnectionManager

CallWebrtc.ConnectionManager

Enumerations

@telenia/tvox-client-sdk / Exports / CallWebrtc

Namespace: CallWebrtc

Namespaces

Classes

Interfaces

@telenia/tvox-client-sdk / Exports / Client

Namespace: Client

Enumerations

Classes

Interfaces

Type Aliases

Credential

Ƭ Credential: BasicCredential | BerearCredential | ExternalSessionIdCredential | JWTCredential

Type of allowed credential

@telenia/tvox-client-sdk / Exports / Contact

Namespace: Contact

Enumerations

Classes

Interfaces

@telenia/tvox-client-sdk / Exports / Device

Namespace: Device

Interfaces

@telenia/tvox-client-sdk / Exports / DeviceWebrtc / Configuration

Namespace: Configuration

DeviceWebrtc.Configuration

Classes

@telenia/tvox-client-sdk / Exports / DeviceWebrtc

Namespace: DeviceWebrtc

Namespaces

Classes

@telenia/tvox-client-sdk / Exports / DeviceWebrtcMedia

Namespace: DeviceWebrtcMedia

Classes

Interfaces

@telenia/tvox-client-sdk / Exports / Feedback

Namespace: Feedback

Classes

Interfaces

@telenia/tvox-client-sdk / Exports / FileUploader

Namespace: FileUploader

Interfaces

@telenia/tvox-client-sdk / Exports / Log

Namespace: Log

Enumerations

Classes

Interfaces

@telenia/tvox-client-sdk / Exports / Phone

Namespace: Phone

Enumerations

Interfaces

@telenia/tvox-client-sdk / Exports / Profile

Namespace: Profile

Enumerations

@telenia/tvox-client-sdk / Exports / ProfileAgent

Namespace: ProfileAgent

Interfaces

@telenia/tvox-client-sdk / Exports / Transport

Namespace: Transport

Enumerations

Interfaces

@telenia/tvox-client-sdk / Exports / User

Namespace: User

Enumerations

Interfaces

@telenia/tvox-client-sdk / Exports / UserStatusMonitor

Namespace: UserStatusMonitor

Enumerations

Classes

Interfaces

Example

Download the example here.

Requirements

Installation and startup

  1. Installing dependencies

npm install

  1. Domain setup
  1. Starting development server

npm run start

Project will be available at http://localhost:4200.

Project structure

Note

Download

Download the library here.

Changelog

[1.6.0] - 2025-12-16

Added

[1.5.1] - 2025-05-21

Added

[1.5.0] - 2025-01-09

New major release for compatibility with TVox >= 24.3

Added

Fixed

[1.4.3] - 2023-12-21

Fixed

[1.4.2] - 2023-12-19

Fixed

[1.4.1] - 2023-12-15

Added

Fixed

[1.4.0] - 2023-11-28

New minor release for compatibility with TVox >= 24

All feature is same as 1.3.2

[1.3.2] - 2023-11-28

Added

[1.3.1]

Added

[1.3.0]

Added

[1.2.4]

Changed

[1.2.3]

Fixed

[1.2.2]

Added

[1.2.1]

Added

[1.2.0]

Changed

[1.1.4]

Fixed

[1.1.3]

Added

[1.1.2]

Added

[1.1.1]

Added

[1.1.0]

Added

[1.0.0]

First release.