Hi All
Following the example to integrate CIF with Twilio here: https://github.com/microsoft/Dynamics365-Apps-Samples/tree/master/customer-service/channel-integration-framework/TwilioSampleInteg_version2
I have built the sales application but having issues with the JS file:
I have traced the issue back to no sessions id in the line:
Microsoft.CIFramework.createSession(inputBag).then(
(sessionId) => {
var sessionPh = new SessionInfo(PhoneState.Dialing, sessionId);
}
The sessionId is always null (full code below). Its not generating an error, just no sessionId. I cannot seem to find any other posts regarding this issue.
function ongoingCall() {
debugger;
var sess = phone.listOfSessions.get(phone.currentCallSessioId);
if (sess == null || sess === undefined) {
var inputBag = {
"templateName": "TwilioCallSessionTemplate", "templateParameters": {}, "customerName": phone.name
};
Microsoft.CIFramework.createSession(inputBag).then(
(sessionId) => {
var sessionPh = new SessionInfo(PhoneState.Dialing, sessionId);
sessionPh.name = phone.name;
log("Dialing " sessionPh.name);
$('#callNotesField').text("");
phone.listOfSessions.set(sessionId, sessionPh);
phone.currentCallSessioId = sessionId;
sessionPh.isOldSession = false;
sessionPh.state = PhoneState.Ongoing;
},
(error) => {
log("Error in session creation for dialing " sessionPh.name);
});
}
else {
sess.isOldSession = true;
sess.state = PhoneState.Ongoing;
}
}