コード例 #1
0
ファイル: view.py プロジェクト: CatsAreMLG/Twilio-IVR
def client_availability():
    response = _gather_voice("Please leave us your first and last name. " +
                             "How many clients you are looking to pick up. " +
                             "And what times you are available for new clients."
                             )

    return twiml(response)
コード例 #2
0
ファイル: view.py プロジェクト: CatsAreMLG/Twilio-IVR
def client_payments():
    response = _gather_voice("Please leave us your first and last name. " +
                             "The client\'s first and last name. " +
                             "and a brief description about the question or issue you have."
                             )

    return twiml(response)
コード例 #3
0
ファイル: view.py プロジェクト: CatsAreMLG/Twilio-IVR
def _redirect_welcome():
    response = VoiceResponse()

    response.say("Returning to the main menu")
    response.redirect(url_for('welcome'))

    return twiml(response)
コード例 #4
0
ファイル: view.py プロジェクト: CatsAreMLG/Twilio-IVR
def _call_redirect():
    response = VoiceResponse()

    response.say("Redirecting to our agent. Please hold.")
    response.dial(SMS_DESTINATION)

    return twiml(response)
コード例 #5
0
ファイル: view.py プロジェクト: CatsAreMLG/Twilio-IVR
def _redirect_hangup():
    response = VoiceResponse()

    response.say(
        "Thank you. We\'ll forward your message and have someone call you back. Goodbye.")
    response.hangup()

    return twiml(response)
コード例 #6
0
ファイル: view.py プロジェクト: CatsAreMLG/Twilio-IVR
def _no_input():
    response = VoiceResponse()

    response.say("We didn\'t receive any input. " +
                 "Returning to the main menu. ")
    response.redirect(url_for('welcome'))

    return twiml(response)
コード例 #7
0
ファイル: view.py プロジェクト: CatsAreMLG/Twilio-IVR
def menu():
    selected_options = request.form["Digits"]

    option_actions = {
        '1': 'client_concerns',
        '2': 'missed_shifts',
        '3': 'client_payments',
        '4': 'timesheet_questions',
        '5': 'client_availability',
        '6': 'other',
        '0': 'welcome'
    }

    if selected_options in option_actions:
        response = VoiceResponse()
        response.redirect(url_for(option_actions[selected_options]))
        return twiml(response)

    return _redirect_welcome()
コード例 #8
0
ファイル: view.py プロジェクト: CatsAreMLG/Twilio-IVR
def welcome():
    response = VoiceResponse()
    with response.gather(
        num_digits=1,
        timeout=5,
        action=url_for('menu'),
        method="POST"
    ) as g:
        g.say(message="Thanks for calling The Helper Bees support line. " +
              "Please press 1 for concerns about a client. " +
              "Press 2 for notifying us about missing your shift. " +
              "Press 3 for questions about client payments. " +
              "Press 4 for questions about your timesheet. " +
              "Press 5 for inquiries on new client availability. " +
              "For all other questions or concerns press 6. " +
              "If you need me to repeat the options press 0. "
              )

    response.say('We didn\'t receive any input. Goodbye.')
    return twiml(response)
コード例 #9
0
ファイル: view.py プロジェクト: CatsAreMLG/Twilio-IVR
def timesheet_questions():
    response = _gather_voice("Please leave us your first and last name. " +
                             "and what questions or inquiries you have about your timesheet."
                             )

    return twiml(response)
コード例 #10
0
ファイル: view.py プロジェクト: CatsAreMLG/Twilio-IVR
def other():
    response = _gather_voice("Please leave us your first and last name. " +
                             "And a brief description about what issue or question you have."
                             )

    return twiml(response)