Go! Call Me (Maybe)!
Designed for use with AWS Lambda and Twilio to allow an Amazon Alexa skill to call you when its an emergency.
Alexa Skill Setup
Create a new skill on the Alexa Developer Portal. The name isn't important, just make it something you remember. As for the skill's content, here's the JSON I use. You should be able to import it and adjust it according to your needs.
Set up an account and purchase a phone number that can do both SMS and calls. You will need this, your SID, and the Auth Token for the AWS Lambda configuration.
Hosting XML For Calls
Twilio has TwiML Bins where you can put the XML for your scripts. You can't create dynamic responses, but it makes it simpler than having to manage another service.
POST, otherwise calls
made will state that there was an error.
<?xml version="1.0" encoding="UTF-8"?> <Response> <Say voice="alice">Help, it's an emergency.</Say> <Dial/> </Response>
Download it from the releases tab and upload that to your AWS Lambda function. In the Handler
field on the upload page, change the value to
You need to set the following in your configuration for your environment. If they are not setup, the lambda will not work correctly.
CONTACT_NAME # The name of the person being called. TWILIO_ACCOUNT_SID # The Account SID for Twilio. TWILIO_AUTH_TOKEN # The Auth Token for Twilio. TWILIO_EMERGENCY_PHONE_NUMBER # The phone number purchased from Twilio. OUTBOUND_PHONE_NUMBER # The phone number to be called and texted. SCRIPT_EMERGENCY_URL # The URL of the XML (TwiML Bin) for the standard emergency call.
The following are optional. They default to the emergency-related values if unset.
TWILIO_ASLEEP_PHONE_NUMBER # The phone number purchased from Twillio for sending a wakeup call. TWILIO_NON_EMERGENT_PHONE_NUMBER # The phone number purchased from Twilio for sending a non-emergent call. SCRIPT_ASLEEP_URL # The URL of the XML (TwiML Bin) for a wakeup call.
+, or Twilio will not work. The code does check for
Redis Integration and Pub-Sub Notifications (Optional)
If you would like to take advantage of the pub-sub notifications that the sister application Go! Call Me Notifier utilizes, the following environment variables are required. This feature is optional, and leaving these out will not affect the way the lambda works.
You can get free Redis hosting from RedisLabs, which will cover everything this setup needs.
The following are optional, and default to
go get github.com/trueheart78/go-call-me-maybe
Structure should stay with the Standard Go Project Layout.
Building the Binary
build/lambda.sh script and check the
out/ directory for the archive to use. Make sure to set the
Handler field in the AWS Lambda page to
lambda_handler when uploading.