What I do is I set a tag on all inbound calls. When placing an outbound call, if the tag condition is met, I automatically add diversion header, as this assumes that the call is being forwarded.
Any call without a tag means that the outbound CID was set from the system and can safely be passed...