I am using Amazon Connect Streams API [https://github.com/amazon-connect/amazon-connect-streams/blob/master/Documentation.md] and we have different call status in Amazon Connect e.g. call connected, call missed/no answered!
how can i get call status of the following call dispositions (busy, connected, in progress, ringing, no answered) from within Streams API?
I am using
function subscribeToContactEvents(contact) {
console.log("Subscribing to events for contact");
contact.onMissed(handleOnMissed);
contact.onConnected(handleOnConnected);
contact.onEnded(handleOnEnded);
}
function handleOnMissed(contact){
console.log("[contact.onMissed] Call is Missed. Contact status is " + contact.getStatus().type);
}
function handleOnConnected(contact) {
console.log("[contact.onConnected] Call is ACW. Contact status is " + contact.getStatus().type);
}
function handleOnEnded(contact) {
console.log("[contact.onEnded] Call has ended. Contact status is " + contact.getStatus().type);
}
There are two steps to this, first you need to subscribe to agent events then you trigger based on things happening to the agent. So for example...
You can do similar subscribing to contact events.
Subscribing to events is covered here... https://github.com/amazon-connect/amazon-connect-streams/blob/master/Documentation.md#event-subscription