This project is a proof-of-concept using Asterisk PBX, running on a Raspberry Pi Zero or better, interfaced to Amazon Alexa™ Voice Service API. Using a SIP Phone or SoftPhone, the user dials into their Raspberry Asterisk PBX extension and follows the prompts to speak questions which are sent to Amazon Alexa Voice Service. Responses are spoken back over the phone. No Amazon Echo™ required.

It uses a Perl AGI script and SOX to convert the audio formats and send & receive the AVS JSON API messages over the Internet. Amazon does not currently charge for this service, but you do have to create an AWS Developer account.

As this is only a proof-of-concept, it does not comply with Amazon’s public access terms & conditions. But it does meet their developer requirements for private, non-commercial use.

The primary limitation is that you cannot connect an external telephone number to this for use as an inbound service without modification to meet their requirements. (i.e. trigger the recording using a push button (touchtone?). Also, it has not been optimized to reduce overhead and improve response time. But for a single user demo, the Raspi Zero and AVS work quite well.


Full instructions and source code on Github