Skip to main content

Additional Constants

Log Levels

These constants are defined in the CloudonixSDKClient class and are used as the parameter to the CloudonixSDKClient.setLogLevel() API to set which log messages the Cloudonix Mobile SDK will send to the application using the onLog event (and p ossible output to the platform log, depending on the DISABLE_PLATFORM_LOGS setting).

LOG_LEVELDescription
LOG_LEVEL_OFFDisable log generation completely
LOG_LEVEL_ERROREnable log generation for severity level of error
LOG_LEVEL_WARNEnable log generation for severity level for the following severity levels: ERROR, WARNING
LOG_LEVEL_DEBUGEnable log generation for severity level for the following severity levels: ERROR, WARNING, DEBUG
LOG_LEVEL_INFOEnable log generation for severity level for the following severity levels: INFO
LOG_LEVEL_VERBOSEEnable log generation for severity level for the following severity levels: VERBOSE
LOG_LEVEL_ALLEnable log generation for severity level for the following severity levels: ALL SEVERITY LEVELS

Network Address Translation Types

When the Cloudonix Mobile SDK determines the type of firewall or NAT set on the current active network connection, it will call the onNATTypeDetected event, passing it on of the values listed here.

These constants are defined in the IVoIPObserver.NATType enumeration and are defined in accordance to RFC 3489, section 5 STUN - Simple Traversal of User Datagram Protocol (UDP) Through Network Address Translators (NATs).

NAT_TYPE_UNKNOWN

The NAT type is unknown because the detection has not been performed yet or completed without successfully detecting any known configuration. The application shouldn't expect to get this event.

NAT_TYPE_ERR_UNKNOWN

The NAT type is unknown because there was a failure in the detection process, possibly because a STUN service was enabled by no server was configured or the configured server does not correctly support RFC 3489.

NAT_TYPE_OPEN

The Cloudonix Mobile SDK has detected that the current active network allows open access to the Internet, or possibly it has a firewall that behaves like a full-cone NAT, but without the translation.

NAT_TYPE_BLOCKED

The Cloudonix Mobile SDK has failed to communicate with any external server and has determined that network access (at least for UDP packets) is blocked.

NAT_TYPE_SYMMETRIC_UDP

The NAT is a Firewall that allows UDP transmission and responses have to come back to the source of the request (like a symmetric NAT) without translation.

NAT_TYPE_FULL_CONE

The NAT is a full cone NAT where all requests from the same internal IP address and port are mapped to the same external IP address and port. Servers can send a messages to the client by sending a them to the mapped external address.

NAT_TYPE_SYMMETRIC

The NAT is a symmetric NAT where all requests from the same internal IP address and port, to a specific destination IP address and port, are mapped to the same external IP address and port. If the client sends a message with the same source address and port, but to a different destination, a different mapping is used. Only the server that receives a message from the client can send back a response.

NAT_TYPE_RESTRICTED

The NAT is a restricted cone NAT where all requests from the same internal IP address and port are mapped to the same external IP address and port. Unlike a full cone NAT, a server can send a message to the client only if the client had previously sent a message to the server, to the specific IP address the server wants to send messages from.

NAT_TYPE_PORT_RESTRICTED

The NAT is a port restricted cone NAT, which is similar to a restricted cone NAT, but where the restriction includes port numbers. Specifically, a server can send a message to the client only if the client had previously sent a message to the server, to the specific IP address and port the server wants to send messages from.

Registration Status

When using the Cloudonix Mobile SDK in with the SIP registration workflow, the Cloudonix Mobile SDK will send onRegisterState() events to the application with the RegisterState value set to one of the following values:

REGISTRATION_SUCCESS

The Cloudonix Mobile SDK has completed registering with the SIP gateway and can now receive incoming calls using the SIP registration workflow.

REGISTRATION_UNREGISTERED

The Cloudonix Mobile SDK has successfully unregistered from the SIP gateway and will no longer receive incoming calls using the SIP registration workflow.

REGISTRATION_ERROR_CREDENTIALS

The Cloudonix Mobile SDK has failed to register with the SIP gateway because the credentials provided in the RegistrationData are incorrect.

REGISTRATION_ERROR_TIMEOUT

The Cloudonix Mobile SDK has failed to register with the SIP gateway as it did not get a response within the time specified by the REGISTRATION_TIMEOUT setting.

REGISTRATION_RESOLVE_ERROR

The Cloudonix Mobile SDK has failed to register with the SIP gateway as it cannot resolve the server host name provided in the RegistrationData serverUrl field.

REGISTRATION_SERVICE_UNAVAILABLE

The Cloudonix Mobile SDK has failed to register with the SIP gateway as the server sent back a response saying that it is unavailable.

REGISTRATION_ERROR_UNKNOWN

The Cloudonix Mobile SDK has failed to register with the SIP gateway due to an unknown or unexpected error.

SDK Licensing

When the Cloudonix Mobile SDK is activated using a provided license file, it will an onLicense event to the application with one of the values specified here in the LicensingState parameter.

LICENSING_SUCCESS

The Cloudonix Mobile SDK was successfully activated using a valid license key, and the application may now continue with setting up and configuring the SDK.

LICENSING_INVALID_KEY_ERROR

The license key that was provided is not a valid license key - it is likely malformed.

LICENSING_EXPIRED_KEY_ERROR

The license key that was provided has an expiration date that is in the past.

LICENSING_KEY_REVOKED_ERROR

The license key that was provided has been revoked.

Audio Routing

When the Cloudonix Mobile SDK detects a change in the way audio is routed in the device, it will send an onAudioRouteChange() event to the application with one of the values specified here in the AudioRoute parameter.

EARPIECE

Audio playback is now sent to the device's built-in primary speaker - usually a phone's ear piece.

SPEAKER

Audio playback is now sent to the device's secondary speaker - usually the phone's loud speaker.

BLUETOOTH

Audio playback is now sent to a speaker or headset connected to the device using a wireless Bluetooth connection.

HEADPHONES

Audio playback is now sent to a speaker or headset connected to the device using a wired connection.

Bluetooth Status

When the Cloudonix Mobile SDK detects a Bluetooth connection (or disconnection), it will send an onAudioRouteChange() event to the application with one of the values specified here in the BluetoothState parameter.

BLUETOOTH_CONNECTED

A Bluetooth connection has been established to a Bluetooth headset.

BLUETOOTH_DISCONNECTED

The Bluetooth connection to the headset has been terminated.