@Nik, see below for a quick Proof of concept for tracking call status. You can find the other statuses to check in the callObserver_callChanged_ in this Apple doc. If, instead of callbacks, you just want to check that there are no ongoing calls right now, check that len(controller.callObserver().calls()) returns zero.
import time
import webbrowser
from objc_util import *
load_framework('CallKit')
CXCallController = ObjCClass('CXCallController')
CXCallObserver = ObjCClass('CXCallObserver')
def callObserver_callChanged_(_self, _cmd, _obserever, _call):
call = ObjCInstance(_call)
if call.outgoing:
print('Calling...')
ObserverDelegate = create_objc_class(
'ObserverDelegate',
methods=[callObserver_callChanged_],
protocols=['CXCallObserverDelegate']
)
controller = CXCallController.alloc().init()
retain_global(controller)
delegate = ObserverDelegate.alloc().init()
retain_global(delegate)
controller.callObserver().setDelegate_queue_(delegate, None)
time.sleep(1)
webbrowser.open('facetime-audio://123456789')