Skip to main content

Flags

The following configuration keys are used with the CloudonixSDKClient.setConfig() API call to configure various behavior of the Cloudonix Mobile SDK. These keys are defined in the IVoIPObserver.ConfigurationKey enum.

To use these keys with the setConfig() API, pass the required key as the first argument to the API call, and set the second argument to a string value - according to the following rules:

  • For setting flags, set the value to either "0" to disable or "1" to enable.
  • For numeric field set the value to a decimal string representation of the required value.
  • Otherwise just set the string value to the requierd text .

General Configuration

The following configuration keys are used to control the general behavior of the Cloudonix Mobile SDK.

USER_AGENT

Set the SIP User Agent display string for your mobile application. The default value is "CloudonixSDK/<version>"

LOG_LEVEL

Deprecated. Use CloudonixSDKClient.setLogLevel() instead.

ALLOW_MULTIPLE_CALLS

A flag to enable or disable support for receiving or making additional calls while a call is already in progress. Support for multiple calls nominally requires the application to support holding and unholding calls. The default value is enabled.

DISABLE_PLATFORM_LOGS

A flag to disable output of Cloudonix Mobile SDK logs to the platform's "native" log mechanism - i.e standard output on iOS and logcat on Android. If this flag is set, then the Cloudonix Mobile SDK will not output platform logs. Regardless whether this flag is set, all logs are also delivered to the application using the onLog event.

STUN and TURN Configuration

The following configuration keys are used to control the STUN and TURN client of the Cloudonix Mobile SDK when it is used to detect Firewalls and other NATs and to perform "NAT traversal".

The Cloudonix Mobile SDK does not require either STUN or TURN service to operate correctly. This configuration is provided for backward compatibility. It is no longer required for normal operations.

ENABLE_STUN

A flag to enable or disable using STUN for NAT traversal. The default value is disabled.

STUN_SERVER

Sets a STUN server for use when the STUN protocol is enabled. This setting can be set multiple times to add additional STUN servers for the Cloudonix Mobile SDK to try when performing STUN-assisted client NAT detection. The default value is that no STUN server is set.

ENABLE_TURN

A flag to enable or disable using TURN for NAT traversal. The default value is disabled.

TURN_SERVER

The address of the TURN service to use, if TURN is enabled. There's no default value.

TURN_PORT

The port number to use to access the TURN server. The default value is 3478.

USE_TCP_FOR_TURN

A flag to set whether to use TCP to access the TURN service instead of UDP. The default value is disabled.

TURN_REALM

The TURN server REALM to use for TURN services. The default value is "cloudonix".

TURN_USER

The TURN username to authenticate with the TURN server. There is no default value.

TURN_PASSWORD

The TURN password to authenticate with the TURN server. There is no default value.

Codec and Media Settings

The following configuration keys are used to control the media processing of the Cloudonix Mobile SDK.

PLAYBACK_LATENCY

Sets the size of the playback audio buffer, in milliseconds. The default value is 140.

CAPTURE_LATENCY

Sets the size of the recording buffer, in milliseconds. The default value is 140.

USE_OPUS

A flag to enable or disable the OPUS codec. Opus is the default codec used by the Cloudonix platform, and it is recommended not to disable it. The default value is enabled.

USE_G722

A flag to enable or disable the G722 codec. The default value is disabled.

USE_G711

A flag to enable or disable the G711 (alaw) codec. The default value is disabled.

USE_ILBC

A flag to enable or disable the ILBC codec. The default value is disabled.

MIN_RATE

Sets the minimal sample rate for recoding and playback, in Hz. The actual sample rate will be determined automatically by the Cloudonix Mobile SDK through network bandwidth negotiation. The rate set here must be equal or smaller than the maximum rate set, and at least 8000. The default value is 8000.

MAX_RATE

Sets the maximum sample rate for recoding and playback, in Hz. The actual sample rate will be determined automatically by the Cloudonix Mobile SDK through network bandwidth negotiation. The rate set here must be equal or larger than the minimal rate set, and at most 48000. The default value is 24000.

MEDIA_RESET_TIMEOUT

Sets the amount of time, in seconds, for an active call to wait when not receive any media from the remote side, before renogitating the media configuration (i.e. sending a "re-INVITE"). The default value is 4.

NO_MEDIA_PERIOD

Sets the amount time, in seconds, to allow an active call without receiving any media from the remote side. When this timeout expires, the call disconnects. The default value is 30.

LOG_CALL_MEDIA_STATISTICS

A flag to enable or disable the periodic logging of network media statistics (such as latencies and buffer behavior), every 30 seconds, while the call is active. This is the same statistical information as can be retrieved using the CloudonixSDKClient.getStatistics() method call, but will be delivered periodically using the onLog event (as well as output to the platform log, if that feaure is not disabled). The default value is enabled.

USE_AGC

Deprecated. Automatic recording gain control is set by the Cloudonix Device Licensing and Configuration service, automatically based on the device's hardware.

NS_TYPE

Deprecated. Noice suppression is set by the Cloudonix Device Licensing and Configuration service, automatically based on the device's hardware.

EC_TYPE

Deprecated. Noice suppression is set by the Cloudonix Device Licensing and Configuration service, automatically based on the device's hardware.

Network and Protocol Settings

The following configuration keys are used to control the networking and SIP behavior of the Cloudonix Mobile SDK.

NAME_SERVER

Sets a static name server (DNS) for the Cloudonix Mobile SDK to use when resolving the SIP gateway name (from the RegistrationData configuration). The default value is to use the Google open DNS servers for both IPv4 and IPv6 name resolution. This configuration can be set multiple times where the first time it is used it removes the default list of name servers and replaces it with the specified name server, and additional setting of this configuration will add the specified name server to the list.

The name server configuration in the Cloudonix Mobile SDK is not changed after initialization and does not reflect the configuration of the current active network connection. To use the local name services on the current active network connection, see the USE_LOCAL_NAME_SERVERS setting below.

ENABLE_NAT

A flag to enable or disable the client-side NAT detection mechanism of the Cloudonix Mobile SDK. The default vaule is enabled.

ENABLE_ICE

A flag to enable or disable ICE negotiation. The default value is enabled.

TSX_TIMER

Sets the SIP timeout for an initiated transaction, in milliseconds. Normally, associated with the INVITE method, providing a timeout for which if an INVITE transaction isn’t completed will cancel the transaction. The default value is 5000.

TLS_NEGOTIATION_TIMEOUT

Sets the connection negotiation timeout for TLS connetions, in milliseconds. This setting controls how long the Cloudonix Mobile SDK will wait for the underlying TCP connection establishment, certificate verification and key negotiation. This value cannot be set higher than the SIP_NEGOTIATION_TIMEOUT value. The default value is 1500.

SIP_NEGOTIATION_TIMEOUT

Sets the connetion negotiation timeout for the SIP INVITE (starting a call) operation, in milliseconds. This settings controls how long the Cloudonix Mobile SDK will wait, after seding the INVITE message, for the remote server to return a privisional response - this is mostly relevant only when using the UDP transport. The default value is 5000.

KEEP_ALIVE_INTERVAL

Sets the SIP keep alive interval, in seconds. SIP keep alive is performed by the Cloudonix Mobile SDK sending a SIP OPTIONS messages to the remote gateway. The default value is 300.

REGISTRATION_TIMEOUT

Sets the SIP registration refresh interval, in seconds. This setting is used in the SIP registration workflow only, to maintain a registration with the remote SIP gateway. The default value is 300.

DISABLE_REGISTRATION_REFRESH

A flag to disable the re-registration retries of the Cloudonix Mobile SDK, when in SIP registration workflow. Normally the Cloudonix Mobile SDK will try to register to the remote SIP gateway (only in SIP registration workflow) and if that fails - it will retry again every 30 seconds. Setting this flag will disable that behavior.

UNREGISTER_ACCOUNT_ON_NETWORK_ERROR

A flag to enable or disable whether the Cloudonix Mobile SDK will handle SIP account setup errors (such as an invalid configuration) by "unregistering" - which generally means not trying to re-register and sending the onRegisterState event with one of the registration error values. The default value is disabled (i.e. account setup errors will cause the Cloudonix Mobile SDK to retry registration after a delay).

DISABLE_SECURE_SIPS

A flag to disable using the "sips" URI schema when using the secure TLS transport, as some SIP gateway implementations do not support it. Setting this flag will disable the usage of the “sips” schema, indicating use of TLS only via the ‘transport=tls’ SIP header flag. By default this flag is set, i.e. the Cloudonix Mobile SDK always uses the "sip" URI scheme, even for the secure TLS transport.

IOS_BACKGROUND_SOCKETS

A flag to enable or disable the use of iOS active background sockets. This iOS feature for allowing VoIP applications to make calls was introduced in iOS 6, was deprecated with the introduction of PushKit, and was removed in iOS 16. The default value is set automatically by the Cloudonix Mobile SDK for iOS according to the iOS version and should not be changed unless the application requires the non-default behavior.

USE_LOCAL_NAME_SERVERS

A flag to enable or disable the use of the operating system name resolution services - which should use the local name server set on the currently active network connection - instead of the global name servers (the default name servers or as configured with the NAME_SERVER setting).