void OnPayloadReceived(object sender, Misc.PayloadReceivedEventArgs e)
        {
            var msg = e.Payload;

            if (msg.EventType == "TIMER")
            {
                if (msg.Event == "CALL_START")
                {
                    Started?.Invoke(this, new EventArgs());
                }
                if (msg.Event == "CALL_START_PAUSE")
                {
                    Paused?.Invoke(this, new EventArgs());
                }
                if (msg.Event == "CALL_END_PAUSE")
                {
                    Unpaused?.Invoke(this, new EventArgs());
                }
                if (msg.Event == "CALL_END")
                {
                    Stopped?.Invoke(this, new EventArgs());
                }
                if (msg.Event == "CALL_CANCEL")
                {
                    Canceled?.Invoke(this, new EventArgs());
                }
            }
        }
        private void NotificationPayloadService_PayloadReceived(object sender, Misc.PayloadReceivedEventArgs e)
        {
            var msg = e.Payload;

            if (msg.EventType == "CALL")
            {
                if (msg.Event == "OPEN_CALL")
                {
                    CallRequested?.Invoke(this, new EventArgs());
                }
            }
        }
Exemple #3
0
        static void OnNotificationPayloadReceived(object sender, Services.Misc.PayloadReceivedEventArgs e)
        {
            var msg = e.Payload;

            if (msg.EventType == "TIMER")
            {
                if (msg.Event == "CALL_ASSIGN")
                {
                    OpenClientTimerPage();
                }
            }
            if (msg.EventType == "CALL")
            {
                if (msg.Event == "OPEN_CALL")
                {
                    ActivateQueueTab();
                }
            }
        }