04-21-2024 09:28 PM - edited 04-21-2024 09:30 PM
In CCX 11.5, user.makeCall() always dialed a call but with 12.0 and 12.5, no call is dialed. Release notes say nothing about it - nothing in the logs either. Was this API deprecated from 11 to 12?
Solved! Go to Solution.
04-22-2024 12:36 AM - edited 04-22-2024 12:42 AM
Hey.
No it is still there.
Working example on 12.5
function makeCall (number) {
clientLogs.log("call to " + number);
user.makeCall(number, { success: makeCallSuccess, error: makeCallError });
}
function makeCallSuccess(rsp) { clientLogs.log("In makeCallSuccess"); }
function makeCallError(rsp) { clientLogs.log("In makeCallError"); }
But maybee your init is the "old" way:
Example on the 12.5 way (Can't remember when the init changed. In some api calls, the "old" way still works, but i have seen something isn't working)
init: function () {
var prefs = new gadgets.Prefs(),
id = prefs.getString("id");
var clientLogs = finesse.cslogger.ClientLogger; // declare clientLogs
gadgets.window.adjustHeight();
finesse.clientservices.ClientServices.init(finesse.gadget.Config);
clientLogs.init(gadgets.Hub, "MyGadget"); //this gadget id will be logged as a part of the message
user = new finesse.restservices.User({
id: id,
onLoad: handleUserLoad,
onChange: handleUserChange
});
containerServices = finesse.containerservices.ContainerServices.init();
containerServices.addHandler(finesse.containerservices.ContainerServices.Topics.ACTIVE_TAB, function () {
clientLogs.log("init(): Gadget is now visible and ready to use."); // log to Finesse logger
gadgets.window.adjustHeight();
});
containerServices.makeActiveTabReq();
}
04-22-2024 12:36 AM - edited 04-22-2024 12:42 AM
Hey.
No it is still there.
Working example on 12.5
function makeCall (number) {
clientLogs.log("call to " + number);
user.makeCall(number, { success: makeCallSuccess, error: makeCallError });
}
function makeCallSuccess(rsp) { clientLogs.log("In makeCallSuccess"); }
function makeCallError(rsp) { clientLogs.log("In makeCallError"); }
But maybee your init is the "old" way:
Example on the 12.5 way (Can't remember when the init changed. In some api calls, the "old" way still works, but i have seen something isn't working)
init: function () {
var prefs = new gadgets.Prefs(),
id = prefs.getString("id");
var clientLogs = finesse.cslogger.ClientLogger; // declare clientLogs
gadgets.window.adjustHeight();
finesse.clientservices.ClientServices.init(finesse.gadget.Config);
clientLogs.init(gadgets.Hub, "MyGadget"); //this gadget id will be logged as a part of the message
user = new finesse.restservices.User({
id: id,
onLoad: handleUserLoad,
onChange: handleUserChange
});
containerServices = finesse.containerservices.ContainerServices.init();
containerServices.addHandler(finesse.containerservices.ContainerServices.Topics.ACTIVE_TAB, function () {
clientLogs.log("init(): Gadget is now visible and ready to use."); // log to Finesse logger
gadgets.window.adjustHeight();
});
containerServices.makeActiveTabReq();
}
06-05-2024 04:59 AM
Thank you very much! user.makeCall() is indeed still there. Since I'm on UCCX, I changed the manner in which I import the Finesse library. Having a local copy leads to staleness, and I was shipping Finesse 10.5 with my gadget. No bueno. Instead, now, this always gets the latest version:
<script type="text/javascript" src="/desktop/assets/js/finesse.js"></script>
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