public void CallReceived(CallSessionInfo session) { try { Client.CallReceived(session); } catch (Exception) { OnDisconnected(EventArgs.Empty); } }
public void CallReceived(CallSessionInfo session) { OnCrmServerCallReceived(session); }
private void OnCrmServerCallReceived(CallSessionInfo e) { EventHandler<CallSessionInfo> handler = CrmServerCallReceived; if (handler != null) handler(this, e); }
private void ClientOnSessionCreated(object sender, VoIPEventArgs<ISession> voIpEventArgs) { var sessionInfo = new CallSessionInfo(); sessionInfo.Callee = voIpEventArgs.Item.Callee; sessionInfo.Caller = voIpEventArgs.Item.Caller; sessionInfo.RingDuration = voIpEventArgs.Item.RingDuration; sessionInfo.StartTime = voIpEventArgs.Item.StartTime; sessionInfo.TalkDuration = voIpEventArgs.Item.TalkDuration; CallReceived(sessionInfo); }
private void CallReceived(CallSessionInfo sessionInfo) { try { foreach (var crmClient in _clients.Values.Where(client => client.Credential.PhoneNumber.Equals(sessionInfo.Callee) || client.Credential.PhoneNumber.Equals(sessionInfo.Caller))) crmClient.CallReceived(sessionInfo); } catch (Exception) { } }