This might be possible - if the call state can be queried via D-Bus or if at least something like "call started" and "call ended" is sent as D-Bus signal.