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.
disconnect()
Closes the connection to Wildix XMPP server.
getCredentials()
Get saved credentials
getExtension() → {string}
Returns extension that are used to connect to Wildix XMPP server.
Returns:
- Type
- string
getFullJid() → {string}
Returns a full JID (with resource) that are used to connect to Wildix XMPP Server.
Returns:
- Type
- string
getJid() → {string}
Returns a JID that are used to connect to Wildix XMPP server.
Returns:
- Type
- string
getLicenseType() → {string}
Returns a license type that are used to connect to Wildix XMPP Server.
Returns:
- Type
- string
getVersion() → {string}
Return the version wtapi.js.
Returns:
- Type
- string
handleAuthorizationResponse()
Handle authorization response
isConnected() → {boolean}
Returns true if currently connected to the Wildix XMPP server.
Returns:
- Type
- boolean
restoreSavedCredentials()
Restore saved in storage authorization credentials
setOptions(options)
Set options
Parameters:
Name | Type | Description |
---|---|---|
options |
setStorage(storage)
Set credentials storage
Parameters:
Name | Type | Description |
---|---|---|
storage |
unregisterHandler(event, callback)
Unregister a previously registered handler.
Parameters:
Name | Type | Description |
---|---|---|
event |
string | |
callback |
function |
Events
connected
Indicates that connection to PBX is established
disconnected
Indicates that connection with PBX is lost