19

In Yosemite, is there a way to start a phone call from the command-line aka Terminal?

Something like:

call +316123456789
0

3 Answers 3

25

You can with open "tel://+316123456789" start a phone call process - but you still need to click on the "Call" button to make the call.

enter image description here

To do so, you may also simply press . To automate everything via Applescript:

open location "tel://+351918306031"
delay 2
tell application "System Events" to key code 36
7
  • What app does this?
    – mmmmmm
    Nov 27, 2014 at 19:44
  • 5
    This is "Phone calls via iPhone" - also known as "Mac + iOS Continuity" (Yosemite + iOS8). Nov 27, 2014 at 20:07
  • 1
    FWIW it appears that pressing the Enter/Return key will press the 'Call' button, which may make automating this a little easier.
    – TJ Luoma
    Dec 4, 2014 at 0:44
  • If you don't have an iPhone, this will call using FaceTime, so the receiver will need to be an address that has that. Dec 3, 2015 at 15:59
  • I tried using this method for creating a "one-click" phone number to automate testing a menu system. The number eventually got too long, and it stopped working. Oct 12, 2017 at 15:40
2

In theory, you could use Automator to setup a sequence of actions to trigger making a call. I've never actually used Automator, but my understanding of it says it'll work.

First, you could create an Automator script that perhaps triggers Rene's answer of running open "tel://+316123456789" and clicking the 'Call' button. Or, you could have it open the Google Hangouts Chrome Extension and similarly dial a number.

Second, you would call the Automator script from the command line (as described here):

open MyAutomatorCaller.app --args '+316123456789'

Lastly, you could create a Bash alias for the above command (i.e. in ~/.bash_profile):

call() { 
    open MyAutomatorCaller.app --args $1
}
0

I had added this function to my .bashrc

function call {
  open -a FaceTime "tel://$1"
}

This required FaceTime to be able to call landlines or mobile numbers (so you need an iPhone with the same AppleID as well).

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .