In my Session_ConnectCompleted event I have code that looks like the below:
var attrs = new List<string> {InteractionAttributeName.State};
this.InteractionQueue.StartWatching(attrs.ToArray());
and later on I check state in various places, for example:
public bool IsOnCall
{
get
{
var onCall = (null != this.PhoneSession && null != this.CallInteraction
&& this.PhoneSession.ConnectionState == ConnectionState.Up &&
this.CallInteraction.State != InteractionState.ExternalDisconnect
&& this.CallInteraction.State != InteractionState.InternalDisconnect);
return onCall;
}
}
Sometimes and it seems sporadic, I get the below exception doing this:
Exception outermost view of call stack
--------------------------------------------------------------------------------
Exception type: ININ.IceLib.NotCachedException
Source: ININ.IceLib.Interactions
Source Assembly: ININ.IceLib.Interactions.DLL
Source Assembly Version: 0.0.0.0
Source Type: ININ.IceLib.Interactions.WatchedAttributeCache
Source Method: System.String GetAttributeAsString(System.String)
Debug Build?: True
Message: The requested object or attribute is not being watched. Name: Eic_State
Stack Trace:
at ININ.IceLib.Interactions.WatchedAttributeCache.GetAttributeAsString(String name)
at ININ.IceLib.Interactions.Interaction.GetWatchedStringAttribute(String attributeName)
at ININ.IceLib.Interactions.Interaction.get_State()
at TeamWorks.Shared.CTI.PhoneAgent.get_IsOnCall()
at TeamWorks.Shared.CTI.PhoneAgent.Call(DialInfo dialInfo)
I'm already watching State and there is no EIC State attribute as far as I can see. Any ideas on what might be causing this and how to resolve? Thanks