Пример #1
0
        private void OnCrmServerCallHistoryEntryAdded(CallHistoryEntry e)
        {
            EventHandler <CallHistoryEntry> handler = CrmServerCallHistoryEntryAdded;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Пример #2
0
        public CodecCallHistory()
        {
            ListEmptyEntry = new CallHistoryEntry()
            {
                Name = "No Recent Calls"
            };

            RecentCalls = new List <CallHistoryEntry>();

            RecentCalls.Add(ListEmptyEntry);
        }
Пример #3
0
 public void CallHistoryEntryAdded(CallHistoryEntry entry)
 {
     try
     {
         Client.CallHistoryEntryAdded(entry);
     }
     catch (Exception)
     {
         OnDisconnected(EventArgs.Empty);
     }
 }
        private void WcfCrmClientOnCrmServerCallHistoryEntryAdded(object sender, CallHistoryEntry callHistoryEntry)
        {
            lock (_lockObj)
            {
                var affectedEntries = _internalCrmEntries.Where(entry => entry.PhoneNumber.Equals(callHistoryEntry.Callee) || entry.PhoneNumber.Equals(callHistoryEntry.Caller));
                foreach (var affectedEntry in affectedEntries)
                {
                    affectedEntry.CallHistoryEntries.Add(callHistoryEntry);
                }
            }

            RaisePropertyChanged("CrmEntries");
        }
        private void CallHistoryEntryAdded(CallHistoryEntry entry)
        {
            try
            {
                foreach (var crmClient in _clients.Values)
                {
                    crmClient.CallHistoryEntryAdded(entry);
                }

                OnNotificationReceived(new NotificationEventArgs()
                {
                    Notification = string.Format("New call history entry added: {0} -> {1}", entry.Caller, entry.Callee)
                });
            }
            catch (Exception) { }
        }
        private void ClientOnSessionCompleted(object sender, VoIPEventArgs <ISession> voIpEventArgs)
        {
            var callHistoryentry = new CallHistoryEntry();

            callHistoryentry.Callee     = voIpEventArgs.Item.Callee;
            callHistoryentry.Caller     = voIpEventArgs.Item.Caller;
            callHistoryentry.StartDate  = voIpEventArgs.Item.StartTime;
            callHistoryentry.CallLength = voIpEventArgs.Item.TalkDuration;

            try
            {
                var affectedEntries = _databaseClient.GetAll().Where(entry => entry.PhoneNumber.Equals(callHistoryentry.Callee) || entry.PhoneNumber.Equals(callHistoryentry.Caller));
                foreach (var affectedEntry in affectedEntries)
                {
                    affectedEntry.CallHistoryEntries.Add(callHistoryentry);
                    _databaseClient.Set(affectedEntry);
                }

                CallHistoryEntryAdded(callHistoryentry);
            }
            catch (Exception) { }
        }
Пример #7
0
 public void RemoveEntry(CallHistoryEntry entry)
 {
     RecentCalls.Remove(entry);
     OnRecentCallsListChange();
 }
Пример #8
0
 public void CallHistoryEntryAdded(CallHistoryEntry entry)
 {
     OnCrmServerCallHistoryEntryAdded(entry);
 }