Hi,
I am writing some code for the channel integration framework, using a softphone. The Microsoft.CIFramework.searchAndOpenRecords functions are working fine, but I can't seem to get the even handlers working, e.g. click to act and onpagenavigate.
This is the code I am using to start the handlers, but the listener is not starting at all. The initCTI is being written to the log, but nothing else happens. Any help would be appreciated. I am calling the function after the softphone has finished loading.
// JavaScript source code
export function pageNavigateHandler(eventData) {
console.log("eventFired")
console.log(eventData)
return Promise.resolve();
}
export default function initCTI() {
console.log("initCTI");
(function () {
window.addEventListener("CIFInitDone", function () {
console.log("handler startedtest");
Microsoft.CIFramework.addHandler("onpagenavigate", pageNavigateHandler);
console.log("Added handlers for the panel");
//Code that consumes CIF library APIs.
});
})();
}