public static CallRejected GetInstance() { if (_callRejected == null) { _callRejected = new CallRejected(); } return(_callRejected); }
private void HandleCallRejected(EventReleased released, string duration) { try { if (_eventReleased.CallType == CallType.Inbound) { if (!_isConsultCallReceived) { CallRejected.GetInstance().PopupRecords(_eventReleased, SFDCCallType.InboundVoice, duration); } else { _isConsultCallReceived = false; CallRejected.GetInstance().PopupRecords(_eventReleased, SFDCCallType.ConsultVoiceReceived, duration); } } else if (_eventReleased.CallType == CallType.Unknown || _eventReleased.CallType == CallType.Outbound) { if (_isConsultCallReceived) { CallRejected.GetInstance().PopupRecords(_eventReleased, SFDCCallType.ConsultVoiceReceived, duration); _isConsultCallReceived = false; } else { CallRejected.GetInstance().PopupRecords(_eventReleased, SFDCCallType.OutboundVoiceSuccess, duration); } } else if (_eventReleased.CallType == CallType.Consult) { if (_isConsultCallReceived) { CallRejected.GetInstance().PopupRecords(_eventReleased, SFDCCallType.ConsultVoiceReceived, duration); _isConsultCallReceived = false; } //else // CallRejected.GetInstance().PopupRecords(eventReleased, SFDCCallType.ConsultSuccess, duration); } } catch (Exception generalException) { this._logger.Error("HandleReleaseEvent: Error Occurred while on handling call release event :" + generalException.ToString()); } }