Genesys CTI User Forum > Genesys-related Development

Get TServerProtocol in WDE

(1/1)

Alyw:
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?

javiaf:
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!

daniel_san:
[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.

Navigation

[0] Message Index

Go to full version