Exemplo n.º 1
0
        private bool TestGhostCall(AnalyticsConversation conversation)
        {
            // Is this an external/inbound/outbound call on selected edge?
            var participant = conversation.Participants.FirstOrDefault(p => (p.Purpose == AnalyticsParticipant.PurposeEnum.External || p.Purpose == AnalyticsParticipant.PurposeEnum.Inbound || p.Purpose == AnalyticsParticipant.PurposeEnum.Outbound || p.Purpose == AnalyticsParticipant.PurposeEnum.Customer) && p.Sessions.Count(s => s.EdgeId == currentEdge.Id) > 0);

            if (participant == null)
            {
                return(false);
            }

            // Is the edge offline?
            if (telephonyProvidersEdgeApi.GetTelephonyProvidersEdge(currentEdge.Id).OnlineStatus == Edge.OnlineStatusEnum.Offline)
            {
                return(true);
            }
            return(false);
        }
 public void Init()
 {
     instance = new AnalyticsConversation();
 }