Like many people these days, I cancelled my antiquated land-line a while back and have been using my mobile phone as my primary phone ever since.
A very useful feature that I have built into our customer database is the ability to dial customer phone numbers directly from within FileMaker Pro and FileMaker Go. And, it’s relatively simple to do.
Not only does it save time not having to dial the numbers yourself, more importantly it also eliminates dialling wrong numbers.
This tutorial will show you how you can dial your iPhone from both FileMaker Pro on your computer and FileMaker Go on your iPhone.
If you stick around, I’ve got some bonus content to show you at the end of this post – more specifically, how to send SMS messages from FileMaker Go, and how to call Skype using FileMaker.
Dialling numbers from FileMaker Pro
Now if you’re on a Windows machine or own a phone that’s not an iPhone, then shame on you – no, only kidding, but in order for this to work you need both a Mac and an iPhone.
To make phone calls from FileMaker, you first need to be able to make phone calls from your Mac. To make phone calls from your Mac, you need iOS 8 or later, OS X Yosemite or later, and both your Mac and iPhone need to be connected to the same Wi-Fi network.
We’ll run through the basics here, but for more detailed instructions check out:
OS X Yosemite: Use your Mac to make and receive phone calls
OS X El Capitan: Use your Mac to make and receive phone calls
Step 1 – Enable iPhone to allow calls from your Mac
First you need to enable your iPhone to allow calls on other devices.
iOS 9 or later: Go to Settings -> Phone, then turn on ‘Calls on Other Devices’.
iOS 8: Go to Settings -> FaceTime, then turn on ‘iPhone Cellular Calls’.
Step 2 – Enable Mac to allow calls to your iPhone
Next, you will need to enable your Mac to make calls via your iPhone. Open FaceTime and go to Preferences, then enable the ‘Calls From iPhone’ option.
Step 3 – Test that you can make iPhone calls via your Mac
Now we need to test that you can actually make a call from your Mac via your iPhone. Within FaceTime on your Mac, enter a phone number in the search field, then click the phone icon next to the number.
You should now be able to make a phone call from your Mac – you’ll see a notification show up asking you to Call or Cancel.
Step 4 – Script FileMaker to make phone calls
Now that your Mac can make phone calls via your iPhone, it’s time to script FileMaker to dial those numbers for us.
To instruct your Mac to make phone calls, we use the tel:// protocol.
You can simply type tel://1234 into your web browser (or click on the link) and your Mac will make a phone call for you.
The tel:// protocol is just another url protocol such as ftp://, http://, https://, file:// or fmp:// – except it instructs your computer to open the FaceTime app and dial the number passed to it – i.e. in this case 1234.
You can simply replace 1234 with whatever phone number you are calling, and FaceTime will make the call – for example tel://5678
Within FileMaker, we use the script step ‘Open URL’ to make the call, and pass the tel:// protocol and number as its option.
So within FileMaker, your script will look something like this:
Open URL [ With dialog: Off; "tel://1234" ]
Now if you run your script, FileMaker will dial the number for you.
However, this is not very useful as the phone number is hardcoded into the script. So instead of passing 1234, you will want to pass either a variable or a field containing the phone number to be dialled.
You could do something like this:
Open URL [ With dialog: Off; "tel://" & Table::PhoneNumber ]
or
Open URL [ With dialog: Off; "tel://" & $PhoneNumber ]
However, I prefer to pass the phone number as a script parameter and clean it up before dialling. This way, I have only one script to maintain and I can be sure that the phone number is clean of spaces, carriage returns, text and punctuation.
So my final script looks like this:
If [ not IsEmpty( Get(ScriptParameter) ) ]
Set Variable [ $url ; "tel://" & Filter ( Get(ScriptParameter) ; "0123456789") ]
Open URL [ With dialog: Off; $url ]
End If
Simple stuff really!
Then all you need to do is create a button for your new script and pass a phone field as it’s script parameter and you’re in business.
When you click on your new button in FileMaker, the FaceTime app will launch and show a notification asking you to Call or Cancel. Therefore you will need to hit the Call button before the call is made.
FaceTime will now place the call for you via your iPhone and you may use your computer as a speaker phone.
However, I prefer to talk directly on my iPhone as it’s much clearer than talking via the Mac – and customers can hear me clearer too.
So to take the call on your iPhone, all you need to do is open your phone and click the green title bar and you’re done.
Yes, there are a few manual steps and clicks along the way, but it’s far simpler than dialling the number manually :)
Dialling numbers from FileMaker Go
Dialling phone numbers from within FileMaker Go is even easier as there’s no setup required at all. All you need to do is create the exact same script from Step 4 above and you’re done.
Nothing more to do.
Bonus 1: Sending SMS from FileMaker Go
In place of the tel:// protocol, you can use the sms:// protocol to send an SMS message. When clicking on your script, the Messages app will launch ready for you to type your SMS message.
Your script will look something like this:
If [ not IsEmpty( Get(ScriptParameter) ) ]
Set Variable [ $url ; "sms://" & Filter ( Get(ScriptParameter) ; "0123456789") ]
Open URL [ With dialog: Off; $url ]
End If
Bonus 2: Dialling Skype from FileMaker
You may not be surprised that calling Skype from FileMaker is just as easy. All you have to do is use the callto:// protocol as follows:
If [ not IsEmpty( Get(ScriptParameter) ) ]
Set Variable [ $url ; "callto://" & Get(ScriptParameter) ]
Open URL [ With dialog: Off; $url ]
End If
You may have noticed above that I’m not using the Filter() function for Skype calls. This is because Skype can call both phone numbers and Skype handles which are text. So we don’t want to filter out the text in this case. However if you’re only using it to make Skype-to-phone calls and not Skype-to-skype calls then you can use the Filter() function.
Download
You can download a sample file for you to play with here: Sample Code
Cheers!
Thanks for this post, Tony. Useful info!
Man, this is an awesome tutorial. I never thought to do this from FileMaker. Love it.
Great post, very handy.
One question, could you use AppleScript to dismiss the FaceTime dialog where it asks you to call or cancel?
Hi Victor, yes, I suppose you can use AppleScript to “click” the call button for you.
I haven’t tried it with this. But have done this sort of thing in the past. It’s not hard to do.
Only problem I found was it tends to break when Apple update the OS.
Good stuff. Thanks.
I have been exploring ways to do this for quite some time. I found an easy way to do this using an app called Push Dial and it worked great, but sadly the developer stoped maintaining the app and it stopped working on newer versions of iOS. Finally I have an alternative. Thanks.
Thanks Tony, I’ve been looking for a way to dial my iPhone from FM. I just found it :D
A work colleague referred me to this post as I’m the in-house developer for a graphics design company. Good stuff!!
Will this work with WebDirect?
Hi Stephen, I have not tried it, but believe that it may actually work.
The tel:// protocol would still be triggered as far as I know, so yeah I think it should work. Maybe give it a go and let me know.
I found post very interested. Keep going good work. Your knowledge in FileMaker very good.
I found the article very informative. I can use this in my own filemaker CRM. Good bye wrong numbers, ha ha.
I like It a lot! Something so simple yet not many would have thought to do this in FileMaker.
Hey this is pretty cool. Thanks for posting, I’ll be using this with my own filemaker database for sure!!
I very much like this filemaker tool. thank you.
Very handy indeed. Im sure this will save me some time, I’ll be building this into my own FileMaker app shortly.
thanks. i found this very useful.
Thanks, came in very handy.
very helpful… thx Tony
one thing missing… when phone numbers are formatted with spaces between the numbers (as yours is below – 03 9404 4998) The sms:// protocol will not work with message when there are spaces between the numbers!
Removing the spaces using TrimAll can help resolve this issue.
TrimAll ( text ; trimSpace ; trimType )
Perhaps you could enhance your example to help people understand how to use TrimAll as the description in FMP is rather cryptic.
I too have not yet managed to get the SMS button to work properly when the phone numbers contain spaces between the numbers
THIS WORKED…
TrimAll(“sms://” & Get(ScriptParameter); 1;3)
WOW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
This is beyond awesome!!! Thanks!!