01-29-2023 09:45 PM
Hi,
We wanted to differentiate the call-end event from all participants vs the call-end event for a particular participant.
Let me explain by an example, let's say we have an inbound call between agent A and a customer, and then agent A direct transfers it to agent B. Now we want to differentiate that when agent A transferred the call, the call wasn't ended it was transferred to B however when agent B will end the call, it will end for all participants.
I have looked at dialog events and tried to use dialog state and event type for this purpose, but this approach doesn't work since the dialog event is different for various scenarios.
Best Regards,
Badar
01-30-2023 01:52 AM
Hi Badar,
you can verify combination of current agent extension against the dialog participants matching with device address and state as dropped
02-28-2023 01:23 AM
I know this is an old post..
handleEndDialog = function (dialog) {
callType = dialog.getCallType();
mediaType = dialog.getMediaType();
dialogUri = dialog.getDialogUri();
dialogState = dialog.getState();
getToAddress = dialog.getToAddress();
getFromAddress = dialog.getFromAddress();
var callVars = dialog.getMediaProperties();
var callParticipants = dialog.getParticipants()
for (var i = 0; i < callParticipants.length; i++) {
if (callParticipants[i]["mediaAddress"] === user.getExtension()) {
// The agent event
} else {
// Other call event
}
}
}
Hope that helps
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