Buzzing people into your apartment building when you're having a party? Ain't nobody got time for that! That's why I built partymode. It's a service that auto-buzzes people into my building when enabled, otherwise forwards calls to my phone. It uses Twilio to handle calls and SMS, backed by AWS Lambda functions written in Kotlin and deployed with the Serverless Framework. It integrates with Slack so I or anyone in my workspace can control when it's enabled.
- Get a number from Twilio, which costs $1/month.
- Get an AWS account.
- Install Serverless.
- Get admin access to your Slack workspace.
- Create a Slack webhook and set the
SLACK_WEBHOOK_URIenv var to that uri.
- Create a Slack bot and subscribe to the following bot events:
MY_NUMBER env var to your phone number. Make sure the format is
This will get passed to your Lambda functions and used by Twilio to decide where to forward the call when partymode is disabled.
CALLBOX_NUMBER env var to your call box's phone number.
Make sure the format is
The app will reject calls from any other number, in the event you inevitably get spammed with robocalls.
false in the Slack handler:
slack-handler: handler: com.merricklabs.partymode.handlers.SlackMessageHandler events: - http: path: slack/event method: post async: false
Synchronous is required at first so that Slack can verify your url.
Deploy the app with
This will give you urls for Slack and Twilio.
In Slack, point your bot at the Slack url and verify it.
async back to
true in your
serverless.yaml and redeploy with
In your Twilio dashboard, create a TwiML app and point the endpoints to the ones provisioned in AWS. Point your Twilio number to this app.
Optional: CircleCI Pipeline
This repo contains config for deploying to prod via CircleCI. Simply set the following environment variables in your pipeline:
Finally, of course, have your apartment forward your call box to your Twilio number
Kotlin Gradle DSL
After adding a new dependency, run this plugin with: