Author Topic: RequestDistributeUserEvent  (Read 212 times)

Offline mzak2

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
RequestDistributeUserEvent
« on: March 13, 2019, 01:55:23 AM »
Hello. Does anybody know how to send messages from Workspace Desktop Environment API to TServer (like RequestDistributeUserEvent), without using Platform sdk API?
I mean, to use already opened in WDE connections: WDE <-> TServer?
Thank you.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2555
  • Karma: 42
Re: RequestDistributeUserEvent
« Reply #1 on: March 13, 2019, 08:45:11 PM »
You can get the responsible "module" via Unity (IoC, DI) and use this existing code instead of writing own implementation. from your topic is not clear what is your goal and what you want to exactly achieve - may be there is another "oob" way how to achieve that.
Genesys certified professional consultant (GVP, SIP, GIR and Troubleshooting)

Offline mzak2

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: RequestDistributeUserEvent
« Reply #2 on: March 13, 2019, 10:07:22 PM »
The goal is to develop a custom WDE module that sends RequestDistributeUserEvent in HA environment. No problem with single TServer.
Trying to use a new WarmStandbyService(tServerProtocol) in the module according to the 'Connecting to a Server' chapter from PSDK docs does not work.
An idea was to reuse an already existing in WDE WarmStandbyService without creating a new one. Thanks.

Offline Leon

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: RequestDistributeUserEvent
« Reply #3 on: March 13, 2019, 11:00:38 PM »
You could use the IAgent using DI, IAgent contain the voice channel in the propertie FirstMediaVoice :

Code: [Select]

public SomeClass(IAgent agent)
{
if (agent.FirstMediaVoice != null)
{
CommonProperties userEvent = CommonProperties.Create();
RequestDistributeUserEvent distributeUserEvent = RequestDistributeUserEvent.Create("SomeValue", userEvent);
agent.FirstMediaVoice.Channel.Protocol.Request(distributeUserEvent);
}
}

Offline mzak2

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: RequestDistributeUserEvent
« Reply #4 on: March 14, 2019, 12:37:59 AM »
It works!
Thank you very much!