NAV
Version: 1.2.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 / Call / Lookup

Class: Lookup

Call.Lookup

Hierarchy

↳ Lookup

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

Properties

_contact

• Optional _contact: Contact


display

• Readonly display: LookupDisplay = {}

Accessors

contact

• get contact(): undefined | Contact

Returns

undefined | Contact


result

• get result(): undefined | SUCCESS | MULTIPLE | ERROR | NONE

Returns

undefined | SUCCESS | MULTIPLE | ERROR | NONE


status

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

Returns

"end" | "progress"

Methods

addListener

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

Type parameters

Name Type
T extends "update_contact" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<LookupEventMap>[Extract<T, "update_contact" \
context? any

Returns

Lookup

Inherited from

EventEmitter.addListener


emit

▸ emit<T>(event, ...args): boolean

Calls each of the listeners registered for a given event.

Type parameters

Name Type
T extends "update_contact" \

Parameters

Name Type
event T
...args ArgumentMap<LookupEventMap>[Extract<T, "update_contact" \

Returns

boolean

Inherited from

EventEmitter.emit


eventNames

▸ eventNames(): ("update_contact" | "update_display" | "end")[]

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

Returns

("update_contact" | "update_display" | "end")[]

Inherited from

EventEmitter.eventNames


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event "update_contact" \

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<LookupEventMap>[Extract<T, "update_contact" | "update_display" | "end">]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends "update_contact" \

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<LookupEventMap>[Extract<T, "update_contact" | "update_display" | "end">]) => void[]

Inherited from

EventEmitter.listeners


off

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

Type parameters

Name Type
T extends "update_contact" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<LookupEventMap>[Extract<T, "update_contact" \
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 "update_contact" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<LookupEventMap>[Extract<T, "update_contact" \
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 "update_contact" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<LookupEventMap>[Extract<T, "update_contact" \
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? "update_contact" \

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 "update_contact" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<LookupEventMap>[Extract<T, "update_contact" \
context? any
once? boolean

Returns

Lookup

Inherited from

EventEmitter.removeListener

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

Class: Call

Call represent manager for every call instance

Type parameters

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

Hierarchy

↳ Call

↳↳ CallSip

↳↳ CallWebrtc

Properties

callId

• Readonly callId: string


data

• Readonly data: Object


direction

• Readonly direction: Direction


lookup

• Readonly lookup: Lookup

Accessors

duration

• get duration(): undefined | number

Returns

undefined | number


endTime

• get endTime(): undefined | Date

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

Returns

string


lastUpdateMessageDate

• get lastUpdateMessageDate(): null | Date

Returns

null | Date


service

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

Returns

undefined | { code: string ; description: string }


startTime

• get startTime(): Date

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


emit

▸ emit<T>(event, ...args): boolean

Calls each of the listeners registered for a given event.

Type parameters

Name Type
T extends string \

Parameters

Name Type
event T
...args Parameters<EventListener<E, T>>

Returns

boolean

Inherited from

EventEmitter.emit


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

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

Class: CallHistoryResult

CallHistory.CallHistoryResult

Hierarchy

↳ CallHistoryResult

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

Properties

options

• Readonly options: CallHistoryRequest

Methods

addListener

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

Type parameters

Name Type
T extends "data" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<SearchResultEventMap<CallHistoryItem>>[Extract<T, "data" \
context? any

Returns

CallHistoryResult

Inherited from

SearchResult.addListener


emit

▸ emit<T>(event, ...args): boolean

Calls each of the listeners registered for a given event.

Type parameters

Name Type
T extends "data" \

Parameters

Name Type
event T
...args ArgumentMap<SearchResultEventMap<CallHistoryItem>>[Extract<T, "data" \

Returns

boolean

Inherited from

SearchResult.emit


eventNames

▸ eventNames(): ("data" | "error" | "complete")[]

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

Returns

("data" | "error" | "complete")[]

Inherited from

SearchResult.eventNames


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event "data" \

Returns

number

Inherited from

SearchResult.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<SearchResultEventMap<CallHistoryItem>>[Extract<T, "data" | "error" | "complete">]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends "data" \

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<SearchResultEventMap<CallHistoryItem>>[Extract<T, "data" | "error" | "complete">]) => void[]

Inherited from

SearchResult.listeners


off

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

Type parameters

Name Type
T extends "data" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<SearchResultEventMap<CallHistoryItem>>[Extract<T, "data" \
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 "data" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<SearchResultEventMap<CallHistoryItem>>[Extract<T, "data" \
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 "data" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<SearchResultEventMap<CallHistoryItem>>[Extract<T, "data" \
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? "data" \

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 "data" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<SearchResultEventMap<CallHistoryItem>>[Extract<T, "data" \
context? any
once? boolean

Returns

CallHistoryResult

Inherited from

SearchResult.removeListener

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

Class: CallSip

Hierarchy

↳ CallSip

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 {@link Call.CallFeature[]} new features

param {@link Call.CallFeature[]} 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");
});

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");
});

Properties

callId

• Readonly callId: string

Inherited from

Call.callId


data

• Readonly data: Object

Inherited from

Call.data


direction

• Readonly direction: Direction

Inherited from

Call.direction


lookup

• Readonly lookup: Lookup

Inherited from

Call.lookup


type

• Readonly type: LineType = C.LineType.SIP

Accessors

callSipForTransferInstance

• get callSipForTransferInstance(): undefined | CallSipForTransfer

Returns

undefined | CallSipForTransfer


duration

• get duration(): undefined | number

Returns

undefined | number

Inherited from

Call.duration


endTime

• get endTime(): undefined | Date

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

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 }

Returns

undefined | { code: string ; description: string }

Inherited from

Call.service


startTime

• get startTime(): Date

Returns

Date

Inherited from

Call.startTime

Methods

addListener

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

Type parameters

Name Type
T extends "progress" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "progress" \
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>


emit

▸ emit<T>(event, ...args): boolean

Calls each of the listeners registered for a given event.

Type parameters

Name Type
T extends "progress" \

Parameters

Name Type
event T
...args ArgumentMap<EventMap>[Extract<T, "progress" \

Returns

boolean

Inherited from

Call.emit


eventNames

▸ eventNames(): ("progress" | "connecting" | "accepted" | "ended" | "newDTMF" | "hold" | "unhold" | "change_features" | "new_call_for_transfer")[]

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

Returns

("progress" | "connecting" | "accepted" | "ended" | "newDTMF" | "hold" | "unhold" | "change_features" | "new_call_for_transfer")[]

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>


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 "progress" \

Returns

number

Inherited from

Call.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<EventMap>[Extract<T, "progress" | "connecting" | "accepted" | "ended" | "newDTMF" | "hold" | "unhold" | "change_features" | "new_call_for_transfer">]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends "progress" \

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<EventMap>[Extract<T, "progress" | "connecting" | "accepted" | "ended" | "newDTMF" | "hold" | "unhold" | "change_features" | "new_call_for_transfer">]) => void[]

Inherited from

Call.listeners


off

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

Type parameters

Name Type
T extends "progress" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, "progress" \
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 "progress" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "progress" \
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 "progress" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "progress" \
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? "progress" \

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 "progress" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, "progress" \
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>


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>

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

Class: CallSipForTransfer

Hierarchy

↳ CallSipForTransfer

Constructors

constructor

• new CallSipForTransfer(device, _callSip)

Parameters

Name Type
device DeviceSip
_callSip CallSip

Overrides

EventEmitter<CallSipForTransfer.EventMap&gt;.constructor

Events

ended

• Static ended: string = "ended"

Fired when the callSipForTransfer is ended

param

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

Accessors

callSip

• get callSip(): CallSip

CallSip instance associated of this {@link 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


emit

▸ emit<T>(event, ...args): boolean

Calls each of the listeners registered for a given event.

Type parameters

Name Type
T extends "ended"

Parameters

Name Type
event T
...args ArgumentMap<EventMap>[Extract<T, "ended">]

Returns

boolean

Inherited from

EventEmitter.emit


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 / ConnectionManager

Class: ConnectionManager

CallWebrtc.ConnectionManager

Hierarchy

↳ ConnectionManager

Constructors

constructor

• new ConnectionManager(call)

Parameters

Name Type
call CallWebrtc

Overrides

EventEmitter<{ connection_error: (error: any) =&gt; void; state: (state: ConnectionManager.State) =&gt; void; local_audio_level: (level: number) =&gt; void; remote_audio_level: (level: number) =&gt; void; stats: (stats: TLink.StatsEvent) =&gt; void; }&gt;.constructor

Methods

addListener

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

Type parameters

Name Type
T extends "connection_error" \

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, "connection_error" \
context? any

Returns

ConnectionManager

Inherited from

EventEmitter.addListener


emit

▸ emit<T>(event, ...args): boolean

Calls each of the listeners registered for a given event.

Type parameters

Name Type
T extends "connection_error" \

Parameters

Name Type
event T
...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, "connection_error" \

Returns

boolean

Inherited from

EventEmitter.emit


eventNames

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

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

Returns

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

Inherited from

EventEmitter.eventNames


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event "connection_error" \

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, "connection_error" | "state" | "local_audio_level" | "remote_audio_level" | "stats">]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends "connection_error" \

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, "connection_error" | "state" | "local_audio_level" | "remote_audio_level" | "stats">]) => void[]

Inherited from

EventEmitter.listeners


off

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

Type parameters

Name Type
T extends "connection_error" \

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, "connection_error" \
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 "connection_error" \

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, "connection_error" \
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 "connection_error" \

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, "connection_error" \
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? "connection_error" \

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 "connection_error" \

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, "connection_error" \
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 / CallWebrtc

Class: CallWebrtc

Hierarchy

↳ CallWebrtc

Properties

callId

• Readonly callId: string

Inherited from

Call.callId


data

• Readonly data: Object

Inherited from

Call.data


direction

• Readonly direction: Direction

Inherited from

Call.direction


lookup

• Readonly lookup: Lookup

Inherited from

Call.lookup


type

• Readonly type: LineType = C.LineType.WEBRTC

Accessors

connectionManager

• get connectionManager(): ConnectionManager

Returns

ConnectionManager


duration

• get duration(): undefined | number

Returns

undefined | number

Inherited from

Call.duration


endTime

• get endTime(): undefined | Date

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

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 }

Returns

undefined | { code: string ; description: string }

Inherited from

Call.service


startTime

• get startTime(): Date

Returns

Date

Inherited from

Call.startTime

Methods

addListener

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

Type parameters

Name Type
T extends "progress" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "progress" \
context? any

Returns

CallWebrtc

Inherited from

Call.addListener


answerAudio

▸ answerAudio(): Promise<boolean>

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

Returns

Promise<boolean>


answerVideo

▸ answerVideo(videoContainer?): Promise<boolean>

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

Parameters

Name Type
videoContainer? HTMLElement

Returns

Promise<boolean>


emit

▸ emit<T>(event, ...args): boolean

Calls each of the listeners registered for a given event.

Type parameters

Name Type
T extends "progress" \

Parameters

Name Type
event T
...args ArgumentMap<EventMap>[Extract<T, "progress" \

Returns

boolean

Inherited from

Call.emit


eventNames

▸ eventNames(): ("progress" | "connecting" | "accepted" | "ended" | "newDTMF" | "hold" | "unhold" | "change_features")[]

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

Returns

("progress" | "connecting" | "accepted" | "ended" | "newDTMF" | "hold" | "unhold" | "change_features")[]

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>


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 "progress" \

Returns

number

Inherited from

Call.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<EventMap>[Extract<T, "progress" | "connecting" | "accepted" | "ended" | "newDTMF" | "hold" | "unhold" | "change_features">]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends "progress" \

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<EventMap>[Extract<T, "progress" | "connecting" | "accepted" | "ended" | "newDTMF" | "hold" | "unhold" | "change_features">]) => 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 "progress" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, "progress" \
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 "progress" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "progress" \
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 "progress" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "progress" \
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? "progress" \

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 "progress" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, "progress" \
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>


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<any, 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>


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 / Client / ClientLogConfigurator

Class: ClientLogConfigurator

Client.ClientLogConfigurator

Hierarchy

↳ ClientLogConfigurator

Accessors

enabled

• get enabled(): boolean

Returns

boolean

• set enabled(enabled): void

Parameters

Name Type
enabled boolean

Returns

void


instanceIdLogged

• get instanceIdLogged(): boolean

Returns

boolean

Overrides

Log.LogConfigurator.instanceIdLogged

• set instanceIdLogged(instanceIdLogged): void

Parameters

Name Type
instanceIdLogged boolean

Returns

void

Overrides

Log.LogConfigurator.instanceIdLogged


logLevel

• get logLevel(): LogLevel

Returns

LogLevel

Overrides

Log.LogConfigurator.logLevel

• set logLevel(logLevel): void

Parameters

Name Type
logLevel LogLevel

Returns

void

Overrides

Log.LogConfigurator.logLevel


objectToJson

• get objectToJson(): boolean

Returns

boolean

Overrides

Log.LogConfigurator.objectToJson

• set objectToJson(objectToJson): void

Parameters

Name Type
objectToJson boolean

Returns

void

Overrides

Log.LogConfigurator.objectToJson


prefix

• get prefix(): string

Returns

string

Overrides

Log.LogConfigurator.prefix

• set prefix(prefix): void

Parameters

Name Type
prefix string

Returns

void

Overrides

Log.LogConfigurator.prefix


timestamp

• get timestamp(): boolean

Returns

boolean

Overrides

Log.LogConfigurator.timestamp

• set timestamp(timestamp): void

Parameters

Name Type
timestamp boolean

Returns

void

Overrides

Log.LogConfigurator.timestamp

Methods

disableNamespace

▸ Static disableNamespace(): string

disable and return previus enabled namespace

Returns

string


enableNamespace

▸ Static enableNamespace(namespace): void

enable namespace

Parameters

Name Type
namespace string

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

Events

logged_in

• Static logged_in: string = "logged_in"

Fired for a successfull login.

param User user is same as client.user

client.on("logged_in", function(user) {
  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 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

Properties

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

Accessors

instanceId

• get instanceId(): string

identification of Client instance

Returns

string


logConfigurator

• get logConfigurator(): ClientLogConfigurator

client log configurator

Returns

ClientLogConfigurator


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 "ready" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "ready" \
context? any

Returns

Client

Inherited from

EventEmitter.addListener


emit

▸ emit<T>(event, ...args): boolean

Calls each of the listeners registered for a given event.

Type parameters

Name Type
T extends "ready" \

Parameters

Name Type
event T
...args ArgumentMap<EventMap>[Extract<T, "ready" \

Returns

boolean

Inherited from

EventEmitter.emit


eventNames

▸ eventNames(): ("ready" | "logged_in" | "logged_out" | "login_in_progress" | "login_failed")[]

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

Returns

("ready" | "logged_in" | "logged_out" | "login_in_progress" | "login_failed")[]

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 "ready" \

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<EventMap>[Extract<T, "ready" | "logged_in" | "logged_out" | "login_in_progress" | "login_failed">]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends "ready" \

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<EventMap>[Extract<T, "ready" | "logged_in" | "logged_out" | "login_in_progress" | "login_failed">]) => void[]

Inherited from

EventEmitter.listeners


login

▸ login(credential): Promise<void>

Parameters

Name Type Description
credential Credential credential to use

Returns

Promise<void>

// 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 ExternalSessionIdCredential
client.login({externalSessionId: "aabbcc"}).then(() => {
          console.log("login ok");
      }, (err) => {
          console.error("login failed", err);
      });

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 "ready" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, "ready" \
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 "ready" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "ready" \
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 "ready" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "ready" \
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? "ready" \

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 "ready" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, "ready" \
context? any
once? boolean

Returns

Client

Inherited from

EventEmitter.removeListener

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

Class: SearchContactResult

Contact.SearchContactResult

represent result of searchContact methods.

Hierarchy

↳ SearchContactResult

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

Properties

requestOptions

• Readonly requestOptions: SearchContactOptions

Methods

addListener

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

Type parameters

Name Type
T extends "data" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<SearchResultEventMap<Contact>>[Extract<T, "data" \
context? any

Returns

SearchContactResult

Inherited from

SearchResult.addListener


emit

▸ emit<T>(event, ...args): boolean

Calls each of the listeners registered for a given event.

Type parameters

Name Type
T extends "data" \

Parameters

Name Type
event T
...args ArgumentMap<SearchResultEventMap<Contact>>[Extract<T, "data" \

Returns

boolean

Inherited from

SearchResult.emit


eventNames

▸ eventNames(): ("data" | "error" | "complete")[]

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

Returns

("data" | "error" | "complete")[]

Inherited from

SearchResult.eventNames


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event "data" \

Returns

number

Inherited from

SearchResult.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<SearchResultEventMap<Contact>>[Extract<T, "data" | "error" | "complete">]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends "data" \

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<SearchResultEventMap<Contact>>[Extract<T, "data" | "error" | "complete">]) => void[]

Inherited from

SearchResult.listeners


off

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

Type parameters

Name Type
T extends "data" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<SearchResultEventMap<Contact>>[Extract<T, "data" \
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 "data" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<SearchResultEventMap<Contact>>[Extract<T, "data" \
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 "data" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<SearchResultEventMap<Contact>>[Extract<T, "data" \
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? "data" \

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 "data" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<SearchResultEventMap<Contact>>[Extract<T, "data" \
context? any
once? boolean

Returns

SearchContactResult

Inherited from

SearchResult.removeListener

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

Class: Contact

Hierarchy

↳ InternalUserContact

↳ InternalServiceContact

↳ InternalShortNumberContact

↳ ExternalItemContact

↳ ExternalOrganizationContact

↳ PersonalContact

Properties

id

• Readonly id: string


subtype

• Readonly subtype: null | SERVICE | USER | SHORT_NUMBER | ORGANIZATION = null


type

• Readonly type: Type

@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, param?): Promise<void>

run dial

Parameters

Name Type
phoneNumber string
param? DialParam

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 | ("host" | "srflx" | "relay")[]

Returns

undefined | ("host" | "srflx" | "relay")[]

• 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 | NotSupported | FullTrickle | HalfTrickle

Returns

undefined | NotSupported | FullTrickle | HalfTrickle

• set trickleIcePolicy(trickleIcePolicy): void

Parameters

Name Type
trickleIcePolicy undefined \

Returns

void

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

Class: DeviceWebrtc

Implements

Properties

configuration

• Readonly configuration: Configuration


exten

• Readonly exten: string


label

• Readonly label: string


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 / 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 | SERVICE | USER | SHORT_NUMBER | 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 | SERVICE | USER | SHORT_NUMBER | ORGANIZATION = null

Inherited from

Contact.subtype


type

• Readonly type: Type

Inherited from

Contact.type

@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 | SERVICE | USER | SHORT_NUMBER | 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 | SERVICE | USER | SHORT_NUMBER | 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 | SERVICE | USER | SHORT_NUMBER | ORGANIZATION = null

Inherited from

Contact.subtype


type

• Readonly type: Type

Inherited from

Contact.type

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

Class: LogConfigurator

Log.LogConfigurator

Hierarchy

↳ ClientLogConfigurator

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 / Log

Class: Log

Accessors

config

• get config(): LogConfigurator

Returns

LogConfigurator

Methods

debug

▸ debug(...args): void

Parameters

Name Type
...args any[]

Returns

void


error

▸ error(...args): void

Parameters

Name Type
...args any[]

Returns

void


fatal

▸ fatal(...args): void

Parameters

Name Type
...args any[]

Returns

void


info

▸ info(...args): void

Parameters

Name Type
...args any[]

Returns

void


log

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

Parameters

Name Type
level LogLevel
...args any[]

Returns

void


logWithTimestamp

▸ logWithTimestamp(level, timestamp, ...args): void

log args with timestamp as prefix

Parameters

Name Type
level LogLevel
timestamp Date
...args any[]

Returns

void


verbose

▸ verbose(...args): void

Parameters

Name Type
...args any[]

Returns

void


warn

▸ warn(...args): void

Parameters

Name Type
...args any[]

Returns

void


debug

▸ Static debug(...args): void

Parameters

Name Type
...args any[]

Returns

void


error

▸ Static error(...args): void

Parameters

Name Type
...args any[]

Returns

void


fatal

▸ Static fatal(...args): void

Parameters

Name Type
...args any[]

Returns

void


info

▸ Static info(...args): void

Parameters

Name Type
...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


verbose

▸ Static verbose(...args): void

Parameters

Name Type
...args any[]

Returns

void


warn

▸ Static warn(...args): void

Parameters

Name Type
...args any[]

Returns

void

@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 | SERVICE | USER | SHORT_NUMBER | 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

Events

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) {
  console.log("new call is placed", call);
});

tvoxclient_state_change

• Static tvoxclient_state_change: string = "tvoxclient_state_change"

Fired when TVox Client state change

param Phone.TVoxClientState

param Phone.TVoxClientDetail}

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

Properties

availableDevice

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

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

phone managed by TVox Client

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 "newcall" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "newcall" \
context? any

Returns

Phone

Inherited from

EventEmitter.addListener


emit

▸ emit<T>(event, ...args): boolean

Calls each of the listeners registered for a given event.

Type parameters

Name Type
T extends "newcall" \

Parameters

Name Type
event T
...args ArgumentMap<EventMap>[Extract<T, "newcall" \

Returns

boolean

Inherited from

EventEmitter.emit


eventNames

▸ eventNames(): ("newcall" | "tvoxclient_state_change")[]

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

Returns

("newcall" | "tvoxclient_state_change")[]

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(data): Promise<void>

Parameters

Name Type
data CallInfo

Returns

Promise<void>


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event "newcall" \

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

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

Return the listeners registered for a given event.

Type parameters

Name Type
T extends "newcall" \

Parameters

Name Type
event T

Returns

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

Inherited from

EventEmitter.listeners


off

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

Type parameters

Name Type
T extends "newcall" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, "newcall" \
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 "newcall" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "newcall" \
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 "newcall" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "newcall" \
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? "newcall" \

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 "newcall" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, "newcall" \
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 / 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);
});

Methods

addListener

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

Type parameters

Name Type
T extends "data" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<SearchResultEventMap<T>>[Extract<T, "data" \
context? any

Returns

SearchResult<T>

Inherited from

EventEmitter.addListener


emit

▸ emit<T>(event, ...args): boolean

Calls each of the listeners registered for a given event.

Type parameters

Name Type
T extends "data" \

Parameters

Name Type
event T
...args ArgumentMap<SearchResultEventMap<T>>[Extract<T, "data" \

Returns

boolean

Inherited from

EventEmitter.emit


eventNames

▸ eventNames(): ("data" | "error" | "complete")[]

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

Returns

("data" | "error" | "complete")[]

Inherited from

EventEmitter.eventNames


listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event "data" \

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<SearchResultEventMap<T>>[Extract<T, "data" | "error" | "complete">]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends "data" \

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<SearchResultEventMap<T>>[Extract<T, "data" | "error" | "complete">]) => void[]

Inherited from

EventEmitter.listeners


off

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

Type parameters

Name Type
T extends "data" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<SearchResultEventMap<T>>[Extract<T, "data" \
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 "data" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<SearchResultEventMap<T>>[Extract<T, "data" \
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 "data" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<SearchResultEventMap<T>>[Extract<T, "data" \
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? "data" \

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 "data" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<SearchResultEventMap<T>>[Extract<T, "data" \
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");
});

Accessors

state

• get state(): Status

Returns

Status

Methods

addListener

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

Type parameters

Name Type
T extends "connect" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "connect" \
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


emit

▸ emit<T>(event, ...args): boolean

Calls each of the listeners registered for a given event.

Type parameters

Name Type
T extends "connect" \

Parameters

Name Type
event T
...args ArgumentMap<EventMap>[Extract<T, "connect" \

Returns

boolean

Inherited from

EventEmitter.emit


eventNames

▸ eventNames(): ("connect" | "disconnect")[]

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

Returns

("connect" | "disconnect")[]

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 "connect" \

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

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

Return the listeners registered for a given event.

Type parameters

Name Type
T extends "connect" \

Parameters

Name Type
event T

Returns

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

Inherited from

EventEmitter.listeners


off

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

Type parameters

Name Type
T extends "connect" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, "connect" \
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 "connect" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "connect" \
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 "connect" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "connect" \
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? "connect" \

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 "connect" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, "connect" \
context? any
once? boolean

Returns

Transport

Inherited from

EventEmitter.removeListener

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

Class: Profile

User.Profile

Constructors

constructor

• new Profile(id, label, type)

Parameters

Name Type
id number
label string
type ProfileType

Properties

id

• id: number


label

• label: string


type

• type: ProfileType

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

Class: User

A User represents place to manage user activity

Hierarchy

↳ User

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 User.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 User.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 User.Profile profile selected

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

Properties

availableProfile

• Readonly availableProfile: Profile[] = []

profile available to user, for select one use method useProfile


info

• Readonly info: Data = {}

current user info

Accessors

state

• get state(): State

current state of this client instance

Returns

State

Methods

addListener

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

Type parameters

Name Type
T extends "error_no_profile" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "error_no_profile" \
context? any

Returns

User

Inherited from

EventEmitter.addListener


emit

▸ emit<T>(event, ...args): boolean

Calls each of the listeners registered for a given event.

Type parameters

Name Type
T extends "error_no_profile" \

Parameters

Name Type
event T
...args ArgumentMap<EventMap>[Extract<T, "error_no_profile" \

Returns

boolean

Inherited from

EventEmitter.emit


eventNames

▸ eventNames(): ("error_no_profile" | "error_no_profile_available" | "profile_selected" | "profile_removed" | "profile_added")[]

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

Returns

("error_no_profile" | "error_no_profile_available" | "profile_selected" | "profile_removed" | "profile_added")[]

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);
});

listenerCount

▸ listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event "error_no_profile" \

Returns

number

Inherited from

EventEmitter.listenerCount


listeners

▸ listeners<T>(event): (...args: ArgumentMap<EventMap>[Extract<T, "error_no_profile" | "error_no_profile_available" | "profile_selected" | "profile_removed" | "profile_added">]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends "error_no_profile" \

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<EventMap>[Extract<T, "error_no_profile" | "error_no_profile_available" | "profile_selected" | "profile_removed" | "profile_added">]) => void[]

Inherited from

EventEmitter.listeners


off

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

Type parameters

Name Type
T extends "error_no_profile" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, "error_no_profile" \
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 "error_no_profile" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "error_no_profile" \
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 "error_no_profile" \

Parameters

Name Type
event T
fn (...args: ArgumentMap<EventMap>[Extract<T, "error_no_profile" \
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? "error_no_profile" \

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 "error_no_profile" \

Parameters

Name Type
event T
fn? (...args: ArgumentMap<EventMap>[Extract<T, "error_no_profile" \
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 User.availableProfile by this logic:

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

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

Parameters

Name Type
profile? Profile

Returns

Promise<void>

@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"


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 / Transport / Status

Enumeration: Status

Transport.Status

Enumeration members

CONNECTED

• CONNECTED = "CONNECTED"


DISCONNECTED

• DISCONNECTED = "DISCONNECTED"

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

Enumeration: ProfileType

User.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 / 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 / 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

Methods

end

▸ end(): void

Returns

void


update_contact

▸ update_contact(contact, lookup): void

Parameters

Name Type
contact Contact
lookup Lookup

Returns

void


update_display

▸ update_display(display, lookup): void

Parameters

Name Type
display LookupDisplay
lookup Lookup

Returns

void

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

Interface: CallHistoryItem

CallHistory.CallHistoryItem

Properties

devStatuses

• Optional devStatuses: CallHistoryDevStatus[]

returns the devStatuses


dialStatuses

• Optional dialStatuses: CallHistoryDialStatus[]

returns the dialStatuses


transportType

• Optional transportType: PHONE | VOICEMAIL | FAX | SMS

returns the transportType


type

• Optional type: INBOUND | OUTBOUND

returns the type

@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

Methods

accepted

▸ accepted(): void

Returns

void


change_features

▸ change_features(features, previousFeatures): void

Parameters

Name Type
features CallFeature[]
previousFeatures CallFeature[]

Returns

void


connecting

▸ connecting(): void

Returns

void


ended

▸ ended(): void

Returns

void


hold

▸ hold(): void

Returns

void


newDTMF

▸ newDTMF(tone): void

Parameters

Name Type
tone string \

Returns

void


new_call_for_transfer

▸ new_call_for_transfer(call): void

Parameters

Name Type
call CallSipForTransfer

Returns

void


progress

▸ progress(): void

Returns

void


unhold

▸ unhold(): void

Returns

void

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

Interface: EventMap

CallSipForTransfer.EventMap

Methods

ended

▸ ended(call): void

Parameters

Name Type
call CallSipForTransfer

Returns

void

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

Interface: EventMap

CallWebrtc.EventMap

Methods

accepted

▸ accepted(): void

Returns

void


change_features

▸ change_features(features, previousFeatures): void

Parameters

Name Type
features CallFeature[]
previousFeatures CallFeature[]

Returns

void


connecting

▸ connecting(): void

Returns

void


ended

▸ ended(): void

Returns

void


hold

▸ hold(): void

Returns

void


newDTMF

▸ newDTMF(tone): void

Parameters

Name Type
tone string \

Returns

void


progress

▸ progress(): void

Returns

void


unhold

▸ unhold(): 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


url

• url: string

Url of WebApi Server

required

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

Interface: EventMap

Client.EventMap

Methods

logged_in

▸ logged_in(user): void

Parameters

Name Type
user User

Returns

void


logged_out

▸ logged_out(user): void

Parameters

Name Type
user User

Returns

void


login_failed

▸ login_failed(error, user): void

Parameters

Name Type
error LoginError
user User

Returns

void


login_in_progress

▸ login_in_progress(user, credential): void

Parameters

Name Type
user User
credential Credential

Returns

void


ready

▸ ready(): 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 / 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 / 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[]

returns the addresses


categories

• Optional categories: AddressBookCategory[]

returns the categories


department

• Optional department: string

returns the department


display

• Optional display: string

returns the display


emails

• Optional emails: AddressBookContactMail[]

returns the emails


note

• Optional note: string

returns the note


numbers

• Optional numbers: AddressBookContactNumber[]

returns the numbers


site

• Optional site: string

returns the site


• Optional webLinks: AddressBookContactWeb[]

returns the webLinks

@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: MAIN | OTHER

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

Interface: AddressBookContactMail

Contact.AddressBookContactMail

Properties

type

• Optional type: INTERNET_WORK | INTERNET_HOME

returns the type


value

• Optional value: string

returns the value

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

Interface: AddressBookContactNumber

Contact.AddressBookContactNumber

Properties

type

• Optional type: FAX | HOME | CELL | WORK | CELL_WORK | FAX_WORK | FAX_HOME | CELL_HOME | MAIN | OTHER

returns the type


value

• Optional value: string

returns the value

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

Interface: AddressBookContactWeb

Contact.AddressBookContactWeb

Properties

type

• Optional type: WORK | HOME

returns the type


value

• Optional value: string

returns the value

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

Interface: ExternalContact

Contact.ExternalContact

Hierarchy

↳ ExternalContact

Properties

addresses

• Optional addresses: AddressBookContactAddress[]

returns the addresses

Inherited from

AddressBookContact.addresses


categories

• Optional categories: AddressBookCategory[]

returns the categories

Inherited from

AddressBookContact.categories


company

• Optional company: string

returns the company


customFields

• Optional customFields: Object

returns the customFields

Index signature

▪ [index: string]: string


customerCode

• Optional customerCode: string

customer's code

returns the customerCode


department

• Optional department: string

returns the department

Inherited from

AddressBookContact.department


display

• Optional display: string

returns the display

Inherited from

AddressBookContact.display


emails

• Optional emails: AddressBookContactMail[]

returns the emails

Inherited from

AddressBookContact.emails


memberof

• Optional memberof: string

returns the memberof


name

• Optional name: string

returns the name


note

• Optional note: string

returns the note

Inherited from

AddressBookContact.note


numbers

• Optional numbers: AddressBookContactNumber[]

returns the numbers

Inherited from

AddressBookContact.numbers


otherName

• Optional otherName: string

returns the otherName


role

• Optional role: string

returns the role


site

• Optional site: string

returns the site

Inherited from

AddressBookContact.site


surname

• Optional surname: string

returns the surname


vip

• Optional vip: boolean

returns the vip


• Optional webLinks: AddressBookContactWeb[]

returns the webLinks

Inherited from

AddressBookContact.webLinks

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

Interface: ExternalOrganizationContact

Contact.ExternalOrganizationContact

Hierarchy

↳ ExternalOrganizationContact

Properties

addresses

• Optional addresses: AddressBookContactAddress[]

returns the addresses

Inherited from

AddressBookContact.addresses


categories

• Optional categories: AddressBookCategory[]

returns the categories

Inherited from

AddressBookContact.categories


company

• Optional company: string

returns the company


customFields

• Optional customFields: Object

returns the customFields

Index signature

▪ [index: string]: string


department

• Optional department: string

returns the department

Inherited from

AddressBookContact.department


display

• Optional display: string

returns the display

Inherited from

AddressBookContact.display


emails

• Optional emails: AddressBookContactMail[]

returns the emails

Inherited from

AddressBookContact.emails


name

• Optional name: string

returns the name


note

• Optional note: string

returns the note

Inherited from

AddressBookContact.note


numbers

• Optional numbers: AddressBookContactNumber[]

returns the numbers

Inherited from

AddressBookContact.numbers


otherName

• Optional otherName: string

returns the otherName


role

• Optional role: string

returns the role


site

• Optional site: string

returns the site

Inherited from

AddressBookContact.site


surname

• Optional surname: string

returns the surname


vip

• Optional vip: boolean

returns the vip


• Optional webLinks: AddressBookContactWeb[]

returns the webLinks

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[]

returns the addresses

Inherited from

AddressBookContact.addresses


categories

• Optional categories: AddressBookCategory[]

returns the categories

Inherited from

AddressBookContact.categories


department

• Optional department: string

returns the department

Inherited from

AddressBookContact.department


display

• Optional display: string

returns the display

Inherited from

AddressBookContact.display


emails

• Optional emails: AddressBookContactMail[]

returns the emails

Inherited from

AddressBookContact.emails


name

• Optional name: string

returns the name


note

• Optional note: string

returns the note

Inherited from

AddressBookContact.note


numbers

• Optional numbers: AddressBookContactNumber[]

returns the numbers

Inherited from

AddressBookContact.numbers


otherName

• Optional otherName: string

returns the otherName


site

• Optional site: string

returns the site

Inherited from

AddressBookContact.site


surname

• Optional surname: string

returns the surname


• Optional webLinks: AddressBookContactWeb[]

returns the webLinks

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: INTERNAL | EXTERNAL | PERSONAL

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

Interface: ServiceContact

Contact.ServiceContact

Hierarchy

↳ ServiceContact

Properties

addresses

• Optional addresses: AddressBookContactAddress[]

returns the addresses

Inherited from

AddressBookContact.addresses


categories

• Optional categories: AddressBookCategory[]

returns the categories

Inherited from

AddressBookContact.categories


code

• Optional code: string

returns the code


department

• Optional department: string

returns the department

Inherited from

AddressBookContact.department


display

• Optional display: string

returns the display

Inherited from

AddressBookContact.display


emails

• Optional emails: AddressBookContactMail[]

returns the emails

Inherited from

AddressBookContact.emails


note

• Optional note: string

returns the note

Inherited from

AddressBookContact.note


numbers

• Optional numbers: AddressBookContactNumber[]

returns the numbers

Inherited from

AddressBookContact.numbers


site

• Optional site: string

returns the site

Inherited from

AddressBookContact.site


• Optional webLinks: AddressBookContactWeb[]

returns the webLinks

Inherited from

AddressBookContact.webLinks

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

Interface: ShortNumberContact

Contact.ShortNumberContact

Hierarchy

↳ ShortNumberContact

Properties

addresses

• Optional addresses: AddressBookContactAddress[]

returns the addresses

Inherited from

AddressBookContact.addresses


categories

• Optional categories: AddressBookCategory[]

returns the categories

Inherited from

AddressBookContact.categories


department

• Optional department: string

returns the department

Inherited from

AddressBookContact.department


display

• Optional display: string

returns the display

Inherited from

AddressBookContact.display


emails

• Optional emails: AddressBookContactMail[]

returns the emails

Inherited from

AddressBookContact.emails


note

• Optional note: string

returns the note

Inherited from

AddressBookContact.note


numbers

• Optional numbers: AddressBookContactNumber[]

returns the numbers

Inherited from

AddressBookContact.numbers


site

• Optional site: string

returns the site

Inherited from

AddressBookContact.site


• Optional webLinks: AddressBookContactWeb[]

returns the webLinks

Inherited from

AddressBookContact.webLinks

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

Interface: UserContact

Contact.UserContact

Hierarchy

↳ UserContact

Properties

addresses

• Optional addresses: AddressBookContactAddress[]

returns the addresses

Inherited from

AddressBookContact.addresses


categories

• Optional categories: AddressBookCategory[]

returns the categories

Inherited from

AddressBookContact.categories


customFields

• Optional customFields: Object

returns the customFields

Index signature

▪ [index: string]: string


department

• Optional department: string

returns the department

Inherited from

AddressBookContact.department


display

• Optional display: string

returns the display

Inherited from

AddressBookContact.display


emails

• Optional emails: AddressBookContactMail[]

returns the emails

Inherited from

AddressBookContact.emails


name

• Optional name: string

returns the name


note

• Optional note: string

returns the note

Inherited from

AddressBookContact.note


numbers

• Optional numbers: AddressBookContactNumber[]

returns the numbers

Inherited from

AddressBookContact.numbers


site

• Optional site: string

returns the site

Inherited from

AddressBookContact.site


surname

• Optional surname: string

returns the surname


username

• Optional username: string

returns the username


• Optional webLinks: AddressBookContactWeb[]

returns the webLinks

Inherited from

AddressBookContact.webLinks

@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 / Device

Interface: Device

Implemented by

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

Interface: LogConfig

Log.LogConfig

Properties

enabled

• Optional enabled: boolean

enable logging

default true


logLevel

• Optional logLevel: Verbose | Debug | Info | Warn | Error | Fatal | None

minimun log level (included)

default Level.debug


objectToJson

• Optional objectToJson: boolean

log plain object as json object

default false


timestamp

• Optional timestamp: boolean

log timestamp

default true

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

Interface: EventMap

Phone.EventMap

Methods

newcall

▸ newcall(call): void

Parameters

Name Type
call CallSip \

Returns

void


tvoxclient_state_change

▸ tvoxclient_state_change(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: BROWSER | APPLICATION


userAgent

• Optional userAgent: string

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

Interface: EventMap

Transport.EventMap

Methods

connect

▸ connect(): void

Returns

void


disconnect

▸ disconnect(): void

Returns

void

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

Interface: Data

User.Data

Properties

name

• Optional name: String


profile

• Optional profile: Profile


surname

• Optional surname: String


username

• Optional username: String

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

Interface: EventMap

User.EventMap

Methods

error_no_profile

▸ error_no_profile(): void

Returns

void


error_no_profile_available

▸ error_no_profile_available(): void

Returns

void


profile_added

▸ profile_added(profile): void

Parameters

Name Type
profile Profile

Returns

void


profile_removed

▸ profile_removed(profile): void

Parameters

Name Type
profile Profile

Returns

void


profile_selected

▸ profile_selected(profile): void

Parameters

Name Type
profile Profile

Returns

void

@telenia/tvox-client-sdk / Exports

@telenia/tvox-client-sdk

Namespaces

Classes

Interfaces

@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

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 / Log

Namespace: Log

Enumerations

Classes

Interfaces

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

Namespace: Phone

Enumerations

Interfaces

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

Namespace: Transport

Enumerations

Interfaces

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

Namespace: User

Enumerations

Classes

Interfaces

Example

Download the example here.

Login with TVox credentials to start client and manage calls.

client.js: Contains the javascript logic of the test client
client.html: Contains the graphical management of the test client

Edit the client.js file and enter your domain on line 4

Once you have entered your domain, access the test client via your browser

Login form, where you can enter the username and password of the user to log in During login, the progress of the login procedure is shown.

Once the user is logged in correctly, the following interface is presented:

By pressing the "logout" button the currently logged in user is logged out.

Profile Information In this section, you can see the current profile in use with id, label and type. It is possibile to have all available profiles for the current logged user, and you can choose a different profile to use.

Call Section

In order to make a call, you need to type a number on the input box, and then press the "dial" button at this point, the graphics are redrawn showing the information of the call and the buttons for actions on that call. The information shows the direction of the call, the number and the contact lookup. Action buttons are controlled (shown / hidden) depending on the call features in place.

Addressbook Section

Ability to search the phonebook with text or number, by pressing the search button, allows you to search for contacts that satisfy the search for the text entered. The search is made for page 1 of size 10 (the result of the search in the address book is logged in the console)

History Section

Ability to consult the call history by pressing the "Load call history" button A paged request is made for page 1 of size 10 (the result of the request made is logged in the console)

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.