Place a Twilio Call from the Shell
The twilio-call bash script will place a phone call to one or more phone numbers provided on the command line, using content read from STDIN! It can practically be used as a drop-in replacement for mail in some instances.
The script can read configuration parameters, such as your Twilio AccountSid, AuthToken and CallerID from the command line, or more preferably from a config file. You can provide the path to a config file in the arguments, or the default ~/.twiliorc will be tried.
Additionally, you can provide one or more phone numbers in a single invocation of the script, and all the numbers will be called.
- Download the twilio-call bash script and put it somewhere in your path.
- chmod 775 twilio-call
- Optional: Setup a default config file in ~/.twiliorc or a location of your choice
The config file consists of bash variable declarations, as name=value pairs, each on one line. The file may contain any of the following parameters that will be used as defaults and therefore, don't need to be specified on the command line:
|ACCOUNTSID||Your Twilio AccountSid. For example: AC1234567890|
|AUTHTOKEN||Your Twilio AuthToken. For example: dk49dkdcb3948abd|
|CALLERID||A valid caller-id configured for your account. For example: 555-867-5309|
Example Config File
ACCOUNTSID=AC1234567890 AUTHTOKEN=dk49dkdcb3948abd CALLERID=555-867-5309