Skip to content

brendan-myers/phone-captcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phone Call Captcha

Super simple application for filtering robocalls with an audio based captcha.

Build

A random 4-digit code is played to the caller, which then must be entered in on their keypad for the call to connect. After the caller has successfully entered the code, they are whitelisted, and are not required to enter a code on subsequent calls.

This app uses the Twilio programmable voice API.

Setup

git clone git://github.com/brendan-myers/phone-captcha.git
cd phone-captcha
npm install

Twilio

A Twilio account and number capable of making calls are required.

From the Twilio console, configure the hook for incoming calls to point to the /voice endpoint of this application.

Twilio setup

(Optional) Google Cloud Datastore

By default, the caller whitelist is stored in memory. If you would like whitelist to persist, you will need a Google Cloud Platform account.

Environment variables

The application expects an environment variable containing the number to forward successful calls to.

export OUTBOUND_NUMBER=xxxxxxxxxxxx

(Optional) If using Google Cloud Datastore, you will need to set the WHITELIST_LOCATION=GOOGLE_CLOUD environment variable, and provide the project ID and the key json file.

export WHITELIST_LOCATION=GOOGLE_CLOUD
export GOOGLE_CLOUD_PROJECT=xxxxxxxxxxxx
export GOOGLE_CLOUD_KEY=xxxxxxxxxxxx.json

Run

node .

or

OUTBOUND_NUMBER=xxxxxxxxxxxx WHITELIST_LOCATION=GOOGLE_CLOUD GOOGLE_CLOUD_PROJECT=xxxxxxxxxxxx GOOGLE_CLOUD_KEY=xxxxxxxxxxxx.json node .

TODO

  • Tests
  • Code cleanup
  • Implement saving whitelist to disk

About

📱 Block robocalls with captcha for phone calls

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published