Act upon incoming phone calls on my iPhone?

I would love to make a flow that pauses my music if a call comes in on my iPhone (and ideally also when a call comes in on my computer).
I have been searching but I didn’t find any reference to ways to detect incoming phone calls. I tried also the Shortcuts app on my phone, it can respond to messages and emails but not to phone calls.
Anyone has a solution?