public ActionResult IncomingCall(string callId, string callDate, string caller, string userShortNumber) { DateTime date = DateTime.Parse(callDate); CrmHelper crm = new CrmHelper(); CallerHepler callerHelper = crm.CreatePhoneCall(callId, date, caller, userShortNumber); if (callerHelper.Code == 200) { CrmHub signalRUser = new CrmHub(); ResponseHelper response = signalRUser.ExecuteSignalRIncomingCall(callerHelper); if (response.IsError) { if (response.Code == 500) { return(new HttpStatusCodeResult(HttpStatusCode.InternalServerError)); } else if (response.Code == 404) { return(new HttpNotFoundResult("Not Found")); } } } else { return(new HttpStatusCodeResult(HttpStatusCode.InternalServerError)); } return(new HttpStatusCodeResult(HttpStatusCode.OK)); }