Genesys CTI User Forum > Genesys-related Development
WDE ConnID
jvallejos:
Hi
???
How i can get ConnID from a WDE Extension?
PeteHoyle:
If you cast your interaction to an InteractionVoice you can get the ConnId
[code] if (interaction is IInteractionVoice)
{
IInteractionVoice iiv = interaction as IInteractionVoice;
string connId = interaction.TConnectionId;[/code]
jvallejos:
Thanks PeteHoyle ,
but dont work form mi
Error 4 'Genesyslab.Desktop.Modules.Core.Model.Interactions.IInteraction' no contiene una definición de 'TConnectionId'(NotFound) ni se encontró ningún método de extensión 'TConnectionId' que acepte un primer argumento de tipo 'Genesyslab.Desktop.Modules.Core.Model.Interactions.IInteraction' (¿falta una directiva de uso o una referencia de ensamblado?)
cavagnaro:
Well, obvious message, you need to add a reference to that DLL module...
jvallejos:
i have the reference for Genesyslab.Desktop.Modules.Core.Model.Interactions.IInteraction but TConnectionId is the problem
Later i fix do this
public void Initialize()
{
//aca se crea el listener para poder detectar las interaccions al momento de ejecurse
interactionManager.InteractionEvent += new EventHandler<EventArgs<IInteraction>>(interactionManager_InteractionEvent);
}
void interactionManager_InteractionEvent(object sender, EventArgs<IInteraction> e)
{
IInteraction interaction = e.Value;
switch (interaction.EntrepriseLastInteractionEvent.Id)
{
case EventEstablished.MessageId:
if (interaction is IInteractionVoice)
{
IInteractionVoice iiv = e as IInteractionVoice;
//i try next to sentences
MessageBox.Show("El ConnId es:" +iiv.TConnectionId);
// MessageBox.Show("El ConnId es:" +iiv.TConnectionId.ToString());
}
break;
}
}
But i found this Exception
Application.DispatcherUnhandledException
System.Reflection.TargetInvocationException: Se produjo una excepción en el destino de la invocación. ---> System.NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.
en Genesyslab.Desktop.Modules.Custom.CustomModule.interactionManager_InteractionEvent(Object sender, EventArgs`1 e)
en System.EventHandler`1.Invoke(Object sender, TEventArgs e)
Navigation
[0] Message Index
[#] Next page
Go to full version