private string EvaluateMessage(string sMc) { var strResponse = ""; try { //conferenceServices.LogMessage(string.Format("Evaluate message {0} {1}", twilioPhoneNumber, sMc)); //conferenceServices.LogMessage("about to enter switch"); //conferenceServices.LogMessage(sMc); //if (string.Equals(sMc.ToUpper().Trim(), "STATUS")) // conferenceServices.LogMessage("OK Check"); //if (sMc.Trim().ToUpperInvariant() == "STATUS") // conferenceServices.LogMessage("OK Check"); switch (sMc) { case "STATUS": // Return current status // conferenceServices.LogMessage("Entering here STATUS "); strResponse = conferenceServices.returnStatus(twilioPhoneNumber); break; case "STATUS 1": // Update Status to Available // conferenceServices.LogMessage("Entering here STATUS 1 "); strResponse = conferenceServices.updateStatus(1, twilioPhoneNumber); break; case "STATUS 0": // Update Status to not available // conferenceServices.LogMessage("Entering here STATUS 0 "); strResponse = conferenceServices.updateStatus(0, twilioPhoneNumber); break; default: strResponse = "Invalid Command. Keywords are Status = retrieving status, Status 0 = updating status to not available, status 1 = updating status to available"; break; } conferenceServices.LogMessage(sMc, smsFromPhonenumber, twilioPhoneNumber, strResponse); } catch (Exception ex) { conferenceServices.ErrorMessage(string.Format("|Error Message - {0}| 1.Source {1} | 2.Trace {2} |3.Inner Exception {3} |", ex.Message, ex.Source, ex.StackTrace, ex.InnerException)); throw; } return(strResponse); }