Building an emergency calling system
I'm a type-2, insulin-dependent diabetic. I also drive two hours every day—to my office and back. So, after I spent a week in the hospital last year, I decided to set up an In Case Of Emergency (ICE) system so that I could call one number and have it try multiple numbers at once.
Getting ready
The complete source code for this recipe can be found in the Chapter2/Recipe4
folder.
How to do it...
This emergency calling system will try a group of numbers at the same time; the first number to answer will get connected.
Download the Twilio Helper Library from https://github.com/twilio/twilio-php/zipball/master and unzip it.
Upload the
Services/
folder to your website.Upload
config.php
to your website and make sure the following variables are set:<?php $accountsid = ''; // YOUR TWILIO ACCOUNT SID $authtoken = ''; // YOUR TWILIO AUTH TOKEN $fromNumber = ''; // PHONE NUMBER CALLS WILL COME FROM ?>
Create a file on your website called
ice.php
, with...