/// <summary>
        /// Builds up the details required to ask a question and stores them in the
        /// sessionAtrtibutes array
        /// </summary>
        /// <param name="input"></param>
        /// <param name="innerReponse"></param>
        /// <returns>void</returns>
        private SkillResponse AskQuestion(SkillRequest input)
        {
            var request = (IntentRequest)input.Request;

            if (request?.Intent?.Slots == null || !request.Intent.Slots.Any())
            {
                return(MakeSkillResponse($"No se envio un valor", false, this.GetAttributes(input)));
            }

            int.TryParse(request.Intent.Slots[AlexaConstants.SlotName]?.Value, out int number);
            if (number == 0)
            {
                number = this.GetNumberOfString((request.Intent.Slots[AlexaConstants.SlotName]?.Value ?? string.Empty).Trim().ToLower());
            }

            if (input?.Session?.Attributes == null || !input.Session.Attributes.Any())
            {
                if (number < 1 || number > 11)
                {
                    return(MakeSkillResponse($"La tabla solicitada esta fuera de rango {number}"));
                }

                var requestattributes = new AttributesDto
                {
                    CurrentQuestionCounter = 0,
                    PreviousAnswer         = number * 1,
                    Number01 = number,
                    Number02 = 1
                };

                return(MakeSkillResponse($"{this.GetQuestion(number, 1)}", false, requestattributes));
            }

            var responseAttributes = input.Session.Attributes.First().Value.ToString();
            var values             = this.GetAttributes(input);

            if (values != null && values.CurrentQuestionCounter > 1)
            {
                values.CurrentQuestionCounter = 0;
                var message = $"Excediste los intentos, la respuesta es {values.PreviousAnswer}, intentalo nuevamente {this.GetQuestion(values.Number01, values.Number02)}";
                return(MakeSkillResponse(message, false, values));
            }

            var    number01      = values.Number01;
            var    number02      = values.Number02;
            var    correctAnswer = values.PreviousAnswer;
            string speechOutput;

            if (values == null)
            {
                values = new AttributesDto();
            }

            if (number.Equals(correctAnswer))
            {
                values.CurrentQuestionCounter = 0;

                speechOutput = ResourceMessage.CorrectAnswer;

                if (number02 < 10)
                {
                    speechOutput += $"{ResourceMessage.NextQuestionMessage} {this.GetQuestion(number01, ++number02)}";
                    correctAnswer = number01 * number02;
                }
                else
                {
                    speechOutput += $" {ResourceMessage.CongratsMessage}";
                    return(MakeSkillResponse(speechOutput));
                }
            }
            else if (number02 >= 10)
            {
                number01      = number;
                number02      = 1;
                speechOutput  = this.GetQuestion(number01, number02);
                correctAnswer = number01 * number02;
            }
            else
            {
                values.CurrentQuestionCounter++;
                speechOutput = $"{ResourceMessage.IncorrectAnswer} { this.GetQuestion(number01, number02)}";
            }

            values.PreviousAnswer = correctAnswer;
            values.Number01       = number01;
            values.Number02       = number02;

            return(MakeSkillResponse($"{speechOutput}", false, values));
        }
        private SkillResponse MakeSkillResponse(string outputSpeech, bool shouldEndSession = false, AttributesDto triviaAttributes = null)
        {
            var speech = new SsmlOutputSpeech {
                Ssml = $"<speak>{outputSpeech}</speak>"
            };

            var response = new ResponseBody
            {
                OutputSpeech     = speech,
                ShouldEndSession = shouldEndSession
            };

            var skillResponse = new SkillResponse
            {
                Response = response,
                Version  = AlexaConstants.AlexaVersion
            };

            if (triviaAttributes != null)
            {
                var sessionAttributesTemp = new Dictionary <string, object> {
                    { "AttributesDto", JsonConvert.SerializeObject(triviaAttributes) }
                };
                skillResponse.SessionAttributes = sessionAttributesTemp;

                skillResponse.Response.Directives.Add(new DialogElicitSlot(AlexaConstants.SlotName));
                skillResponse.Response.Reprompt = new Reprompt {
                    OutputSpeech = speech
                };
            }

            return(skillResponse);
        }