public KamailioMessageHandlerResult CloseCall(KamailioDialogMessage sipMessage) { log.Debug("Closing call with id:\"{0}\", hash id:\"{1}\", hash entry:\"{2}\"", sipMessage.CallId, sipMessage.HashId, sipMessage.HashEntry); try { CallInfo call = _callRepository.GetCallInfo(sipMessage.CallId, sipMessage.HashId, sipMessage.HashEntry); if (call == null) { log.Warn("Unable to find call with call id: {0}, hash id:{1}, hash entry:{2}", sipMessage.CallId, sipMessage.HashId, sipMessage.HashEntry); return(NothingChangedResult); } if (call.Closed) { log.Warn("Call with call id: {0} already closed", sipMessage.CallId); return(NothingChangedResult); } _callRepository.CloseCall(call.Id); return(SipMessageResult(KamailioMessageChangeStatus.CallClosed, call.Id)); } catch (Exception ex) { log.Error(ex, "Error while closing call with call id: {0}", sipMessage.CallId); return(NothingChangedResult); } }
public ActionResult DeleteCall(DeleteCallViewModel model) { if (model.CallId != Guid.Empty && model.IHaveChecked && model.ImSure) { _callRepository.CloseCall(model.CallId); } return(RedirectToAction("Index", "Home")); }
public void CloseCall(Guid callId) { _internalRepository.CloseCall(callId); // Some registered codecs may have changed state. Reload cache. _lazyCache.ClearRegisteredSips(); }
public void CloseCall(Guid callId) { _internalRepository.CloseCall(callId); _lazyCache.ClearOngoingCalls(); }