Dialectic Icon

Configuring

AppleScript can be used to configure Dialectic to your needs. You can set many preferences, create, delete, or modify Locations, Dial Method configurations, Quick Dial entries, and more. This is helpful to quickly setup Dialectic on a new machine (or for administrators to configure user installations) or to enable specialized workflows such as recording calls. For all of the example scripts provided below, click the small script icon in the top left corner of the example box to open the example code as a new script in the Script Editor application.

The configuration options covered in this section are:

Creating, Modifying, & Deleting Dial Method Configurations

Each Dial Method type can have an unlimited number of configurations (the only caveat is that every configuration per Dial Method type must have a unique name). To create new configurations, you use the same basic format but since each configuration supports unique properties specific to the associated Dial Method, setting the properties must be customized per type.


Creating Dial Method Configurations

script icon
tell application "Dialectic"
     make new AppleScript Dial Method configuration at end of AppleScript Dial Method configurations with properties {name:"Custom Configuration", script path:"/Library/Scripts/Dialectic/Example Script.scpt"}
end tell
script icon
tell application "Dialectic"
     make new Asterisk Dial Method configuration at end of Asterisk Dial Method configurations with properties {name:"Custom Configuration", username:"username", password:"password", extension:"1001", connected device type:IAX Phone or Adapter, caller ID:"Dialectic", context:"Dialectic", local server:false, remote IP address:"127.0.0.1", remote server port:5038, verbose logging enabled:true}
end tell
script icon
tell application "Dialectic"
     make new Bluetooth Phone Dial Method configuration at end of Bluetooth Phone Dial Method configurations with properties {name:"Custom Configuration", modem device:"T637", use modem:false, init string:"AT&F", alternate mobile dial string:false}
end tell
script icon
tell application "Dialectic"
     make new BroadVoice Dial Method configuration at end of BroadVoice Dial Method configurations with properties {name:"Custom Configuration", username:"username", password:"password"}
end tell
script icon
tell application "Dialectic"
     make new CallVantage Dial Method configuration at end of CallVantage Dial Method configurations with properties {name:"Custom Configuration", phone number:"number", password:"password"}
end tell
script icon
tell application "Dialectic"
     make new Cisco IP Phone Dial Method configuration at end of Cisco IP Phone Dial Method configurations with properties {name:"Custom Configuration", username:"username", password:"password", IP address:"192.168.1.100", priority:dial immediately}
end tell
script icon
tell application "Dialectic"
     make new Dialectic Remote Dial Method configuration at end of Dialectic Remote Dial Method configurations with properties {name:"Custom Configuration", service:"RDS on PowerBook G4", password:"password"}
end tell
script icon
tell application "Dialectic"
     make new FRITZBox Dial Method configuration at end of FRITZBox Dial Method configurations with properties {name:"Custom Configuration", IP address:"192.168.1.1", password:"password", default dial port:1, prompt for dial port when dialing:false, connection timeout:30}
end tell
script icon
tell application "Dialectic"
     make new Modem Dial Method configuration at end of Modem Dial Method configurations with properties {name:"Custom Configuration", device:"modem", init string:"AT&F", sound enabled:true, wait for dial tone:true, touchtones:true, calling tones disabled:false, wait for response:true, redial on busy:true, redial on busy pause:2, redial on busy total attempts:10, hang up timeout:5}
end tell
script icon
tell application "Dialectic"
     make new Phlink Dial Method configuration at end of Phlink Dial Method configurations with properties {name:"Custom Configuration", recording enabled:true, silence detection enabled:true, hang up timeout:20, remote:true, remote IP address:"192.168.1.100", remote username:"username", remote password:"password"}
end tell
script icon
tell application "Dialectic"
     make new PhoneValet Dial Method configuration at end of PhoneValet Dial Method configurations with properties {name:"Custom Configuration", dial exact:true, remote:true, remote IP address:"192.168.1.100", remote username:"username", remote password:"password"}
end tell
script icon
tell application "Dialectic"
     make new Softphone Dial Method configuration at end of Softphone Dial Method configurations with properties {name:"Custom Configuration", softphone:"Skype", strip formatting:true, delay dial:30, override system volume:true, override system volume level:70}
end tell
script icon
tell application "Dialectic"
     make new Speakeasy Dial Method configuration at end of Speakeasy Dial Method configurations with properties {name:"Custom Configuration", username:"username", password:"password", service type:home VoIP}
end tell
script icon
tell application "Dialectic"
     make new Speaker Dial Method configuration at end of Speaker Dial Method configurations with properties {name:"Custom Configuration", dial speed:fast, comma pause:1.5, use pregenerated tones:true, override system volume:true, override system volume level:70}
end tell
script icon
tell application "Dialectic"
     make new URL Dial Method configuration at end of URL Dial Method configurations with properties {name:"Custom Configuration", URL string:"http://www.something.com", encoding:None, silent:true}
end tell
script icon
tell application "Dialectic"
     make new ViaTalk Dial Method configuration at end of ViaTalk Dial Method configurations with properties {name:"Custom Configuration", phone number:"12125551212", password:"password"}
end tell
script icon
tell application "Dialectic"
     make new Vonage Dial Method configuration at end of Vonage Dial Method configurations with properties {name:"Custom Configuration", username:"username", password:"password", phone number:"2125551212"}
end tell


Modifying Dial Method Configurations

script icon
tell application "Dialectic"
     tell AppleScript Dial Method configuration -1
          set name to "New Name"
          return properties
          -->{class:AppleScript Dial Method configuration, id:"AF99451D-0D17-475B-A724-7BD09FC2364F:0:DialecticDMC", script path:"/Library/Scripts/Dialectic/Example Script.scpt", index:1, name:"New Name"}
     end tell
end tell
script icon
tell application "Dialectic"
     tell Modem Dial Method configuration -1
          set device to "Bluetooth-Modem"
          return properties
          -->{wait for response:false, wait for dial tone:true, redial on busy total attempts:3, redial on busy:false, index:1, hang up timeout:10, redial on busy pause:1, init string:"AT&F", calling tones disabled:false, name:"Modem Default", class:Modem Dial Method configuration, id:"F6C7D675-0B74-4098-AC6C-F539FFFF4429:8:DialecticDMC", sound enabled:true, touchtones:true, device:"Bluetooth-Modem"}
     end tell
end tell


Deleting Dial Method Configurations

script icon
tell application "Dialectic"
     try
          delete AppleScript Dial Method configuration "Custom Configuration"
     end try
end tell

Creating, Modifying, & Deleting Locations

script icon
tell application "Dialectic"
     set new_location to make new location at end of locations with properties {name:"New Location (Speaker)"}
     set the_configuration to Speaker Dial Method configuration 1
     tell new_location
          set SIP Dial Method to the_configuration
          set domestic Dial Method to the_configuration
          set internal Dial Method to the_configuration
          set international Dial Method to the_configuration
          set local Dial Method to the_configuration
          set literal Dial Method to the_configuration
          set toll free Dial Method to the_configuration
          set country to "United States"
          set local international prefix to "+1"
          set outside prefix enabled to false
          set outside prefix to "9,"
          set call waiting prefix to "*70,"
          set caller ID block prefix to "*82,"
          set maximum internal length to 4
          set internal prefix to ""
          set internal suffix to ""
          set maximum local length to 7
          set local prefix to "1"
          set local suffix to ""
          set include local area code to true
          set local area codes to {"212", "646", "718", "917"}
          set toll free prefix to "1"
          set toll free suffix to ""
          set toll free codes to {"800", "866", "877", "888"}
          set domestic prefix to "1"
          set domestic suffix to ""
          set international delimiter to "+"
          set include international delimiter to false
          set international prefix to "011"
          set international suffix to ""
          set current to true
     end tell
end tell
script icon
tell application "Dialectic"
     set current_location to item 1 of (get locations whose current = true)
     set name of current_location to "New Name"
end tell
script icon
tell application "Dialectic"
     try
          delete location "New Name"
     end try
end tell

Creating, Modifying, & Deleting Quick Dial Entries

script icon
tell application "Dialectic"
     make new quick dial number at end of quick dial numbers with properties {name:"NYC Information", phone number:"(212) 555-1212"}
end tell
script icon
tell application "Dialectic"
     set name of quick dial number 1 to "New York City Information"
end tell
script icon
tell application "Dialectic"
     try
          delete quick dial number "New York City Information"
     end try
end tell

Setting Preferences

script icon
tell application "Dialectic"
     set AB menu configuration to {limit to single group:true}
     set AB menu configuration to {limited group:"Business"}
     set AB menu configuration to {sort by last name:true}
     set AB menu configuration to {display last name first:false}
     set AB menu configuration to {include icons:true}
     set AB menu configuration to {include titles:true}
     set AB menu configuration to {include company names:false}
     set AB menu configuration to {normalize company names:false}
     set AB menu configuration to {include all submenu:true}
     set AB menu configuration to {include alphabetical submenu:true}
     set AB menu configuration to {include companies submenu:true}
     set AB menu configuration to {include geographical submenu:true}
     set AB menu configuration to {include groups submenu:true}
     set AB menu configuration to {include recently used submenu:true}
     set AB menu configuration to {submenu order:{all submenu, alphabetical submenu, companies submenu, geographical submenu, groups submenu, recently used submenu}}
     set AB menu configuration to {include phone data item:true}
     set AB menu configuration to {include email data item:true}
     set AB menu configuration to {include instant messaging data item:true}
     set AB menu configuration to {include address data item:true}
     set AB menu configuration to {include url data item:true}
     set AB menu configuration to {include note data item:true}
     set AB menu configuration to {data item order:{phone data item, email data item, instant messaging data item, address data item, url data item, note data item}}
     set AB menu configuration to {separate AB menu enabled:true}
     set AB menu configuration to {number of recent contacts:20}
     set AB menu configuration to {main action:Do Nothing action}
     set AB menu configuration to {email action:Create New Email action}
     set AB menu configuration to {instant messaging action:Open New Chat Session action}
     set AB menu configuration to {address action:Show in Large Type action}
     set AB menu configuration to {url action:Open URL action}
     set AB menu configuration to {note action:Copy to Clipboard action}
     set AB menu configuration to {group action:Create New Email action}
     set AB menu configuration to {map service:"Google"}
     set AB menu configuration to {group email field:Bcc field}
     return AB menu configuration
end tell

Open

Open Script Editor

Open Dialectic's AppleScript Dictionary

Related Topics

Online Resources

AppleScript

Dialing with AppleScript

Other AppleScript Commands

Internal Script Formats

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.