End robocaller, solicitation, and hangup calls with Asterisk & Raspberry Pi #piday #raspberrypi @Raspberry_Pi
Check out this helpful comprehensive Asterisk + Raspberry Pi project how-to, shared with us by a maker from the Adafruit community, Bill Bishop:
Do you have a land-line that is constantly barraged with unwanted robo, solicitation, and “hangup” calls, even though you’re on the do not call registries? This project uses a Raspberry Pi and an OBi110 voice-bridge to create an Automated Attendant (AA) to screen calls for you! The annoyance calls on my line have dropped from five or six/day (with many more during political “seasons”) to zero. This is a low-power, low-cost solution with extreme expansion possibilities, and it’s a fun way to gain experience with the Pi & the Asterisk PBX software. As an added bonus, my wife “really loves it; our home is more peaceful”.
You won’t need to dive deeply into Asterisk to create this project. However, should you find yourself intrigued, I’ve included references to help you along the way. Familiarity with text editors (nano, vim), routing, and your local Internet infrastructure (IP assignment) is required for configuring addresses on the Raspberry Pi and OBi110.
Secretly, what we’re doing is turning your old analogue phone into a VoIP phone using the OBi110 (a voice bridge), so that calls can be handled digitally by the Raspberry Pi. The only external Internet service used is the network time protocol (NTP) since the Pi doesn’t have a real-time-clock built-in (though one can be added). A network connection isn’t essential, but it is convenient for configuration. See the entry on Running RasPBX without an Internet connection. With no Internet connection, a crossover network cable can be used to tie the Pi directly to the OBi110.
Configuration of the OBi110 can be done via the phone hand-set, but it’s (much) easier using the web interface….
This is the call flow: Asterisk answers an incoming call immediately. The caller is then informed that they have reached a number that does NOT accept solicitations and they should “please hang up NOW”; “to connect, press 1″. If no number is pressed within 10 seconds, Asterisk hangs up. If any number other than “1″ is pressed, Asterisk hangs up. Once “1″ is pressed, the caller is informed to please wait, while “music on hold” is played. As this happens, Asterisk rings the handset. If the phone isn’t picked up within 45 seconds, Asterisk hangs up. It’s assumed that the phone’s answering machine will pick-up before then (all that in 8 lines of code).
We are angry, frustrated, and in pain because of the violence and murder of Black people by the police because of racism. We are in the fight AGAINST RACISM. George Floyd was murdered, his life stolen. The Adafruit teams have specific actions we’ve done, are doing, and will do together as a company and culture. We are asking the Adafruit community to get involved and share what you are doing. The Adafruit teams will not settle for a hash tag, a Tweet, or an icon change. We will work on real change, and that requires real action and real work together. That is what we will do each day, each month, each year – we will hold ourselves accountable and publish our collective efforts, partnerships, activism, donations, openly and publicly. Our blog and social media platforms will be utilized in actionable ways. Join us and the anti-racist efforts working to end police brutality, reform the criminal justice system, and dismantle the many other forms of systemic racism at work in this country, read more @ adafruit.com/blacklivesmatter
Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.