Author Topic: Softphone connected to WDE 8.5.1 doesn't trigger any voice chain of commands  (Read 3297 times)

Offline gogupandele

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Hello everyone,


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:

[code]
commandManager.InsertCommandToChainOfCommandBefore("InteractionVoiceAnswerCall", "AnswerCall", new List<CommandActivator>()
            {
                new CommandActivator() { CommandType = typeof(AnswerCallCommand) }
            });

            commandManager.InsertCommandToChainOfCommandBefore("MediaVoiceMakeCall", "MakeCall", new List<CommandActivator>()
            {
                new CommandActivator() { CommandType = typeof(MakeCallCommand) }
            });
[/code]

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'

and after that I see

17-10-09 16:48:35.969 [            42] INFO  e.InteractionManager - [InteractionEvent] received InteractionId:Id000(new) Id:007702A4D06094E6 ContextState:Created Profile:Primary State:PresentedOut(EventDialing ReferenceId:6) RelatedId:? MediaType:voice Direction:Out ThisDN:1030 OtherDN:XXXXXX CorrelatorData:

But if I make the calling from the softphone, I see only the second entry in the log.

Can someone please tell me what am I missing?

Thank you.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2752
  • Karma: 44
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...

Offline gogupandele

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Thank you very much. Can you please give me a link to that documentation  (call model)? Thank you

Trimis de pe al meu SM-G935F folosind Tapatalk


Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
You may wanna try NetworkReached or ConnectionEstablished


Check TServer logs for better understanding on which events are fired

Offline gogupandele

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Thank you very much for your answers but I think Im missing something here.

So, first of all, shall I understand that it cannot be done using only the WDE api? Do I have to dig  into the enterprise sdk or somehting simillar?

Thank you

Trimis de pe al meu SM-G935F folosind Tapatalk


Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
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

Offline hsujdik

  • Hero Member
  • *****
  • Posts: 541
  • Karma: 30
Take a look on Genesyslab.Desktop.Modules.Core.Model.Interactions.InteractionManager

Specifically, the event handler InteractionEvent -> InteractionEventArgs -> ESDKInteraction -> IHeader -> CurrentContext -> msg


Also, take a look on Events and Models Reference Manual:
https://docs.genesys.com/Special:Repository/8g_ref_events-models.pdf?id=5fe793c7-6128-420d-8392-a75d473fd736


Offline gogupandele

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Hi,


I think I'm on a very good path here.

What I did is like this:

a) in the initialization method I hooked up to the InteractionEvent:

[code]IInteractionManager interactionManager = container.Resolve<IInteractionManager>();
            interactionManager.InteractionEvent += InteractionManagerOnInteractionEvent;[/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):

[code]
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;
                }
               
            }
[/code]

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).

Thousand thanks.

Offline hsujdik

  • Hero Member
  • *****
  • Posts: 541
  • Karma: 30
[quote author=gogupandele link=topic=10671.msg48448#msg48448 date=1507579097]
Hi,


I think I'm on a very good path here.

What I did is like this:

a) in the initialization method I hooked up to the InteractionEvent:

[code]IInteractionManager interactionManager = container.Resolve<IInteractionManager>();
            interactionManager.InteractionEvent += InteractionManagerOnInteractionEvent;[/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):

[code]
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;
                }
               
            }
[/code]

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).

Thousand thanks.
[/quote]

EventRinging instead of EventDialing for a receiving call (or even EventEstablished for when the call is actually connected - for both incoming and outgoing calls)

Offline gogupandele

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
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.

Thank you again.