Command Line Script to Make Your iPhone Dial a Number

This is a bash script that only requires a single command in Terminal and a single swipe on your iPhone to make a phone call. It is an adaptation of my command line Pushover script, so please review that before proceeding below.

Create a file called callhome at /usr/local/bin with the following contents:

    #! /bin/bash

    message="tel:8005551212"

    action="Call Home"

    url_title="Make the Call"

    curl -s \

      -F "token=$APP_TOKEN" \

      -F "user=$USER_KEY" \

      -F "title=$action" \

      -F "message=$message" \

      -F "url_title=$url_title" \

      -F "url=tel:8005551212" \

      https://api.pushover.net/1/messages.json

Replace the two instances of 8005551212 with a phone number, and $APP_TOKEN and $USER_KEY with your app token and user key.

Make the script executable: chmod +x callhome.

Now all you have to do is type callhome from the command line. When you get a notification on your iPhone, swipe it. Pushover will open the supplementary URL, which will dial the number.


Want to comment? The permalink for this post is http://blog.jeffreykishner.com/2014/07/24/commandLineScriptToMakeYourIphoneDialANumber


Last built: Tue, Mar 31, 2015 at 2:05 PM

By Jeffrey Kishner, Thursday, July 24, 2014 at 1:32 PM.