07-19-2022 11:43 PM
Hi Devnet Team,
Currently our customer has 3 cucm servers running on production with 1 publisher and 2 subscribers. Our customer using Jabber Web SDK for their Web Application and running on production environment with pointing to cucm publisher using setCUCMPServers("publisher_ip_address") function. If the cucm publisher server(publisher_ip_address) is down, their Web Application can't use all Jabber Web SDK functions and this is so critical for their business since they use for their 24x7 contact center.
For this case our customer can't using SRV because of conflict with another cucm cluster,so how the Jabber Web SDK can handle this issue ? Is it possible to use 3 cucm servers and the Jabber Web SDK can switch automatically and seamlessly to the another active cucm server when the cucm server that is being used by their Web Application is down ?
Solved! Go to Solution.
07-25-2022 10:54 AM
UDS should be present/running and OK to use on any CUCM node - so you can use others for failover.
FYI I updated this sample with (now successful) discovery failover behaviour, if you want to compare notes: https://github.com/ciscodevnet/jabber-web-sample
07-22-2022 06:40 AM
By "Jabber Web SDK" I assume you mean Jabber Voice/Video, correct? Not Jabber IM & Presence.
If so, then what you're load balancing and configuring for fail over are devices the same as if they were hard phones. Read the sections on load balancing and redundancy for the version you're using. For example, here's some documentation on version 10:
I can't find the same category of documentation for later versions, but I assume you have access to it already, since you have configured the cluster.
If what you're talking about is the web application (which is not something you can host on a Cisco CUCM server), that's not a CUCM server problem. That's a web hosting problem.
07-24-2022 07:01 PM
Yes, Jabber Web SDK Voice and Video. i don't know why but the Jabber Web SDK always pointing to one ip address, if the ip address is down the Jabber Web SDK will crash and stopped working.
07-22-2022 07:34 AM
Also, here's an old reply to a similar question about CUCM 8.6. I believe the principles are still the same, though.
07-22-2022 09:23 AM
Here's a previous thread covering this topic: https://community.cisco.com/t5/audio-and-video-endpoints/jabber-web-sdk-discover-failover/td-p/4561374
I did a bit of testing, and can confirm your observations - i.e. that for authentication/sign-in the SDK only attempts to use the first server provided via setCUCMServers(). I tried a workaround where upon receiving onAuthenticationError() would switch server to the backup:
function onAuthenticationError(error)
{
currentServer = (currentServer == cucmList.primary) ? cucmList.secondary : cucmList.primary;
cwic.LoginController.signOut();
cwic.LoginController.resetUserData();
cwic.LoginController.setCUCMServers([currentServer]);
var username = $UsernameField.val();
var password = $PasswordField.val();
cwic.LoginController.setCredentials(username, password);
cwic.LoginController.signIn();
}
The authentication would succeed and devices would be retrieved, but would never receive onSignedIn() and any attempt to register the the softphone resulted in connection error...
So, it appears there are some problems with the SDK in this area - or at minimum the docs incorrectly state (and the code indirectly implies) that backup discovery servers are supported.
As touched on in the thread linked above, perhaps you could test the UDS API responsiveness for primary/backup servers in your code before performing setCUCMServers(). You should be able to just GET something like this, which should return a 401 if UDS is functioning normally: https://sjds-cucm14.cisco.com:8443/cucm-uds/foo/dstaudt/devices?max=1
A few general thoughts:
07-24-2022 07:14 PM
i did the same workaround to the jabber web SDK like you did. you need to make sure the resetUserData() is succeed and clear the previous login data before you are login again.
UDS API is the part of CUCM API right ? so if we request to the API and then the response is OK, we can use that server to login Jabber Web SDK ?
We can't using DNS SRV because of conflict with another cluster CUCM.
07-25-2022 10:54 AM
UDS should be present/running and OK to use on any CUCM node - so you can use others for failover.
FYI I updated this sample with (now successful) discovery failover behaviour, if you want to compare notes: https://github.com/ciscodevnet/jabber-web-sample
07-26-2022 01:03 AM
the UDS API need CORS configured on the CUCM Web. If i add domain to the cors setting, is it any cucm service need to restart ?
i've been checked your code and still testing in our environment. thank you.
07-26-2022 08:28 AM
I don't recall having to restart any services when adding CORS domains, but it's been awhile since I tested it...
Note, that should only be necessary if you're going to ping the UDS URL youself via in-browser JavaScript - the Jabber add-on doesn't run in the browser context and shouldn't need CORS.
07-26-2022 09:46 AM
yes, i tried ping to the UDS URL via browser and always return the CORS Policy. how about the jabber-config.xml url ? is it possible to check the cucm server is active or not from that url ?
07-26-2022 10:36 AM
Any HTTP request from in-browser JS will require CORS (and I don't think you can enable CORS for config file download service...)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide