Detecting if an iPhone is in a call

Tags: #<Tag:0x00007f3262a72268> #<Tag:0x00007f3262a720d8>

Hi everyone, is there a way to detect when a phone is in a call using the iOS integration and the companion app?

I would like to build some sort of automation like “if the phone rings or i am in a call, pause roomba or pause the media player”

Is there any way to do that at all or iOS is too strict about these things?

You may be able to get this working using’s automation > “when Phone is opened” to execute a service call or fire an event. There’s no way for the app to be notified of this otherwise.

hmm will look into that… is that even possible with shortcut?
I cannot find any trigger that says “when an app is opened do something”…

In the Shortcuts app it’s under the “Automations” tab and then “Create Personal Automation.” There’s an “Open App” trigger there. After that you can add the Home Assistant actions (pausing your roomba and media players) by following these docs.

I’ve just tested this myself and here’s what I found. When you answer a phone call from the lock screen, it doesn’t actually open the phone app, it’s like a background process or something. But if you then tap on the Phone app and make that active on screen, your shortcut will run.

So it kinda sorta works, but maybe not quite to the level you’re wanting. iOS 14 beta added new personal automation triggers for emails and text messages in Shortcuts, but not phone calls yet. Hopefully that is next on Apple’s list…

Just tried it… indeed it is linked to the app being manually opened so not really fit to an automation purpose.

I will probably use a simpler automation like a button to pause the roomba itself and wait for some automation triggers in the future…

The Android app is pretty straight forward, however, I am trying to run some automations based on in call status. Does anyone know if this sensor is available in the IOS mobile app?