TwilioQuestProspector is a project that uses the Twilio platform to automate outbound phone calls, provide information, and manage recipient responses. The project is designed to help individuals save on their electricity bills by connecting them with a service specializing in energy savings.
Before using TwilioQuestProspector, make sure you have the following:
- A Twilio account with valid credentials (accountSid and authToken).
- An active and verified Twilio phone number to use as the source number for calls.
- Proper configuration of your Twilio environment (context) for managing environment variables.
-
Clone the TwilioQuestProspector repository.
git clone <https://github.com/thisoverride/TwilioQuestProspector.git>
-
Install the project's dependencies.
cd TwilioQuestProspector npm install
-
Configure the necessary environment variables. Make sure to add your accountSid and authToken to your .env file.
TWILIO_ACCOUNT_SID=YourAccountSID TWILIO_AUTH_TOKEN=YourAuthToken CALL_CENTER=CallCenterPhoneNumber DATA_URI=YourMongoDbURI
-
Deploy the project to the Twilio Functions platform.
twilio serverless:deploy
TwilioQuestProspector is an outbound call automation system. When a call is received, a voice message is played to the recipient with response options.
This Twilio endpoint handles outbound calls. It presents a voice message and allows the recipient to respond by pressing 1 or 2.
- If the recipient presses 1, the call is redirected to the call center specified in the CALL_CENTER environment variable.
- If the recipient presses 2, the call is immediately hung up.
- For any other input, the call is redirected to /retry-menu to allow the recipient to try again.
This endpoint allows for retrying the interaction if the recipient doesn't respond correctly.
This endpoint is used to process the recipient's responses when they press a key. Depending on the key pressed (1 or 2), it redirects the call to the call center or hangs up the call.
This endpoint redirects the call to the initial greeting message to allow the recipient to hear the initial voice message again.
If you want to contribute to TwilioQuestProspector, please follow these steps:
- Create a copy of the project (fork) on your own GitHub account.
- Clone the repository from your GitHub account to your local machine.
- Create a branch for your contribution (e.g., feature/new-feature).
- Make your changes, add new features, or fix bugs.
- Test your changes locally.
- Create a pull request to request the incorporation of your changes into the main project.
This project is licensed under the MIT License. See the LICENSE file for more information.