This is my first post here and also my first interaction with WDE development. So far, what I discovered is great but right now I’m having quite of an issue and I have no idea where to look for some answers and maybe there is someone over here who can help me a bit.
I developed a module which intercepts 2 events through InsertCommandToChain - AnswerCall and MakeCall.
The commands are inserted like this:
commandManager.InsertCommandToChainOfCommandBefore("InteractionVoiceAnswerCall", "AnswerCall", new List<CommandActivator>()
{
new CommandActivator() { CommandType = typeof(AnswerCallCommand) }
});
commandManager.InsertCommandToChainOfCommandBefore("MediaVoiceMakeCall", "MakeCall", new List<CommandActivator>()
{
new CommandActivator() { CommandType = typeof(MakeCallCommand) }
});
If I make a call from WDE or if I answer the call from the WDE interface, both my commands are being executed which is great and it means that I did what I was supposed to do but if I make a call from the softphone which is connected to WDE (for dev purposes) or if I answer a call from the same softphone, none of the events are being triggered. But, what is strange is that if I answer from the softphone or make a call from the softphone, the WDE interface takes over so this means (from my point of view) that the integration works.
Looking through the log files I’ve seen that in case of the WDE usage for the calling interaction I get something like this:
INFO utingBasedMediaVoice - Request:‘MakeCall’ Location:‘’ CallNumber:‘XXXX’ Target:‘XXXX’ Target Type:‘TypeDestination’
Because the MakeCall chain depends on RequestMakeCall which is in general generated by the WDE itself. In case, using any 3RD party SE, this request will missing and just the EventDialing is generated. This is the same behaviour like if someone on PBX use HW telephone directly without using application, then just the events are generated, not the requests. Read about Genesys call model…
You are monitoring MakeCall but that event isn’t happening in a Manual call, therefore you need to monitor the correct event so WDE can listen to it and then you act via your code
b) in the event handler I’m able to catch the EventDialing which is triggered regardless of the place from where the dialing takes place (softphone or WDE):
IInteraction interaction = eventArgs.Value;
if (interaction != null && interaction is IInteractionVoice)
{
IInteractionVoice interactionVoice = interaction as IInteractionVoice;
switch (interactionVoice.EntrepriseLastInteractionEvent.Id)
{
case EventDialing.MessageId:
MessageBox.Show(interactionVoice.PhoneNumber);
break;
}
}
Everything is great now but how can I get to the received call event? (I think I have to read a bit more but if anyone have any hints, please help).
EventRinging instead of EventDialing for a receiving call (or even EventEstablished for when the call is actually connected - for both incoming and outgoing calls)
Thank you very much. I will try this tomorrow morning because right now the line was closed.
Thank you also for the idea with the other event but I will stick with the EventDialing and EventRinging because I have to open a window with some information before the connection has been established.