Protect your customers' privacy, and create a seamless interaction by provisioning Twilio numbers on the fly, and routing all voice calls, and messages through your very own 3rd party. This allows you to control the interaction between your customers, while putting your customer's privacy first.
This project is built using Ruby on Rails Framework.
-
First clone this repository and
cd
into it.$ git clone [email protected]:TwilioDevEd/anonymous-communications-rails.git $ cd anonymous-communications-rails
-
Install the dependencies.
$ bundle install
-
Expose your application to the wider internet using ngrok. This step is important because the application won't work as expected if you run it through localhost.
$ ngrok http 3000
Your ngrok URL should look something like this:
http://9a159ccf.ngrok.io
You can read this blog post for more details on how to use ngrok.
-
Configure Twilio App to call your webhooks.
Before you can run this app you need to go into your account portal and create a new Twilio Application. Once you have created an app the urls should look like:
Voice:
https://<ngrok_subdomain>.ngrok.io/reservations/connect_voice
SMS & MMS:
https://<ngrok_subdomain>.ngrok.io/reservations/connect_sms
-
Copy the sample configuration file and edit it to match your configuration.
$ cp .env.example .env
You can find your
TWILIO_ACCOUNT_SID
andTWILIO_AUTH_TOKEN
in your Twilio Account Settings. You will also need aTWILIO_NUMBER
, which you may find here. -
Create database and run migrations. Be sure to have SQLite installed before running this command.
$ bundle exec rails db:setup
-
Make sure the tests succeed.
$ bundle exec rspec
-
Start the server.
$ bundle exec rails s
That's it!
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.