Setting up a voicemail system
All companies need a voicemail system, from a small one-person company to a big 100-person company.
This voicemail system will be set up as one big mailbox that people can call into and leave a message. The message is then e-mailed to you along with a transcription of the message.
Getting ready
The complete source code for this recipe can be found in the Chapter2/Recipe4
folder.
How to do it...
Let's build a simple voicemail system that can serve as a mailbox for your company.
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
voicemail.php
, with the following code:<?php include 'Services...