Cloudonix SDK Root namesapce.
Namespaces
Methods
(static) destroySipStack()
Stop the Web SDK and destroy any active connection
(static) init(domain, username, token, regfree) → {boolean}
Initialise the Web SDK and the relevant SIP Stack elements.
Parameters:
Name | Type | Description |
---|---|---|
domain |
string | The cloudonix domain to init |
username |
string | The cloudonix domain subscriber to init |
token |
string | Either a password or a RegFree Token |
regfree |
boolean | Enable RegFree opration - default: false |
Returns:
Returns false on failure to initialise the SDK, due to improper token handling
- Type
- boolean
(static) load()
Load the Cloudonix Web SDK SIP Libraries and bootstrap the basic data models
(static) requestRegFreeToken()
Request a RegfreeDialing Token from Cloudonix backend
- Deprecated:
- - DO NOT USE THIS FUNCTION IN PRODUCTION!!! IT IS PROVIDED AS A LEARNING TOOL ONLY!!!
(static) setAutoGainControl()
Enable the WebRTC Auto-Gain Control module (Default: Enabled)
(static) setCloudonixApiEndpoint(cloudonixApiEndpoint)
Set the Cloudonix API.Core Endpoint
Parameters:
Name | Type | Description |
---|---|---|
cloudonixApiEndpoint |
string | Cloudonix HTTP/HTTPS API Endpoint URL |
(static) setCloudonixWssEndpoint(websocketEndpoint)
Set the Cloudonix SIP over WebSocket Endpoint
Parameters:
Name | Type | Description |
---|---|---|
websocketEndpoint |
string | SIP over WebSocket URI |
(static) setCredentials(domain, username, password) → {boolean}
Set the SDK for credentials based operations (SIP username/password usage)
Parameters:
Name | Type | Description |
---|---|---|
domain |
string | The Cloudonix Domain of the subscriber |
username |
string | The assigned subscriber username |
password |
string | The assigned subscriber password |
Returns:
Returns false on missing or invalid input
- Type
- boolean
(static) setDebug()
Set SDK to Debug mode
(static) setEchoCancel()
Enable the WebRTC Echo Cancelling module (Default: Enabled)
(static) setNoiseSuppression()
Enable the WebRTC Noise Suppression module (Default: Enabled)
(static) setRegFree(domain, username, apikey)
Set the SDK for RegFreeDialing based operations (Single Time Token).
more information can be obtained at [https://cloudonix.io/wp-content/uploads/2018/12/Cloudonix-Registration-Free-Dialing.pdf]
Parameters:
Name | Type | Description |
---|---|---|
domain |
string | The Cloudonix Domain of the subscriber |
username |
string | The assigned subscriber username |
apikey |
string | The Cloudonix assigned apikey for RegFree dialing |
- Deprecated:
- - DO NOT USE THIS FUNCTION IN PRODUCTION!!! IT IS PROVIDED AS A LEARNING TOOL ONLY!!!
(static) setRegFreeToken(domain, username, regfreeToken)
Set the SDK for RegFreeDialing based operations (Single Time Token).
more information can be obtained at [https://cloudonix.io/wp-content/uploads/2018/12/Cloudonix-Registration-Free-Dialing.pdf]
Parameters:
Name | Type | Description |
---|---|---|
domain |
string | The Cloudonix Domain of the subscriber |
username |
string | The assigned subscriber username |
regfreeToken |
string | The Cloudonix provided single time token for RegfreeDialing |
(static) setStunServers(stunServerObject) → {array}
Add a new STUN/TURN server configuration or use the default one.
Parameters:
Name | Type | Description |
---|---|---|
stunServerObject |
object | A JSON object representing a STUN server, eg. { url: 'stun:stun.google.com:19302' } |
Returns:
The current STUN/TURN servers list
- Type
- array
(static) sipRegister()
SIP REGISTER using the credentials, provided by the Cloudonix Token.
(static) sipSendDtmfTone(c)
Send a DTMF tone to the remote server
Parameters:
Name | Type | Description |
---|---|---|
c |
char | A character, representing the DTMF tone to send (0-9#*) |
(static) sipStartCall(destination, myMetadata)
Start a SIP call to the destination and add additional meta-data
Parameters:
Name | Type | Description |
---|---|---|
destination |
string | A remote phone number (or Cloudonix assigned Application DNID) |
myMetadata |
array | An array of objects, in the format as key:value pairs |
(static) sipStopCall()
Stop and active call and hangup
(static) sipToggleMute()
Mute/Unmute my audio stream
(static) sipUnRegister()
SIP Unregister
(static) startRingbackTone()
Starting playing the local ring-back tone. Normally, associated with the onSessionConnecting callback.
(static) startRingTone()
Starting playing the local ringing tone (inbound call). Normally, associated with the onSessionConnecting callback.
(static) stopRingbackTone()
Starting playing the local ring-back tone. Normally, associated with the onSessionConnected or onSessionTerminated callback.
(static) stopRingTone()
Stop playing the local ringing tone (inbound call). Normally, associated with the onSessionConnected or onSessionTerminated callback.
(static) unsetAutoGainControl()
Disable the WebRTC Auto-Gain Control module
(static) unsetEchoCancel()
Disable the WebRTC Echo Cancelling module
(static) unsetNoiseSuppression()
Disable the WebRTC Noise Suppression module