Git Product home page Git Product logo

phoneduty's Introduction

Phoneduty

Scrutinizer Code Quality Build Status

Deploy

This is a Twilio Twimlet designed to be hosted on Heroku. It will query PagerDuty to find the currently on-call engineer and forward the inbound call to them. If there is no one on-call or if the on-call engineer doesn't answer, the caller will be prompted to leave a message which will trigger an incident within PagerDuty.

It needs a few environment variables defined to work:

PAGERDUTY_SCHEDULE_ID
PAGERDUTY_API_TOKEN
PAGERDUTY_SERVICE_API_TOKEN
PAGERDUTY_DOMAIN

Those names should be fairly self-explanatory. The domain is the piece of your PagerDuty URL that is specific to you i.e. https://[PAGERDUTY_DOMAIN].pagerduty.com/

You can also optionally set PHONEDUTY_ANNOUNCE_TIME, which if set to a TRUEish value will include the current time of the engineer being called as part of the answering message. This may help raise awareness that you are potentially getting somebody out of bed, so be gentle :D

Additionally, you can optionally set a greeting to be played to the caller before connecting them to the on-call engineer or asking them to leave a voicemail with the PHONEDUTY_ANNOUNCE_GREETING configuration option.

Usage

  • Configure your on-call schedule in PagerDuty
  • Ensure your rostered staff have a 'phone' contact method defined
  • Note the schedule ID of the roster you wish to use.
  • Create and note an API key in PagerDuty
  • Create the PagerDuty service for any voice messages and note the service API key
  • Deploy this app to Heroku.
  • Configure the relevant environment variables above in Heroku
  • Buy a phone number from Twilio
  • Add the generated Heroku URL as a "Request URL" for the Voice property of this Twilio number
  • Call the external Twilio number. You should get a voice prompt telling you who is on call, what time it is in their timezone currently, and then you will get connected to the rostered engineer.

Relevant Reading

Twilio

Twilio TwiML reference https://www.twilio.com/docs/api/twiml

Some sample Twimlets: https://www.twilio.com/labs/twimlets

PagerDuty

PagerDuty API http://developer.pagerduty.com/documentation/integration/events

Heroku

Setting up and deploying PHP apps on Heroku https://devcenter.heroku.com/articles/getting-started-with-php

phoneduty's People

Contributors

mdcollins05 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.