Genesys CTI User Forum

Genesys CTI User Forum => Genesys-related Development => Topic started by: Alyw on May 16, 2016, 01:15:05 AM

Title: Get TServerProtocol in WDE
Post by: Alyw on May 16, 2016, 01:15:05 AM
I need to get a value from the user data in a specified event, so that I can decide what to be displayed in the WDE. How can I get the TServerProtocol in WDE?
Title: Re: Get TServerProtocol in WDE
Post by: javiaf on May 19, 2016, 12:31:42 PM
Hi Alyw,

Hope this helps. I guess you will have an IAgent object:

[i]IAgent agent[/i] (You can get it in any WDE registered class using DependencyInjection).

Afterwards, we check both, if FirstMediaVoice and Channel are not null... In that case, we can get the TServerProtocol.


[i]            if (agent.FirstMediaVoice != null)
            {
                channel = agent.FirstMediaVoice.Channel;
                if (channel != null)
                {
                    TServerProtocol tserver = (TServerProtocol)channel.Protocol;
                }
            }
[/i]

Regards!
Title: Re: Get TServerProtocol in WDE
Post by: daniel_san on June 03, 2016, 03:10:21 PM
[quote author=Alyw link=topic=9602.msg43352#msg43352 date=1463361305]
I need to get a value from the user data in a specified event, so that I can decide what to be displayed in the WDE. How can I get the TServerProtocol in WDE?
[/quote]

Why you need TServerProtocol to Show/Hide some part of WDE? Maybe you can try another way (more simple).

Regards.