Yosemite: Make a Phone Call via your iPhone

Has anyone done this?

Yosemite adds a cool new feature to make a call from several Apple apps using your iPhone. See OS X Yosemite: Use your Mac to make and receive phone calls

I would like this capability from anywhere on my Mac.
###Just select a phone number, press a Hot Key, and dial it!

Before I tackled this task, thought I’d ask if anyone here has already done it. :smile:

Here’s one solution I found. Uses Mac Automator to create a service.
Seems to work well with the limited testing I’ve given it.

Of course, you could use the underlying AppleScript to create a KM macro as well.

How to Make Calls with iPhone from Mac OSX

I don't have an iPhone, so I'm not going to fool much with this — but the AppleScript is straightforward:

open location "tel://" & yourTelNum & "?audio=yes"

I'm not sure how forgiving it is about telephone number format though. You may need to strip out any punctuation.

-Chris

1 Like

In my limited testing, it seems to accept a lot of formats.
On thing though, it does need to be percent encoded for URL.

I have started some research on finding a RegEx to validate phone numbers.
It's a tough case.

Here's my working, beta, macro, in case anyone is interested.
Please let me know if you have any suggestions or find any bugs.

Dial Phone with Selected Number.kmmacros (5.4 KB)

I think you're right.
Actually, I want to strip out everything but numbers. I've got a RegEx that will do this:
\d+
but it needs to be "greedy", and I can't figure out how to tell KM to make it greedy.

You don't want a greedy regex (which all regex'es are, in pretty much all flavors).

What you want to do is search and replace for anything that is not a digit.

Thanks Peter. That works.

I was using the wrong word. Instead of "greedy", I meant "global" :frowning:

I have just uploaded my macro to do this.
Many thanks to Rob, Chris, and Peter for your great help.

A post was split to a new topic: Reformat a Telephone Number on the Clipboard