Mountain View
Jabber SDK API Documentation

Tutorial: Service Discovery

Service Discovery

Service Discovery Service discovery tries to automatically discover user' home cluster (automatic setup of CUCM, CTI and TFTP servers). A users’ home cluster is discovered by querying a Central UDS server in a given deployment. Query is formed by using domain provided in user's email address.
To start a service discovery call to LoginController.startDiscovery() method must be made:

        cwic.LoginController.startDiscovery();
    
But before service discovery starts following event handlers must be set:

        function onEmailRequired()
        {
            var email;

            //...
            // Prompt user for email here...
            //...

            cwic.LoginController.setEmail(email);
        }

        function onCredentialsRequired()
        {
            var username;
            var password

            // ...
            // Prompt user for credentials here...
            // ...

            cwic.LoginController.setCredentials(username, password);
        }

        cwic.LoginController.addEventHandler("onEmailRequired", onEmailRequired);
        cwic.LoginController.addEventHandler("onCredentialsRequired", onCredentialsRequired);
        cwic.LoginController.startDiscovery();
    
Once service discovery, "onEmailRequired" starts event will be fired. If email address is valid, "onCredentialsRequired" event will be fired. If user's credentials are valid, user will be signed in.

Next

Previous