Dialectic Icon

AppleScript Dial Method Format

While Dialectic supports many devices & services for dialing, you may use a device or service that Dialectic doesn’t know about but which you can control using AppleScript (which can then, in turn, call a shell script, open a URL, etc.). To dial using an AppleScript, you’ll use the AppleScript Dial Method with your own script.

You specify the script to be used for dialing by creating a new AppleScript Dial Method configuration and choosing the script to use for that configuration. For example scripts that can be used with Dialectic as an AppleScript Dial Method script (and other items), see the Dialectic Online Resources at:

http://www.jonn8.com/dialectic/resources/

The AppleScript Dial Method script must contain the handle_dial_action handler using the following format:

script icon
on handle_dial_action(contact_number, contact_name, call_type, dial_method, transformed_number)
     try
          
          --Use any of the data above in your script here to send the information to a scriptable service or device...
          --You can script something directly or use advanced features such as calling a shell script to finalize the call.
          
     on error the_error
          return {false, the_error}
     end try
     return true
end handle_dial_action

The parameters of the handle_dial_action handler will be passed by Dialectic to your script when a number is dialed and the Dial Method configuration for the detected call type is set to use the AppleScript Dial Method. These parameters are:

Your script should return true if the call should be considered a success; return false if it should be considered a failure. Optionally, you can return a list of {false, the_error} where the_error is a string detailing why the call failed.

Open

Open AppleScript Dial Method Configurations

Related Topics

AppleScript Dial Method

Online Resources

Was this page helpful? Were there errors, inaccuracies, or typos?
Could something have been explained better? If so, please let us know. 

Copyright © 2017 JNSoftware LLC. All Rights Reserved.
All other products mentioned are copyright of their respective owners.
No endorsement of or affiliation with any third-party product or service is implied.