示例#1
0
        public definitionsSay longstay([FromForm] string Memory)
        {
            var     jsonObject = new JObject();
            dynamic d          = JObject.Parse(Memory);
            // obtengo el collect
            string Date_start = d.twilio.collected_data.book_longstay.answers.Date_start.answer;
            string Hour_start = d.twilio.collected_data.book_longstay.answers.Hour_start.answer;
            string Date_end   = d.twilio.collected_data.book_longstay.answers.Date_end.answer;
            string Hour_end   = d.twilio.collected_data.book_longstay.answers.Hour_end.answer;
            string Patente    = d.twilio.collected_data.book_longstay.answers.Patente.answer;
            string Tarjeta    = d.twilio.collected_data.book_longstay.answers.Tarjeta.answer;
            string tyc        = d.twilio.collected_data.book_longstay.answers.tyc.answer;
            bool   ok         = tyc.ToUpper().Equals("SI");

            DateTime desde = DateTime.Parse(Date_start.Replace("2021", "2020") + " " + Hour_start); // cuidado twillio enviá las fechas en formato ingles
            DateTime hasta = DateTime.Parse(Date_end.Replace("2021", "2020") + " " + Hour_end);
            //Tarjeta = Tarjeta.ToUpper().Equals("VISA") ? "1" : "4";

            definitionsSay twilio  = new definitionsSay();
            List <Action>  actions = new List <Action>();

            if (ok)
            {
                if (desde < hasta)
                {
                    ActionSay say = new ActionSay();
                    say.say = "🚗 Los siguientes datos han sido utilizados para la pre reserva."
                              + "\n - *Entrada:* " + desde.ToString()
                              + "\n - *Salida:* " + hasta.ToString()
                              + "\n - *Vehículo:* " + Patente
                              + "\n - *Tarjeta:* " + Tarjeta
                              + "\nUtiliza el siguiente link para realizar el pago y confirmar tu reserva."
                              + "\nHTTPS://api.aa2000.com.ar/WEBFORMS/PAYPARK.ASPX?IDNS_TARJETA=1&NROOPERACION=XX8&MONTOE=1&MONTOD=00&CATEG=3";
                    actions.Add(say);
                }
                else
                {
                    ActionSay say = new ActionSay();
                    say.say = "Error, la fecha de ingreso no puede ser mayor que la de salida!"
                              + "\nUsted ingreso: "
                              + "\n *Entrada:* " + desde.ToString()
                              + "\n *Salida:* " + hasta.ToString();
                    actions.Add(say);
                }
            }
            else
            {
                ActionSay say = new ActionSay();
                say.say = "No puedo continuar con el booking de longstay si no aceptas los *terminos y condiciones*."
                          + "\nVoy a estar aquí por si me necesitas de nuevo!";
                actions.Add(say);
            }

            twilio.actions = actions;
            return(twilio);
        }
示例#2
0
        public definitionsSay Test([FromForm] string Memory)
        {
            definitionsSay twilio  = new definitionsSay();
            List <Action>  actions = new List <Action>();
            ActionSay      say     = new ActionSay();

            say.say = Memory;
            actions.Add(say);
            twilio.actions = actions;
            return(twilio);
        }
示例#3
0
        public definitionsSay buscarTest([FromForm] string Memory)
        {
            var     jsonObject = new JObject();
            dynamic d          = JObject.Parse(Memory);
            string  filter     = d.twilio.collected_data.collect_buscar_producto.answers.producto_busqueda.answer;

            Root products;

            var client = new RestClient("https://ezelab.myshopify.com/admin/api/2020-10/products.json?fields=id,images,title,handle,variants");

            client.Timeout = -1;
            var request = new RestRequest(Method.GET);

            request.AddHeader("Authorization", "Basic Y2Y5Yjc1MjQ5YjkzMDhiODdkOGIyNmI4OGM2NzEzYTA6c2hwcGFfMDkxMWNkODBhMzYzMmQ5MzEyODE5MTM5ZDJiYTkzOWY=");
            request.AddHeader("Cookie", "_master_udr=eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaEpJaWszTUdFMFpUSTBaQzFrT1RZeExUUTFaV0V0WVRjNFppMWtOMkV6TnpFd1lqQm1OMllHT2daRlJnPT0iLCJleHAiOiIyMDIyLTA3LTAzVDIwOjEyOjQyLjA1N1oiLCJwdXIiOiJjb29raWUuX21hc3Rlcl91ZHIifX0%3D--1e7946d971f744818706ad361f949d1fb9718c68; _secure_admin_session_id_csrf=86009cb6da5c57a5eac86a9ea2dc0447; _secure_admin_session_id=86009cb6da5c57a5eac86a9ea2dc0447; __cfduid=d3fa2dbec9914f470e845022dbb39e1d71593806347; _orig_referrer=https%3A%2F%2Fcf9b75249b9308b87d8b26b88c6713a0%3A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%40ezelab.myshopify.com%2Fadmin%2Fapi%2F2020-07%2Fproducts.json%26fields%3Dchivas; _shopify_y=88933032-3e5f-4ae7-8cd5-e2a4b8020e51; _y=88933032-3e5f-4ae7-8cd5-e2a4b8020e51; _landing_page=%2Fadmin%2Fauth%2Flogin");
            IRestResponse response = client.Execute(request);

            products = JsonConvert.DeserializeObject <Root>(response.Content);

            definitionsSay twilio  = new definitionsSay();
            List <Action>  actions = new List <Action>();

            List <Product> list = products.products.Where(x => x.title.ToUpper().Replace("'", "").Contains(filter.Replace("'", "").ToUpper())).ToList();

            if (list.Count > 0)
            {
                foreach (Product p in list)
                {
                    Actionshow a = new Actionshow();
                    Show       s = new Show();
                    s.body   = p.title + " Precio: $" + p.variants[0].price;
                    s.images = new List <a2klab.Controllers.Image>();
                    a2klab.Controllers.Image image = new a2klab.Controllers.Image();
                    image.label = "Url del producto";
                    image.url   = p.images[0].src;
                    s.images.Add(image);
                    a.show = s;
                    actions.Add(a);
                    ActionSay say = new ActionSay();
                    say.say = "La url para comprar el producto es: https://ezelab.myshopify.com/products/" + p.handle;
                    actions.Add(say);
                }
            }
            else
            {
                ActionSay say = new ActionSay();
                say.say = "No encontré nada con el nombre " + filter + ", prueba con *Productos y Servicios* y te voy a mostrar que podes comprar.";
                actions.Add(say);
            }

            twilio.actions = actions;
            return(twilio);
        }
示例#4
0
        public definitionsSay Ticket([FromForm] string Memory)
        {
            // TEZE070005374421 ->> para pruebas, man

            var     jsonObject = new JObject();
            dynamic d          = JObject.Parse(Memory);
            string  ticket     = d.twilio.collected_data.collect_parking.answers.ticket_nro.answer;
            string  category   = "3";

            var client = new RestClient("http://api.aa2000.com.ar/api/Parking?ticket=TEZE" + ticket.ToUpper().Replace("TEZE", "") + "&category=" + category);

            client.Timeout = -1;
            var request = new RestRequest(Method.POST);

            request.AddHeader("key", globalK.Replace("pelufo/", ""));
            IRestResponse response       = client.Execute(request);
            Ticket        ticketResponse = JsonConvert.DeserializeObject <Ticket>(response.Content);

            definitionsSay twilio  = new definitionsSay();
            List <Action>  actions = new List <Action>();

            ActionSay say = new ActionSay();

            if (ticketResponse.Error == null)
            {
                say.say = "Tu ticket de Parking Ezeiza es el Nro: *" + ticket + "* (Asegurate que sea el mismo que en tu ticket!)"
                          + "\n - Tu estadía: *$ " + ticketResponse.remaining + "*"
                          + "\n - Cantidad de minutos: " + ticketResponse.minutes
                          + "\n - Hora y dia de entrada: " + ticketResponse.creation;
                actions.Add(say);

                ActionSay say1 = new ActionSay();
                say1.say = "*Utiliza la siguiente link para efectuar tu pago:*"
                           + "\nHTTPS://api.aa2000.com.ar/WEBFORMS/PAYPARK.ASPX?IDNS_TARJETA=1&NROOPERACION=" + ticket + "8&MONTOE=" + ticketResponse.remaining + "&MONTOD=00&CATEG=" + ticketResponse.category
                           + "\nLuego de realizar el pago recibirás un email de confirmación. Tiene hasta 15 minutos para retirarte sin cargo, escaneando tu ticket en cualquier via de salida!"
                           + "";
                actions.Add(say1);
            }
            else
            {
                say.say = "Tu ticket " + ticket + " aparentemente *no existe*. Asegurate de ingresar bien todos los números del ticket."
                          + "\nVoy a estar aquí por si me necesitas nuevamente!";
                actions.Add(say);
            }

            twilio.actions = actions;
            return(twilio);
        }
示例#5
0
        public definitionsSay esperarBot(string timetoaction)
        {
            string[] magicvar = timetoaction.Split("-");
            System.Threading.Thread.Sleep(int.Parse(magicvar[0]) * 1000);

            definitionsSay twilio  = new definitionsSay();
            List <Action>  actions = new List <Action>();

            ActionRedirect redirect = new ActionRedirect();

            redirect.redirect = "task://" + magicvar[1];
            actions.Add(redirect);

            twilio.actions = actions;
            return(twilio);
        }
示例#6
0
        public definitionsSay comprar([FromForm] string Memory)
        {
            var     jsonObject = new JObject();
            dynamic d          = JObject.Parse(Memory);
            // obtengo el collect
            string tarjeta  = d.twilio.collected_data.book_fastpass.answers.Tarjeta.answer;
            string cantidad = d.twilio.collected_data.book_fastpass.answers.Cantidad.answer;
            string Date_end = d.twilio.collected_data.book_fastpass.answers.Date_end.answer;
            string Hour_end = d.twilio.collected_data.book_fastpass.answers.Hour_end.answer;
            string apellido = d.twilio.collected_data.book_fastpass.answers.apellido_dni.answer;
            string tyc      = d.twilio.collected_data.book_fastpass.answers.tyc.answer;
            bool   ok       = tyc.ToUpper().Equals("SI");

            DateTime hasta = DateTime.Parse(Date_end.Replace("2021", "2020") + " " + Hour_end);
            //Tarjeta = Tarjeta.ToUpper().Equals("VISA") ? "1" : "4";

            definitionsSay twilio  = new definitionsSay();
            List <Action>  actions = new List <Action>();

            if (ok)
            {
                ActionSay say = new ActionSay();
                say.say = "Los siguientes datos han sido utilizados para la pre reserva."
                          + "\n - *Cantidad:* " + cantidad.ToString()
                          + "\n - *Dia:* " + Date_end.ToString()
                          + "\n - *A nombre de:* " + apellido
                          + "\nUtiliza el siguiente link para realizar el pago y confirmar tu reserva."
                          + "\nHTTPS://api.aa2000.com.ar/WEBFORMS/PAYPARK.ASPX?IDNS_TARJETA=1&NROOPERACION=XX8&MONTOE=1&MONTOD=00&CATEG=3";
                actions.Add(say);
            }
            else
            {
                ActionSay say = new ActionSay();
                say.say = "No puedo continuar con el booking de fastpass si no aceptas los *terminos y condiciones*."
                          + "\nVoy a estar aquí por si me necesitas de nuevo!";
                actions.Add(say);
            }

            twilio.actions = actions;
            return(twilio);
        }
示例#7
0
        /// <summary>
        /// Retorna todos los productos
        /// </summary>
        /// <remarks>
        /// TODO: IMPLEMENTAR CHACHE SI O SI!!
        /// </remarks>
        private definitionsSay todosProductos()
        {
            Root products;

            var client = new RestClient("https://ezelab.myshopify.com/admin/api/2020-10/products.json?fields=id,images,title,handle,variants");

            client.Timeout = -1;
            var request = new RestRequest(Method.GET);

            request.AddHeader("Authorization", "Basic Y2Y5Yjc1MjQ5YjkzMDhiODdkOGIyNmI4OGM2NzEzYTA6c2hwcGFfMDkxMWNkODBhMzYzMmQ5MzEyODE5MTM5ZDJiYTkzOWY=");
            request.AddHeader("Cookie", "_master_udr=eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaEpJaWszTUdFMFpUSTBaQzFrT1RZeExUUTFaV0V0WVRjNFppMWtOMkV6TnpFd1lqQm1OMllHT2daRlJnPT0iLCJleHAiOiIyMDIyLTA3LTAzVDIwOjEyOjQyLjA1N1oiLCJwdXIiOiJjb29raWUuX21hc3Rlcl91ZHIifX0%3D--1e7946d971f744818706ad361f949d1fb9718c68; _secure_admin_session_id_csrf=86009cb6da5c57a5eac86a9ea2dc0447; _secure_admin_session_id=86009cb6da5c57a5eac86a9ea2dc0447; __cfduid=d3fa2dbec9914f470e845022dbb39e1d71593806347; _orig_referrer=https%3A%2F%2Fcf9b75249b9308b87d8b26b88c6713a0%3A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%40ezelab.myshopify.com%2Fadmin%2Fapi%2F2020-07%2Fproducts.json%26fields%3Dchivas; _shopify_y=88933032-3e5f-4ae7-8cd5-e2a4b8020e51; _y=88933032-3e5f-4ae7-8cd5-e2a4b8020e51; _landing_page=%2Fadmin%2Fauth%2Flogin");
            IRestResponse response = client.Execute(request);

            products = JsonConvert.DeserializeObject <Root>(response.Content);

            definitionsSay twilio  = new definitionsSay();
            List <Action>  actions = new List <Action>();

            foreach (Product p in products.products)
            {
                Actionshow a = new Actionshow();
                //a.say = p.title;
                //a.say = "Este es nuestro listado de productos: ";
                Show s = new Show();
                s.body   = p.title + " Precio: $" + p.variants[0].price;
                s.images = new List <a2klab.Controllers.Image>();
                a2klab.Controllers.Image image = new a2klab.Controllers.Image();
                image.label = "Url del producto";
                image.url   = p.images[0].src;
                s.images.Add(image);
                a.show = s;
                actions.Add(a);
            }

            twilio.actions = actions;
            return(twilio);
        }
示例#8
0
        public async Task <definitionsSay> obtenerPromos([FromForm] string Memory)
        {
            //var jsonObject = new JObject();
            //dynamic d = JObject.Parse(Memory);
            //string filter = d.twilio.collected_data.collect_listarproducto.answers.nombre_coleccion.answer;

            // Si eligió ver todos respondo de inmediato.
            // if(filter.ToUpper().Contains("TODOS"))
            // {

            // }

            var promos = await _cosmoService.GetAllAsync("SELECT * FROM c");

            List <Promocion> pr = promos.ToList();

            definitionsSay twilio  = new definitionsSay();
            List <Action>  actions = new List <Action>();

            foreach (Promocion p in pr)
            {
                Actionshow a = new Actionshow();
                Show       s = new Show();
                s.body   = "*" + p.Nombre + "* - " + p.Descripcion;
                s.images = new List <a2klab.Controllers.Image>();
                a2klab.Controllers.Image image = new a2klab.Controllers.Image();
                image.label = p.LinkUrl;
                image.url   = p.LinkImagen;
                s.images.Add(image);
                a.show = s;
                actions.Add(a);
            }

            twilio.actions = actions;
            return(twilio);
        }
示例#9
0
        public definitionsSay suscribeFlight([FromForm] string Memory)
        {
            var         jsonObject = new JObject();
            dynamic     d          = JObject.Parse(Memory.Replace("messaging.whatsapp", "messaging_whatsapp"));
            string      phone      = d.twilio.messaging_whatsapp.From;
            string      respuesta  = d.twilio.collected_data.collect_notificarvuelo.answers.notificar_sino.answer;
            List <Data> dta        = getData(phone);

            definitionsSay twilio  = new definitionsSay();
            List <Action>  actions = new List <Action>();
            ActionSay      say     = new ActionSay();

            if (respuesta.ToUpper().Contains("SI"))
            {
                say.say = "Perfecto, ya te registre para el aviso del vuelo *" + dta[0].flight + "* al numero " + phone.ToUpper().Replace("WHATSAPP:", "") + ". Que tal si buscas alguna de nuestras promociones mientras tanto? Puedo mostrartelas si contestas *ver productos*";
            }
            else
            {
                say.say = "Ok, no te registrare al vuelo " + dta[0].flight + ". Que tal si aprovechas alguna de nuestras promociones mientras tanto? Puedo mostrartelas si contestas *ver productos*";
            }
            actions.Add(say);
            twilio.actions = actions;
            return(twilio);
        }
示例#10
0
        public definitionsSay buscarColleccionesTest([FromForm] string Memory)
        {
            //var jsonObject = new JObject();
            //dynamic d = JObject.Parse(Memory);
            //string filter = d.twilio.collected_data.collect_buscar_producto.answers.producto_busqueda.answer;

            sCollection collections;

            var client = new RestClient("https://ezelab.myshopify.com/admin/api/2020-10/smart_collections.json?fields=id,title,handle");

            client.Timeout = -1;
            var request = new RestRequest(Method.GET);

            request.AddHeader("Authorization", "Basic Y2Y5Yjc1MjQ5YjkzMDhiODdkOGIyNmI4OGM2NzEzYTA6c2hwcGFfMDkxMWNkODBhMzYzMmQ5MzEyODE5MTM5ZDJiYTkzOWY=");
            request.AddHeader("Cookie", "_master_udr=eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaEpJaWszTUdFMFpUSTBaQzFrT1RZeExUUTFaV0V0WVRjNFppMWtOMkV6TnpFd1lqQm1OMllHT2daRlJnPT0iLCJleHAiOiIyMDIyLTA3LTAzVDIwOjEyOjQyLjA1N1oiLCJwdXIiOiJjb29raWUuX21hc3Rlcl91ZHIifX0%3D--1e7946d971f744818706ad361f949d1fb9718c68; _secure_admin_session_id_csrf=86009cb6da5c57a5eac86a9ea2dc0447; _secure_admin_session_id=86009cb6da5c57a5eac86a9ea2dc0447; __cfduid=d3fa2dbec9914f470e845022dbb39e1d71593806347; _orig_referrer=https%3A%2F%2Fcf9b75249b9308b87d8b26b88c6713a0%3A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%40ezelab.myshopify.com%2Fadmin%2Fapi%2F2020-07%2Fproducts.json%26fields%3Dchivas; _shopify_y=88933032-3e5f-4ae7-8cd5-e2a4b8020e51; _y=88933032-3e5f-4ae7-8cd5-e2a4b8020e51; _landing_page=%2Fadmin%2Fauth%2Flogin");
            IRestResponse response = client.Execute(request);

            collections = JsonConvert.DeserializeObject <sCollection>(response.Content);

            definitionsSay twilio  = new definitionsSay();
            List <Action>  actions = new List <Action>();

            List <SmartCollection> list = collections.smart_collections;

            if (list.Count > 0)
            {
                ActionQuestion question = new ActionQuestion();
                Collect        c        = new Collect();
                c.name = "collect_listarproducto";
                List <Question> qs = new List <Question>();
                Question        q  = new Question();
                q.name     = "nombre_coleccion";
                q.question = "Genial, que es lo que mas te interesa de todo esto?";

                foreach (SmartCollection sm in list)
                {
                    q.question += "\n - *" + sm.title + "*";
                }
                q.question += "\n - *Ver todos los productos*";
                q.type      = "";
                qs.Add(q);
                c.questions = qs;
                OnComplete o = new OnComplete();
                Redirect   r = new Redirect();
                r.method      = "POST";
                r.uri         = "https://a2klab.azurewebsites.net/api/Shopify/obtenerColleccion";
                o.redirect    = r;
                c.on_complete = o;

                question.collect = c;
                actions.Add(question);
            }
            else
            {
                Actionshow a = new Actionshow();
                Show       s = new Show();
                s.body = "No encontré nada para ofrecerte";
                a.show = s;
                actions.Add(a);
                ActionSay say = new ActionSay();
                say.say = "En que mas te puedo ayudar?";
                actions.Add(say);
            }

            twilio.actions = actions;
            return(twilio);
        }
示例#11
0
        public definitionsSay flight([FromForm] string Memory)
        {
            var     jsonObject     = new JObject();
            dynamic d              = JObject.Parse(Memory.Replace("messaging.whatsapp", "messaging_whatsapp"));
            string  phone          = d.twilio.messaging_whatsapp.From;
            string  filter         = d.twilio.collected_data.collect_estado_vuelo.answers.vuelo_busqueda.answer;
            string  filterOriginal = filter.ToUpper();

            var client = new RestClient("https://api.aa2000.com.ar/api/Vuelos?idarpt=EZE");

            client.Timeout = -1;
            var request = new RestRequest(Method.GET);

            request.AddHeader("key", globalK.Replace("pelufo/", ""));
            IRestResponse response = client.Execute(request);
            List <Flight> vuelos   = JsonConvert.DeserializeObject <List <Flight> >(response.Content);

            filter = Tokenize(filter); // Tokenizo el texto

            // Replica filtro y busco en la list original
            List <Flight> list = vuelos;

            definitionsSay twilio  = new definitionsSay();
            List <Action>  actions = new List <Action>();

            if (!filter.Trim().Equals("") && (vuelos.Count > 0))
            {
                // Se fija si alguna aerolínea coincide
                list = vuelos.Where(x => x.aerolinea.ToUpper().Replace(" ", "").Replace("S", "").Contains(filter.ToUpper().Replace(" ", "").Replace("S", ""))).ToList();
                // Si no es una aerolínea busco por el destino u origen
                list = (list.Count == 0)? vuelos.Where(x => x.destorig.ToUpper().Replace(" ", "").Contains(filter.ToUpper().Replace(" ", ""))).ToList() : list;
                // Si no encontré nada busco por el numero de vuelo
                list = (list.Count == 0)? vuelos.Where(x => (x.idaerolinea.ToUpper() + x.nro.ToUpper()).Replace("-", "").Replace(" ", "").Contains(filter.ToUpper().Replace("-", "").Replace(" ", ""))).ToList() : list;

                if (filterOriginal.Contains("HORA")) // esta preguntando por una hora?
                {
                    list = (list.Count == 0)? vuelos.Where(x => x.stda.ToUpper().Replace(":", "").Contains(filter.ToUpper().Replace(":", ""))).ToList() : list;
                }

                if (list.Count > 1) // Si es mas de uno retorno la lista de opciones pero no lo dejo registrarse
                {
                    foreach (Flight p in list)
                    {
                        Actionshow a = new Actionshow();
                        Show       s = new Show();
                        s.body = ((p.mov.Equals("D"))? "*Partida*" : "*Arribo*") + " de la aerolínea *" + p.aerolinea + "*"
                                 + "\n - Nro vuelo: " + p.nro
                                 + "\n - " + ((p.mov.Equals("D"))? "Con destino: " : "Desde origen: ") + p.destorig
                                 + "\n - Hora estimada " + ((p.mov.Equals("D"))? "de partida: ": "de arribo: ") + ((p.term == null) ? "sin estima" : p.term)
                                 + "\n - Hora programada: " + p.stda
                                 + "\n - " + ((p.mov.Equals("D"))? "Checkin Nro: 0" + p.chk_from + " al 0" + p.chk_to : "Puerta: " + ((p.gate.Equals("") ? "no asignada" : p.gate)))
                                 + "\n - Terminal: " + ((p.term == null) ? "no asignada" : p.term)
                                 + "\n - Estado: *" + ((p.estes.Equals("")) ? "sin estado" : p.estes) + "*";
                        s.images = new List <a2klab.Controllers.Image>();
                        a2klab.Controllers.Image image = new a2klab.Controllers.Image();
                        image.label = "logo aerolinea";
                        image.url   = "http://a2klab.azurewebsites.net/img/" + p.idaerolinea + "_200.jpg";
                        s.images.Add(image);
                        a.show = s;
                        actions.Add(a);
                    }

                    ActionSay say = new ActionSay();
                    say.say = "Esto es lo que he encontrado... Si buscas nuevamente, pero mas especifico puedo avisarte los cambios de estado.";
                    actions.Add(say);
                }
                else if (list.Count == 1) // Si es una opción lo dejo registrarse
                {
                    foreach (Flight p in list)
                    {
                        Actionshow a = new Actionshow();
                        Show       s = new Show();
                        s.body = ((p.mov.Equals("D"))? "*Partida*" : "*Arribo*") + " de la aerolínea *" + p.aerolinea + "*"
                                 + "\n - Nro vuelo: " + p.nro
                                 + "\n - " + ((p.mov.Equals("D"))? "Con destino: " : "Desde origen: ") + p.destorig
                                 + "\n - Hora estimada " + ((p.mov.Equals("D"))? "de partida: ": "de arribo: ") + ((p.term == null) ? "sin estima" : p.term)
                                 + "\n - Hora programada: " + p.stda
                                 + "\n - " + ((p.mov.Equals("D"))? "Checkin Nro: 0" + p.chk_from + " al 0" + p.chk_to : "Puerta: " + ((p.gate.Equals("") ? "no asignada" : p.gate)))
                                 + "\n - Terminal: " + ((p.term == null) ? "no asignada" : p.term)
                                 + "\n - Estado: *" + ((p.estes.Equals("")) ? "sin estado" : p.estes) + "*";
                        s.images = new List <a2klab.Controllers.Image>();
                        a2klab.Controllers.Image image = new a2klab.Controllers.Image();
                        image.label = "logo aerolinea";
                        image.url   = "http://a2klab.azurewebsites.net/img/" + p.idaerolinea + "_200.jpg";
                        s.images.Add(image);
                        a.show = s;
                        actions.Add(a);

                        Data dto = new Data();
                        dto.phone    = phone;
                        dto.flightId = p.id;
                        dto.flight   = p.nro;
                        setData(dto); // Guardo lo que busco

                        ActionQuestion question = new ActionQuestion();
                        Collect        c        = new Collect();
                        c.name = "collect_notificarvuelo";
                        List <Question> qs = new List <Question>();
                        Question        q  = new Question();
                        q.name     = "notificar_sino";
                        q.question = "Quieres que te avise de los cambios de estado de este vuelo?";
                        q.type     = "Custom.SI_NO";
                        qs.Add(q);
                        c.questions = qs;
                        OnComplete o = new OnComplete();
                        Redirect   r = new Redirect();
                        r.method = "POST";
                        //r.uri = "https://a2klab.azurewebsites.net/api/bot/Test";
                        r.uri         = "https://a2klab.azurewebsites.net/api/Flight/suscribe";
                        o.redirect    = r;
                        c.on_complete = o;

                        question.collect = c;
                        actions.Add(question);
                    }
                }
                else // Sino lo mando a freír churros
                {
                    ActionSay say = new ActionSay();
                    say.say = "No pude encontrar nada relacionado con " + filter + ", si queres volver a intentarlo indicame *busca vuelo* nuevamente.";
                    actions.Add(say);
                }
            }
            else
            {
                ActionSay say = new ActionSay();
                say.say = "Aparentemente hay un problema buscando eso (" + filter + "). Si quieres buscar algo mas estare aca...";
                actions.Add(say);
            }

            twilio.actions = actions;
            return(twilio);
        }