AppleScript for Calls

You can use AppleScript to make a call to one phone number. You can use the Script Editor application (included with Mac OS X) and from it open the MegaCellX application to see the AppleScript dictionary with available commands.You can find some examples here.

Usign Calls Event in a AppleScript

MegaCell can execute AppleScript for call events. All you have to do is click on the "Select a file..." into Calls preferences and select a compiled AppleScript (extension .scpt).

You can make a AppleScript with subroutines and associeta a subroutine to particulare call event, so you can combine separate scripts into a single file. When an events occurs, MegaCell will retrive the AppleScript file the you have indicated into Calls Preferences. If the script has the subroutine event MageCell will execute it with data desribing the event.

AppleScript subroutines for Call Events

Subroutine

Description

call_started(parameters)

Executed when an incoming or outgoing call is first detected.

call_answered(parameters)

Executed when an incoming or outgoing call is answered.

call_ended(parameters)

Executed when a call has ended.

Parameters

Description

p_phonenumber

Phone number of the caller or receiver.

p_name

Name of the caller or receiver.

p_date

Date and time the call began ringing.

p_duration

Duration of answered call in seconds.

call_in_out

Type of call if it is an incoming call it assume the value "in" otherwise it assume value "out" for an outgoing call.