I took comex's solution and plugged it into an applescript application set to run in the background (no dock icon, menubar or anything). I'm no serious hacker, but it does the job.
This is the code I put together from examples I found around the web:
repeat
tell application "System Events" to set theCount to the count of (processes whose name is "Facetime")
if theCount = 0 then
do shell script "sleep 1"
else
do shell script "printf \"p *(char*)(void(*)())AudioDeviceDuck=0xc3\\nq\" | lldb -n FaceTime"
repeat
do shell script "sleep 1"
tell application "System Events" to set theCount to the count of (processes whose name is "Facetime")
if theCount = 0 then
exit repeat
end if
end repeat
end if
end repeat
end
If some expert can approve this code I'd be really happy.
So far it has had less than 5 calls for testing, both outgoing and incoming.
My main worry is it polls for Facetime processes every second, I figured that's the least it takes to answer an incoming call: the command needs to run every time facetime is opened but doesn't work mid call, so you have to catch that moment when it's still ringing...
Activity monitor says it uses 0.2% CPU, isn't that too much for something this basic?
You can download the app and drop it into your login items then do a logout/login or start it manually, and it should just work. (The download button is at the top of the page).
If you don't trust me, since I'm just any guy on the internet, you can parse the app yourself from my code using applescript editor's export function, to have it running in the background, once you get your .app executable: right click it, show package contents, open the info.plist file, and add two lines with
<key>LSBackgroundOnly</key>
<true/>
just under the first <dict> tag (should be around line 4), Save and you're done.
Hope this helps someone, I've always learned a lot from this forum, happy to give back 🙂
-Seb