Publish Cogito CTI events from the amazon-connect-streams softphone. This module will subscribe to agent and contact events using the amazon-connect-streams API and send them to the Cogito CTI API over HTTPS.
import * as cogito from '@cogitocorp/cogito-connect-streams';
// First init the conect streams API
connect.core.initCCP(phone, {
ccpUrl: instanceURL,
loginPopup: true,
loginPopupAutoClose: true,
region: "us-east-1",
softphone: {
allowFramedSoftphone: true,
disableRingtone: false,
ringtoneUrl: "./ringtone.mp3"
}
});
// Then init Cogito's API
cogito.initCogito({
apiUrl: cogitoRestURL,
clientId: cogitoClientId,
clientSecret: cogitoClientSecret,
tenant: 'cogito-dialog',
site: 'site1'
});