Up to Android 7.1 it was possible to end an incoming call by using the ITelephony.endCall() method and giving your app the permissions
ITelephony.endCall()
Try using reflection like in the answer provded here.
It works with READ_PHONE_STATE and CALL_PHONE permissions. Those permissions are available to non-system applications, according to android docs