Just after Dialectic has dialed, Dialectic can run an AppleScript. This can be used to resume a media player not natively supported by Dialectic (such as VLC, an Internet radio application, etc.), to create your own call log or add the call to a database, open a database record associated with the called party, or just about anything else. AppleScript is powerful!
To specify that this should be done, create and save your script, and then, in the Dialing preferences, check “Launch Application or AppleScript After Dialing” and choose the script file. You can also drag and drop your script onto the script path area to specify it as the script to use. For example scripts that can be used with Dialectic as an after dialing script (and other items), see the Dialectic Online Resources at:
http://www.jonn8.com/dialectic/resources/
The After Dialing AppleScript must contain the handle_predial_action handler using the following format:
The parameters of the handle_after_dial_action handler will be passed by Dialectic to your script just after the number is actually dialed. These parameters are:
- contact_number The number Dialectic was asked to dial as a string, in raw form, exactly as it was asked to dial it.
- contact_name The name of the contact as a string (if unavailable, this will be a blank string).
- call_type The type of call as interpreted by Dialectic: Internal, Local, Long-Distance, etc. as a plain string.
- dial_method The Dial Method used by Dialectic as a string in accordance with the type of call (see previous parameter) and your current Location; this will be “AppleScript Dial Method” (since if it were not, we would not be running this script in the first place!) followed by the name of the specific configuration.
- transformed_number The phone number dialed as a string as transformed by the current Location’s Dialing Rules. For example, if this is an external call and you have specified that Dialectic should dial “9,” to reach an outside line, “9,” will be prefixed to the original contact number as part of the transformed number.
- call_success A boolean indicating whether or not the call was dialed successfully.
Your script does not need to return any specific result.