Class: WTAPI

WTAPI()

new WTAPI()

Represents a WTAPI instance
Source:

Extends

  • Observer

Classes

ChatPlugin
ConnectedCall
Location
Message
Observable
Presence
PresencePlugin
ProfileData
QueuesPlugin
RosterPlugin
TelephonyPlugin
User

Methods

connect()

Connects to a Wildix XMPP server. Connections can be reused between connections. This means that an Connection may be connected, disconnected and then connected again. Listeners of the Connection will be retained accross connections. If a connected Connection gets disconnected abruptly then it will try to reconnect again. To stop the reconnection process, use disconnect(). Once stopped you can use connect() to manually connect to the server.
Source:

disconnect()

Closes the connection to Wildix XMPP server.
Source:

getCredentials()

Get saved credentials
Source:

getExtension() → {string}

Returns extension that are used to connect to Wildix XMPP server.
Source:
Returns:
Type
string

getFullJid() → {string}

Returns a full JID (with resource) that are used to connect to Wildix XMPP Server.
Source:
Returns:
Type
string

getJid() → {string}

Returns a JID that are used to connect to Wildix XMPP server.
Source:
Returns:
Type
string

getLicenseType() → {string}

Returns a license type that are used to connect to Wildix XMPP Server.
Source:
Returns:
Type
string

getVersion() → {string}

Return the version wtapi.js.
Source:
Returns:
Type
string

handleAuthorizationResponse()

Handle authorization response
Source:

isConnected() → {boolean}

Returns true if currently connected to the Wildix XMPP server.
Source:
Returns:
Type
boolean

restoreSavedCredentials()

Restore saved in storage authorization credentials
Source:

setOptions(options)

Set options
Parameters:
Name Type Description
options
Source:

setStorage(storage)

Set credentials storage
Parameters:
Name Type Description
storage
Source:

unregisterHandler(event, callback)

Unregister a previously registered handler.
Parameters:
Name Type Description
event string
callback function
Source:

Events

connected

Indicates that connection to PBX is established
Source:

disconnected

Indicates that connection with PBX is lost
Source: