No description, website, or topics provided.
Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
help
README.md
app.yaml
index.yaml
main.py

README.md

Trigger a PagerDuty incident from a phone call

This is not an officially supported PagerDuty product, and not covered by our SLA. But I do work for PagerDuty, so feel free to email me about it.

Requirements

  1. Set up a PagerDuty account if you don't already have one, and create a Generic API service. We'll use the Service API key.

  2. You'll need to set up a Google App Engine account, and create an application. We'll use the application identifier.

  3. Change the "application: pdtestthrough" line in app.yaml to your application identifier, and the SERVICE_KEY = "6f4d18600a9b012f6a9722000a9040cf" line in main.py to your service API key

  4. Deploy to Google App Engine

  5. Create a Twilio account, and set up an incoming phone number to point to http://[your-application-identifier].appspot.com/call

  6. Call that number and leave a message, you'll trigger an alert that links to the MP3 recording of the call:

    ALRT #145 on Phone in: http://goo.gl/UMmDx +14153490382 Reply 4:Ack, 6:Resolv.

Walkthrough in pictures:

PagerDuty Setup

Google setup

TwilioConf

Triggers

Background

We have regular hackdays at PagerDuty, where we build things outside the core product without management (another reason you should work here). A few weeks ago, I rolled out a proof of concept Google App Engine script to use Twilio to record a voicemail and then to pass it around like a regular alert. Triggering alerts from phone calls hasn't made it's way on to the development roadmap, so I'm sharing this code sample as a work around for our more technically inclined users -- so all the usual caveats and disclaimers apply, namely that our SLAs don't apply.

Twilio will happily turn a phone call into an MP3 and give us a link to it (which means to get this to work you're going to need to sign up for a Twilio account as well as a Google App Engine account). We then use Google's URL shortener to shrink the URL into something that will fit in an SMS -- all modern smart phones can figure out what to do with that. -- Source