Phone Amego User's Guide

Scripting

        Introduction Description Configuration Telephone Devices Scripting History Dialing Options Caller ID Sharing Bluetooth Google Voice Landline VoIP Placing a Call Caller ID Lookup Call Records Daylite Integration Helpful Hints Spotlight on Innovation Phone Amego Application Frequently Asked Questions (FAQ) Thank You! Reviews & Comments About Us

Responding to Phone Amego Events

You can have Phone Amego launch an AppleScript for the following events:

call_from (phone_number)

will_dial (phone_number)

did_dial (phone_number)

out_of_range (phone_label)

in_range (phone_label)

on_hook (phone_label)

off_hook (phone_label)

incoming_call (phone_label)

call_answer (phone_label)

call_end (phone_label)

call_info (info)

For example, you could have Phone Amego pause iTunes when you answer a call, or tell your

computer to activate a screen saver when you leave the area. AppleScripts are normally found in

~/Library/Scripts/

The "will_dial (n)" action allows you to intercept outgoing calls just before Phone Amego dials so

you can pre-process the phone number if desired. The "Phone Amego will_dial.scpt" provides an

example of how to do this.

The "call_from (n)" action allows you to intercept incoming Caller ID information just before it is

displayed by Phone Amego. The included "Speak CallerID" example announces the callers name

(similar to the built-in Speak Caller Name feature). You could also lookup private phone numbers

in a company wide database if desired.

The "out_of_range (phone_label)" and "in_range (phone_label)" actions allow you to be notified

when a specific telephone device moves in or out of range.  The "Speak In Range.scpt" provides

an example of how to use this.

The "call_info (info)" action is invoked when the user clicks on the rolodex card icon (if a script is

specified). This allows your script to capture call information (name, phone number, time, and

telephone device) for those calls you decide need some action.

To install these AppleScripts to an external location for editing, open the Phone Amego Disk

Image (.dmg) file you downloaded and copy the "Phone Amego Scripts" folder to ~/Library/

Scripts/ on your hard drive.

Phone Amego includes some basic AppleScripts to pause iTunes playback, set your iChat status,

or activate a screen saver when your phone moves out of range. These scripts are NOT

copyrighted so you can use them as building blocks to publish your own.

The "Bento Search" script initiates a search to bring up the corresponding person record in

FileMaker's Bento database. Bento does not provide any AppleScript support, so this script uses

System Events to manipulate the user interface. To have Bento dial a phone number, you can

add a <tel:number> URL field to each record and click to have Bento open the corresponding

URL. I've submitted a feature request to FileMaker to provide better support for opening a

specific person record and dialing a phone number directly by having Bento launch a

corresponding URL.

Getting Phone Amego to Dial

Phone Amego can be scripted using the GetURL AppleScript command like this:

tell application "Phone Amego"

GetURL "tel:401-333-XXXX"

end tell

Phone Amego recognizes and responds to these URLs:

<tel:1-777-5555555>

<phoneamego://1-777-5555555>

<clicktocall://1-777-5555555>

<sip:+1NPAN7775555555@sip.voice.google.com>

<touchtone:123#>

<sms:17775555555>

<sms:+1(777)555-5555;text=Sample%20text>

<endcall://>

"tel", "clicktocall", or "phoneamego" will cause Phone Amego to dial the requested number using

the currently selected settings. "sip" can be used to dial a sip URI (a user's SIP phone number).

"sms" will tell Phone Amego to send an SMS to the requested number, bringing up the "Send

SMS with Google Voice" window if needed.

These URLs can also be used from the web. Since there is some risk of a web URL dialing an

unknown number that incurs a toll or unexpected result, the "tel" or "phoneamego" URL will

normally display an alert confirming the number to be dialed with an option to "Cancel" as

shown below.

You can press "Esc" (Cancel) or "Return" (OK) without leaving the keyboard.

If you are scripting Phone Amego directly, you can avoid this alert by using the "ASGetURL"

command in place of "GetURL" above. To turn off this alert, uncheck "Ask Before Dialing from a

URL" under the More tab of the Phone Amego window.

tell application "Phone Amego"

ASGetURL "sms:+1(777)555-5555;text=Sample%20text"

end tell

Getting Phone Amego to Show Caller ID

Phone Amego can be scripted using the GetURL AppleScript command like this:

tell application "Phone Amego"

GetURL "callerid:401-555-5555"

end tell

Phone Amego recognizes and responds to these URLs:

<callerid:1-777-555-5555>

<callerid://1-777-555-5555;device=soft_phone>

<callerid:Caller%20Name%3A777-555-5555>

Notice the use of URL encoding "%20" for " " and "%3A" for ":".

Selecting Default Applications

Phone Amego registers to handle URLs of the form <tel:xxx-xxx-xxxx>, but other applications

may register for these as well in which case Launch Services will decide which application to

invoke.

You can select which application you want to launch by default for various URLs by installing a

3rd party preference pane called "Default Apps".  See <http://www.macupdate.com/app/mac/

14618/rcdefaultapp>.

◀ Previous    Next ▶