A twilio functions thingy to do on-call dialout
This is a set of twilio functions scripts to implement multiple on-call extensions.
- Add the scripts to the appropriate paths (Twilio functions)
- Set the configuration envvars (Twilio functions)
- MAKE SURE ALL SCRIPTS HAVE "Check for valid Twilio signature" CHECKED!$%^&(&^%$%^
- Setup the DID to point to the main menu (Programmable voice)
- 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)
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
Twilio will call each number for the extension in order until:
- The call is answered by the dialed number and
- The call is accepted by pressing "1" when prompted
Filename | Function Path |
---|---|
mainmenu.js | mainmenu |
rroncall.js | rroncall |
screen.js | screen |