Skip to main content

CloudonixSDKClientListener

The CloudonixSDKClientListener protocol should be implemented by the application to receive events from the Cloudonix Mobile SDK - such as call progression events. The application must register at least one such implementation using the CldouonixSDKClient.addListener() method. The Cloudonix SDK will then call methods on the IVoipObserver implementation to notify the Application on events that the application may wish to take action on, such as an incoming call.

Events

onSipStarted()

Called when the SIP stack has been successfully started following a call to setConfiguration().

onSipStartFailed(NSString* error)

Called if the SIP stacked failed to start due to some unexpected error - the error message is provided as the first argument of the event handler.

onSipStartFailed()

Called if the SIP stacked failed to start due to some unexpected error (consult the logs for the error details).

onSipStopped()

Called when the SIP stack has stopped.

onRegisterState(CloudonixRegistrationState_e state, int expiry)

Called when the registration state of the SIP stack has changed (when using the “SIP Registration” workflow). If the state provided is REGISTRATION_SUCCESS, then the second parameter will be set to how long is the registration expected to be maintained by the server before needing to be renewed (the SIP registration will be automatically renewed by the Cloudonix SDK SIP service).

onCallState(NSString* callId, CloudonixCallState_e state, NSString* remoteUri)

Called when a new call starts (either from a local or remote dial) and whenever an active call state changes.

onLog(int level, NSString* message)

Called when the Cloudonix SDK generates a log message. The application is expected to output the generated log (possibly after discarding events with too high logging level) to some storage or reporting mechanism.

onNetworkLost()

Called when the Cloudonix SDK detected that IP connectivity was lost.

onNetworkChanged()

Called when the Cloudonix SDK detected that the device IP address has changed.

onNetworkRegained()

Called when the Cloudonix SDK detected that IP connectivity was regained after it was lost.

onNATTypeDetected(NATType type)

Called when the Cloudonix SDK finishes NAT detection after detecting a network IP change.

onDestroyMediaSession()

Called after a call is disconnected and its media session is disconnected and closed.