Making audio calls on iPhone via Automator in macOS Sierra

I was using this script by Evan Carmi to make audio calls via my Mac:

on run {input, parameters}
  open location "tel://" & input & "?audio=yes"
  return input
end run

This worked great until I recently updated my Mac to macOS Sierra 10.12.5. Now it returns an error (popup window that says "the action run applescript encountered an error"). The script allows any number to be called from any application (see this).

Does anyone know how to update this script so that it works on macOS Sierra 10.12.5?


This works for me on the latest version of Sierra

set input to "0123456789" -- input real phone number
    open location "tel://" & input & "?audio=yes"
    delay 1
    tell application "System Events"
        key code 36
end tell