def on_intent()

in automated-actions/AWS_EBS_VOLUME_LOST/stepbystep/alexa_skill.py [0:0]


def on_intent(request, session):
    """ Called on receipt of an Intent  """

    intent = request['intent']
    intent_name = request['intent']['name']

    #print("on_intent " +intent_name)
    get_state(session)

    if 'dialogState' in request:
        #delegate to Alexa until dialog sequence is complete
        if request['dialogState'] == "STARTED" or request['dialogState'] == "IN_PROGRESS":
            print (request['dialogState'])
            return dialog_response("", False)

    if intent_name == "GetNewEventIntent":
        return get_event()
    elif intent_name == "AMAZON.HelpIntent":
        return do_help()
    elif intent_name == "AMAZON.StopIntent":
        return do_stop()
    elif intent_name == "AMAZON.CancelIntent":
        return do_stop()
    else:
        print("invalid intent reply with help")
        return do_help()