Mountain View
Jabber SDK API Documentation

Tutorial: Connect To Softphone

Connect To Softphone

Title In order to connect SoftPhone to CUCM , first softphone device needs to be identified from the list of telephony devices associated to the user:

        // Retrieve telephony device list from telephony controller.
        var deviceList =  cwic.TelephonyController.telephonyDevices;
        var softphone;

        // In this example we'll take first softphone from telephony device list we encounter
        for(var index = 0; index < deviceList.length; ++index)
        {
            if(deviceList[index].controlMode = "Softphone")
            {
                softphone = deviceList[index];
                break;
            }
        }
    
Connecting SoftPhone with CUCM is done through SoftPhone.connect method. Generally, device can be connected to CUCM only from single client/machine. Thus, if connecting same device to CUCM from another client/machine, CUCM will reject connection attempt. However, if connecting device with forced registration, connection attempt will be accepted by CUCM. In the snippet below force registration will be used to connect softphone with CUCM:

         var forceRegistration = true;
         softphone.connect(true);
     
After this softphone device will be successfully connected with CUCM.
For information on how to track device's connection state with CUCM or if connection fails for some reason please see Handle CUCM Connection State Change tutorial.

Next

Previous