Skip to content

randomthingsandstuff/twilio_oncall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twilio_oncall

A twilio functions thingy to do on-call dialout

What is this?

This is a set of twilio functions scripts to implement multiple on-call extensions.

How to set it up

  1. Add the scripts to the appropriate paths (Twilio functions)
  2. Set the configuration envvars (Twilio functions)
  3. MAKE SURE ALL SCRIPTS HAVE "Check for valid Twilio signature" CHECKED!$%^&(&^%$%^
  4. Setup the DID to point to the main menu (Programmable voice)

Configuration envvars

  • CONFIG_URL -> The URL with the extension to numbers mapping
  • MAX_MENULOOPITER -> How many times the menu will prompt before it bails out (I do something like 5)

CONFIG_URL JSON format:

Its a dictionary mapping a string extension to a list of string phone numbers (in e.164 form, preferably).

{ "1000": [ "+12025550912", "+12065550310", "+12065550310", "+12815550774"],
  "9844": [ "+317044000", "+12145550101"] }

If you really don't like having some URL for twilio to pick this up from, the dictionary is picked up in mainmenu.js and rroncall.js

Operation

Twilio will call each number for the extension in order until:

  1. The call is answered by the dialed number and
  2. The call is accepted by pressing "1" when prompted

File name to function path

Filename Function Path
mainmenu.js mainmenu
rroncall.js rroncall
screen.js screen

About

A twilio functions thingy to do on-call dialout

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published