Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: mzak2 on March 12, 2019, 04:55:23 PM

Title: RequestDistributeUserEvent
Post by: mzak2 on March 12, 2019, 04:55:23 PM
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.
Title: Re: RequestDistributeUserEvent
Post by: Kubig on March 13, 2019, 11:45:11 AM
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.
Title: Re: RequestDistributeUserEvent
Post by: mzak2 on March 13, 2019, 01: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.
Title: Re: RequestDistributeUserEvent
Post by: Leon on March 13, 2019, 02:00:38 PM
You could use the IAgent using DI, IAgent contain the voice channel in the propertie FirstMediaVoice :

[code]

public SomeClass(IAgent agent)
{
if (agent.FirstMediaVoice != null)
{
CommonProperties userEvent = CommonProperties.Create();
RequestDistributeUserEvent distributeUserEvent = RequestDistributeUserEvent.Create("SomeValue", userEvent);
agent.FirstMediaVoice.Channel.Protocol.Request(distributeUserEvent);
}
}[/code]
Title: Re: RequestDistributeUserEvent
Post by: mzak2 on March 13, 2019, 03:37:59 PM
It works!
Thank you very much!