Run script/automator action from bluetooth event

I’ve just started using a new pair of wireless headphones, that have some assistant magic integrated. That works great on my phone, but on my Mac it does nothing (or, it tries to do something to Siri, but she’s not really around)

I’d like to somehow map that action to something else – preferably something I can customize to my needs.

From the Console app, I can see that at least 2 bluetooth events happen when I do this – handsFree:siriStatus and handsFree:activateSiri, both under the bluetoothaudiod process. Is it possible somehow to react to these bluetooth events, or are their actions hardcoded in the OS?