View Only

Discussion Thread View
  • 1.  IAddin - How to get the current session

    Posted 11-15-2013 09:06
    Hi! I tried to get the current session for an Client-AddIn this way for CIC 4.0 SU3: using ININ.InteractionClient.AddIn; namespace MyAddIn { public class Main : IAddIn { public void Load(IServiceProvider serviceProvider) { m_Notification = (INotificationService)serviceProvider.GetService(typeof(INotificationService)); m_Notification.Notify("Add-In \"MyAddin\" loaded.", "OK", NotificationType.Info, TimeSpan.FromSeconds(10)); Session _session = (Session)serviceProvider.GetService(typeof(Session)); } } } Everything is fine but there is no class "Session" in ININ.InteractionClient.AddIn !!! So... how do I get the current session in an AddIn (without creating a new session using the IceLib-API)? Thanks, Robert

  • 2.  RE: IAddin - How to get the current session

    Posted 11-16-2013 01:43
    You need the icelib sdk license in order to get the session, I have an example here where I'm doing the same thing and as long as I have the license it works fine. https://github.com/InteractiveIntelligence/Plantronics/blob/master/PlantronicsClientAddIn/AddIn.cs

  • 3.  RE: IAddin - How to get the current session

    Posted 11-21-2013 09:59
    Hi KevinG! I tried to do it your way but I can't get the session. I verified that the CIC has the IceLib SDK license. That's my test code: using System; using ININ.InteractionClient.AddIn; using ININ.IceLib.Connection; namespace AddIn_SessionTest { public class Class1 : IAddIn { Session m_Session = null; ITraceContext m_TraceContext = null; INotificationService m_Notification = null; /// /// The code here runs when the client loads the add-in. /// /// public void Load(IServiceProvider serviceProvider) { m_TraceContext = (ITraceContext)serviceProvider.GetService(typeof(ITraceContext)); m_TraceContext.Status("AddIn \"AddIn_SessionTest\":\nGetting Notification service."); m_Notification = (INotificationService)serviceProvider.GetService(typeof(INotificationService)); //must have the IceLib SDK license to get the session as a service try { m_TraceContext.Status("AddIn \"AddIn_SessionTest\":\nGetting Session..."); m_Session = (Session)serviceProvider.GetService(typeof(Session)); // register to user status changes only if we have a session!!! if (m_Session != null) { m_TraceContext.Status("AddIn \"AddIn_SessionTest\":\nGetting Session: OK"); } else { m_TraceContext.Warning("AddIn \"AddIn_SessionTest\":\nGetting Session: Failed"); } } catch (Exception exc) { m_TraceContext.Error("AddIn \"AddIn_SessionTest\":\nException: getting Session: Failed\nMessage: " + exc.Message); } } /// /// Called by Client when the AddIn is about to be unloaded, e.g. in case of Client exit /// public void Unload() { } } } In ININ Log Viewer I got the following messages for Topic "IceLib_Custom": N Tracing.TraceStatus : AddIn "AddIn_SessionTest": Getting Notification service. 10:46:33.3888295_0000 IceLib_Custom 0x2490 41 N Tracing.TraceStatus : AddIn "AddIn_SessionTest": Getting Session... 10:46:33.3918295_0000 IceLib_Custom 0x2490 41 W Tracing.TraceWarning : AddIn "AddIn_SessionTest": Getting Session: Failed 10:46:33.3928295_0000 IceLib_Custom 0x2490 21 Is there any way to check by coding using the interface IAddIn if an IceLib SDK license is available? I guess not... Thanks, Robert

  • 4.  RE: IAddin - How to get the current session

    Posted 11-21-2013 16:37
    Looks right, what version 3.0/4.0 and su are you running?

  • 5.  RE: IAddin - How to get the current session

    Posted 11-22-2013 07:45
    It is a CIC 4.0 SU3. Thanks, Robert

  • 6.  RE: IAddin - How to get the current session

    Posted 11-22-2013 08:03
    ... in ININ Log Viever I have found the following entry: N AddInServiceProvider.GetService : An AddIn requested a type (ININ.IceLib.Connection.Session) that was not allowed 08:59:40.7373181_0000 AddIn 0x2eb8 0 But why it is not allowed??? Thanks, Robert

  • 7.  RE: IAddin - How to get the current session

    Posted 11-25-2013 03:17
    It is not allowed because it still doesn't see the license. Can you filter the log on I3_FEATURE_ICELIB_SDK and look at the request where the server is being queried for the license and check what is being returned?

  • 8.  RE: IAddin - How to get the current session

    Posted 12-02-2013 08:07
    Hi KevinG! I have not set the property to "don't copy" the included ININ.IceLib.dll to directory. Deleting the DLL in ...\ICUserApps\AddIns and now it is working :D Thanks, Robert

Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources