public InteractionManager(Session session, IQueueService queueService, ITraceContext traceContext)
        {
            _traceContext = traceContext;
            _interactionManager = InteractionsManager.GetInstance(session);
            _queueService = queueService;

            //We could use icelib to get the queue and interactions, but the AddIn API wraps things up to be a little simpler to use.
            _myInteractionsQueue = _queueService.GetMyInteractions(new[] { InteractionAttributes.State });
        }
        public InteractionSyncManager(IInteractionManager interactionManager, IDeviceManager deviceManager, IQueueService queueService, ITraceContext traceContext, IConnection connection)
        {
            _interactionManager = interactionManager;
            _deviceManager = deviceManager;
            _traceContext = traceContext;

            _connection = connection;
            _connection.UpChanged += OnConnectionUpChanged;

            _deviceManager.CallAnsweredByDevice += OnCallAnsweredByDevice;
            _deviceManager.CallEndedByDevice += OnCallEndedByDevice;
            _deviceManager.MuteChanged += OnMuteChangedByDevice;
            _deviceManager.OnCall += OnOnCall;
            //    _deviceManager.TalkButtonPressed += OnTalkButtonPressed;
            _deviceManager.TalkButtonHeld += OnTalkButtonHeld;

            _myInteractions = queueService.GetMyInteractions(new[] { InteractionAttributes.State, InteractionAttributes.Muted });
            _myInteractions.InteractionAdded += OnInteractionAdded;
            _myInteractions.InteractionChanged += OnInteractionChanged;
            _myInteractions.InteractionRemoved += OnInteractionRemoved;
        }