Mountain View
Jabber SDK API Documentation

Tutorial: Handle CUCM Connection State Change

Handle CUCM Connection State Change

Title In order to be notified when Telephony Device's connection state has changed following event handler must be set: Once the event is fired, either TelephonyController.connectionState property can be read to retrieve new connection state or value that is passed with event can be used:

        function onConnectionStateChanged(connectionState)
        {
            var newConnectionState = connectionState
            // Alternatively:
            // var newConnecitonState = cwic.TelephonyController.connectionState

            if(newConnectionState === "Connected")
            {
                // Handle "Connected" state...
            }

            if(newConnectionState === "Connecting")
            {
                // Handle "Connecting" state...
            }

            if(newConnectionState === "Disconnected")
            {
                // Handle "Disconnected" state...
            }
        }
    
One thing to note is that connection state is global. This doesn't represent state per device but state that is shared between all devices. If any of user's devices is connected to CUCM, connection state will be "Connected". This applies for other connection states as well.

Next

Previous