Exemplo n.º 1
0
        /// <summary>
        /// Note: This function name is used in Twilio configurations.
        /// Do NOT change the name without also updating the Twilio config for the PPOk Message Service
        /// </summary>
        /// <returns></returns>
        public ActionResult ReceiveSMS()
        {
            string fromNumber = Request.Params["From"];

            if (!String.IsNullOrEmpty(fromNumber))
            {
                fromNumber = fromNumber.Substring(1);//phone numbers are prefixed with a +
            }
            string fromBody   = Request.Params["Body"].ToLower().Trim();
            string messageSid = Request.Params["MessageSid"];

            TwilioService.HandleSMSResponse(fromNumber, fromBody, messageSid);

            return(View());
        }